Lines Matching refs:local
986 static void airo_read_wireless_stats (struct airo_info *local);
1975 struct airo_info *local = dev->priv; in airo_get_stats() local
1978 if (down_trylock(&local->sem) != 0) { in airo_get_stats()
1979 set_bit(JOB_STATS, &local->flags); in airo_get_stats()
1980 wake_up_interruptible(&local->thr_wait); in airo_get_stats()
1982 airo_read_stats(local); in airo_get_stats()
1984 return &local->stats; in airo_get_stats()
4729 struct airo_info *local = dev->priv; local
4755 readConfigRid(local, 1);
4757 local->config.channelSet = (u16)(channel - 1);
4758 local->need_commit = 1;
4773 struct airo_info *local = dev->priv; local
4776 readConfigRid(local, 1);
4777 if ((local->config.opmode & 0xFF) == MODE_STA_ESS)
4778 status_rid.channel = local->config.channelSet;
4780 readStatusRid(local, &status_rid, 1);
4805 struct airo_info *local = dev->priv; local
4810 readSsidRid(local, &SSID_rid);
4836 disable_MAC(local, 1);
4837 writeSsidRid(local, &SSID_rid);
4838 enable_MAC(local, &rsp, 1);
4852 struct airo_info *local = dev->priv; local
4855 readStatusRid(local, &status_rid, 1);
4881 struct airo_info *local = dev->priv; local
4892 if (down_interruptible(&local->sem))
4894 issuecommand(local, &cmd, &rsp);
4895 up(&local->sem);
4900 disable_MAC(local, 1);
4901 writeAPListRid(local, &APList_rid);
4902 enable_MAC(local, &rsp, 1);
4916 struct airo_info *local = dev->priv; local
4919 readStatusRid(local, &status_rid, 1);
4937 struct airo_info *local = dev->priv; local
4943 readConfigRid(local, 1);
4944 memset(local->config.nodeName, 0, sizeof(local->config.nodeName));
4945 memcpy(local->config.nodeName, extra, dwrq->length);
4946 local->need_commit = 1;
4960 struct airo_info *local = dev->priv; local
4962 readConfigRid(local, 1);
4963 strncpy(extra, local->config.nodeName, 16);
4979 struct airo_info *local = dev->priv; local
4985 readCapabilityRid(local, &cap_rid);
5019 readConfigRid(local, 1);
5023 memset(local->config.rates, 0, 8);
5025 local->config.rates[i] = cap_rid.supportedRates[i];
5026 if(local->config.rates[i] == brate)
5032 memset(local->config.rates, 0, 8);
5033 local->config.rates[0] = brate;
5035 local->need_commit = 1;
5049 struct airo_info *local = dev->priv; local
5052 readStatusRid(local, &status_rid, 1);
5056 readConfigRid(local, 1);
5057 vwrq->fixed = (local->config.rates[1] == 0);
5071 struct airo_info *local = dev->priv; local
5079 readConfigRid(local, 1);
5080 local->config.rtsThres = rthr;
5081 local->need_commit = 1;
5095 struct airo_info *local = dev->priv; local
5097 readConfigRid(local, 1);
5098 vwrq->value = local->config.rtsThres;
5114 struct airo_info *local = dev->priv; local
5123 readConfigRid(local, 1);
5124 local->config.fragThresh = (u16)fthr;
5125 local->need_commit = 1;
5139 struct airo_info *local = dev->priv; local
5141 readConfigRid(local, 1);
5142 vwrq->value = local->config.fragThresh;
5158 struct airo_info *local = dev->priv; local
5161 readConfigRid(local, 1);
5162 if ((local->config.rmode & 0xff) >= RXMODE_RFMON)
5167 local->config.opmode &= 0xFF00;
5168 local->config.opmode |= MODE_STA_IBSS;
5169 local->config.rmode &= 0xfe00;
5170 local->config.scanMode = SCANMODE_ACTIVE;
5171 clear_bit (FLAG_802_11, &local->flags);
5174 local->config.opmode &= 0xFF00;
5175 local->config.opmode |= MODE_STA_ESS;
5176 local->config.rmode &= 0xfe00;
5177 local->config.scanMode = SCANMODE_ACTIVE;
5178 clear_bit (FLAG_802_11, &local->flags);
5181 local->config.opmode &= 0xFF00;
5182 local->config.opmode |= MODE_AP;
5183 local->config.rmode &= 0xfe00;
5184 local->config.scanMode = SCANMODE_ACTIVE;
5185 clear_bit (FLAG_802_11, &local->flags);
5188 local->config.opmode &= 0xFF00;
5189 local->config.opmode |= MODE_AP_RPTR;
5190 local->config.rmode &= 0xfe00;
5191 local->config.scanMode = SCANMODE_ACTIVE;
5192 clear_bit (FLAG_802_11, &local->flags);
5195 local->config.opmode &= 0xFF00;
5196 local->config.opmode |= MODE_STA_ESS;
5197 local->config.rmode &= 0xfe00;
5198 local->config.rmode |= RXMODE_RFMON | RXMODE_DISABLE_802_3_HEADER;
5199 local->config.scanMode = SCANMODE_PASSIVE;
5200 set_bit (FLAG_802_11, &local->flags);
5205 local->need_commit = commit;
5219 struct airo_info *local = dev->priv; local
5221 readConfigRid(local, 1);
5223 switch (local->config.opmode & 0xFF) {
5249 struct airo_info *local = dev->priv; local
5253 readCapabilityRid(local, &cap_rid);
5258 readConfigRid(local, 1);
5269 int current_index = get_wep_key(local, 0xffff);
5293 set_wep_key(local, index, key.key, key.len, 1, 1);
5299 (local->config.authType == AUTH_OPEN)) {
5300 local->config.authType = AUTH_ENCRYPT;
5301 local->need_commit = 1;
5307 set_wep_key(local, index, 0, 0, 1, 1);
5316 local->config.authType = AUTH_OPEN; // disable encryption
5318 local->config.authType = AUTH_SHAREDKEY; // Only Both
5320 local->config.authType = AUTH_ENCRYPT; // Only Wep
5323 local->need_commit = 1;
5336 struct airo_info *local = dev->priv; local
5341 readCapabilityRid(local, &cap_rid);
5345 readConfigRid(local, 1);
5347 switch(local->config.authType) {
5365 index = get_wep_key(local, 0xffff);
5368 dwrq->length = get_wep_key(local, index);
5384 struct airo_info *local = dev->priv; local
5389 readCapabilityRid(local, &cap_rid);
5392 set_bit (FLAG_RADIO_OFF, &local->flags);
5393 local->need_commit = 1;
5399 clear_bit (FLAG_RADIO_OFF, &local->flags);
5402 readConfigRid(local, 1);
5403 local->config.txPower = vwrq->value;
5404 local->need_commit = 1;
5420 struct airo_info *local = dev->priv; local
5422 readConfigRid(local, 1);
5423 vwrq->value = local->config.txPower;
5425 vwrq->disabled = test_bit(FLAG_RADIO_OFF, &local->flags);
5440 struct airo_info *local = dev->priv; local
5446 readConfigRid(local, 1);
5449 local->config.longRetryLimit = vwrq->value;
5451 local->config.shortRetryLimit = vwrq->value;
5454 local->config.longRetryLimit = vwrq->value;
5455 local->config.shortRetryLimit = vwrq->value;
5457 local->need_commit = 1;
5461 local->config.txLifetime = vwrq->value / 1024;
5462 local->need_commit = 1;
5477 struct airo_info *local = dev->priv; local
5481 readConfigRid(local, 1);
5485 vwrq->value = (int)local->config.txLifetime * 1024;
5488 vwrq->value = (int)local->config.longRetryLimit;
5491 vwrq->value = (int)local->config.shortRetryLimit;
5492 if((int)local->config.shortRetryLimit != (int)local->config.longRetryLimit)
5508 struct airo_info *local = dev->priv; local
5514 readCapabilityRid(local, &cap_rid);
5600 if (local->rssi)
5618 struct airo_info *local = dev->priv; local
5620 readConfigRid(local, 1);
5622 if ((local->config.rmode & 0xFF) >= RXMODE_RFMON) {
5625 local->config.powerSaveMode = POWERSAVE_CAM;
5626 local->config.rmode &= 0xFF00;
5627 local->config.rmode |= RXMODE_BC_MC_ADDR;
5628 local->need_commit = 1;
5632 local->config.fastListenDelay = (vwrq->value + 500) / 1024;
5633 local->config.powerSaveMode = POWERSAVE_PSPCAM;
5634 local->need_commit = 1;
5636 local->config.fastListenInterval = local->config.listenInterval = (vwrq->value + 500) / 1024;
5637 local->config.powerSaveMode = POWERSAVE_PSPCAM;
5638 local->need_commit = 1;
5642 if ((local->config.rmode & 0xFF) >= RXMODE_RFMON) {
5645 local->config.rmode &= 0xFF00;
5646 local->config.rmode |= RXMODE_ADDR;
5647 local->need_commit = 1;
5650 if ((local->config.rmode & 0xFF) >= RXMODE_RFMON) {
5653 local->config.rmode &= 0xFF00;
5654 local->config.rmode |= RXMODE_BC_MC_ADDR;
5655 local->need_commit = 1;
5675 struct airo_info *local = dev->priv; local
5678 readConfigRid(local, 1);
5679 mode = local->config.powerSaveMode;
5683 vwrq->value = (int)local->config.fastListenDelay * 1024;
5686 vwrq->value = (int)local->config.fastListenInterval * 1024;
5689 if ((local->config.rmode & 0xFF) == RXMODE_ADDR)
5706 struct airo_info *local = dev->priv; local
5708 readConfigRid(local, 1);
5709 local->config.rssiThreshold = vwrq->disabled ? RSSI_DEFAULT : vwrq->value;
5710 local->need_commit = 1;
5724 struct airo_info *local = dev->priv; local
5726 readConfigRid(local, 1);
5727 vwrq->value = local->config.rssiThreshold;
5744 struct airo_info *local = dev->priv; local
5752 if (readBSSListRid(local, loseSync, &BSSList))
5757 if (local->rssi)
5758 qual[i].level = 0x100 - local->rssi[BSSList.rssi].rssidBm;
5768 readStatusRid(local, &status_rid, 1);
5999 struct airo_info *local = dev->priv; local
6004 local->spy_number = 0;
6011 memcpy(local->spy_address[i], address[i].sa_data, ETH_ALEN);
6013 memset(local->spy_stat, 0, sizeof(struct iw_quality) * IW_MAX_SPY);
6016 local->spy_number = dwrq->length;
6030 struct airo_info *local = dev->priv; local
6034 dwrq->length = local->spy_number;
6037 for(i = 0; i < local->spy_number; i++) {
6038 memcpy(address[i].sa_data, local->spy_address[i], ETH_ALEN);
6042 if(local->spy_number > 0)
6043 memcpy(extra + (sizeof(struct sockaddr) * local->spy_number),
6044 local->spy_stat, sizeof(struct iw_quality) * local->spy_number);
6046 for (i=0; i<local->spy_number; i++)
6047 local->spy_stat[i].updated = 0;
6062 struct airo_info *local = dev->priv; local
6065 if (!local->need_commit)
6070 disable_MAC(local, 1);
6071 if (local->need_commit > 1) {
6075 readAPListRid(local, &APList_rid);
6076 readSsidRid(local, &SSID_rid);
6078 disable_MAC(local, 1);
6079 writeSsidRid(local, &SSID_rid);
6080 writeAPListRid(local, &APList_rid);
6082 if (down_interruptible(&local->sem))
6084 writeConfigRid(local, 0);
6085 enable_MAC(local, &rsp, 0);
6086 if (local->need_commit > 1)
6087 airo_set_promisc(local);
6089 up(&local->sem);
6575 static void airo_read_wireless_stats(struct airo_info *local) argument
6582 clear_bit(JOB_WSTATS, &local->flags);
6583 readStatusRid(local, &status_rid, 0);
6584 readStatsRid(local, &stats_rid, RID_STATS, 0);
6585 up(&local->sem);
6588 local->wstats.status = status_rid.mode;
6591 local->wstats.qual.qual = status_rid.signalQuality;
6592 if (local->rssi)
6593 local->wstats.qual.level = 0x100 - local->rssi[status_rid.sigQuality].rssidBm;
6595 local->wstats.qual.level = (status_rid.normalizedSignalStrength + 321) / 2;
6597 local->wstats.qual.noise = 256 - status_rid.noisedBm;
6598 local->wstats.qual.updated = 7;
6600 local->wstats.qual.noise = 0;
6601 local->wstats.qual.updated = 3;
6606 local->wstats.discard.nwid = vals[56] + vals[57] + vals[58];/* SSID Mismatch */
6607 local->wstats.discard.code = vals[6];/* RxWepErr */
6608 local->wstats.discard.fragment = vals[30];
6609 local->wstats.discard.retries = vals[10];
6610 local->wstats.discard.misc = vals[1] + vals[32];
6611 local->wstats.miss.beacon = vals[34];
6616 struct airo_info *local = dev->priv; local
6619 if (down_trylock(&local->sem) != 0) {
6620 set_bit(JOB_WSTATS, &local->flags);
6621 wake_up_interruptible(&local->thr_wait);
6623 airo_read_wireless_stats(local);
6625 return &local->wstats;