Lines Matching refs:this

188 static inline void wl3501_switch_page(struct wl3501_card *this, u8 page)
190 wl3501_outb(page, this->base_addr + WL3501_NIC_BSS);
199 static int wl3501_get_flash_mac_addr(struct wl3501_card *this)
201 int base_addr = this->base_addr;
210 this->mac_addr[0] = inb(base_addr + WL3501_NIC_IODPA);
212 this->mac_addr[1] = inb(base_addr + WL3501_NIC_IODPA);
214 this->mac_addr[2] = inb(base_addr + WL3501_NIC_IODPA);
216 this->mac_addr[3] = inb(base_addr + WL3501_NIC_IODPA);
218 this->mac_addr[4] = inb(base_addr + WL3501_NIC_IODPA);
220 this->mac_addr[5] = inb(base_addr + WL3501_NIC_IODPA);
222 this->reg_domain = inb(base_addr + WL3501_NIC_IODPA);
228 this->version[0] = inb(base_addr + WL3501_NIC_IODPA);
230 this->version[1] = inb(base_addr + WL3501_NIC_IODPA);
232 wl3501_switch_page(this, WL3501_BSS_SPAGE0);
235 return this->mac_addr[0] == 0x00 && this->mac_addr[1] == 0x60;
240 * @this: Card
247 static void wl3501_set_to_wla(struct wl3501_card *this, u16 dest, void *src,
251 wl3501_switch_page(this, (dest & 0x8000) ? WL3501_BSS_SPAGE1 :
254 wl3501_outb(dest & 0xff, this->base_addr + WL3501_NIC_LMAL);
255 wl3501_outb(((dest >> 8) & 0x7f), this->base_addr + WL3501_NIC_LMAH);
258 wl3501_outsb(this->base_addr + WL3501_NIC_IODPA, src, size);
263 * @this: Card
270 static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest,
274 wl3501_switch_page(this, (src & 0x8000) ? WL3501_BSS_SPAGE1 :
277 wl3501_outb(src & 0xff, this->base_addr + WL3501_NIC_LMAL);
278 wl3501_outb((src >> 8) & 0x7f, this->base_addr + WL3501_NIC_LMAH);
281 insb(this->base_addr + WL3501_NIC_IODPA, dest, size);
296 static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len)
302 if (full_len > this->tx_buffer_cnt * 254)
304 ret = this->tx_buffer_head;
310 wl3501_get_from_wla(this, this->tx_buffer_head, &next,
313 wl3501_set_to_wla(this, this->tx_buffer_head, &zero,
315 this->tx_buffer_head = next;
319 this->tx_buffer_head = ret;
324 this->tx_buffer_cnt -= blk_cnt;
332 static void wl3501_free_tx_buffer(struct wl3501_card *this, u16 ptr)
335 if (!this->tx_buffer_head)
336 this->tx_buffer_head = ptr;
338 wl3501_set_to_wla(this, this->tx_buffer_tail,
343 this->tx_buffer_cnt++;
344 wl3501_get_from_wla(this, ptr, &next, sizeof(next));
345 this->tx_buffer_tail = ptr;
350 static int wl3501_esbq_req_test(struct wl3501_card *this)
354 wl3501_get_from_wla(this, this->esbq_req_head + 3, &tmp, sizeof(tmp));
358 static void wl3501_esbq_req(struct wl3501_card *this, u16 *ptr)
362 wl3501_set_to_wla(this, this->esbq_req_head, ptr, 2);
363 wl3501_set_to_wla(this, this->esbq_req_head + 2, &tmp, sizeof(tmp));
364 this->esbq_req_head += 4;
365 if (this->esbq_req_head >= this->esbq_req_end)
366 this->esbq_req_head = this->esbq_req_start;
369 static int wl3501_esbq_exec(struct wl3501_card *this, void *sig, int sig_size)
373 if (wl3501_esbq_req_test(this)) {
374 u16 ptr = wl3501_get_tx_buffer(this, sig_size);
376 wl3501_set_to_wla(this, ptr, sig, sig_size);
377 wl3501_esbq_req(this, &ptr);
384 static int wl3501_request_mib(struct wl3501_card *this, u8 index, void *bf)
393 spin_lock_irqsave(&this->lock, flags);
394 if (wl3501_esbq_req_test(this)) {
395 u16 ptr = wl3501_get_tx_buffer(this, sizeof(sig));
397 wl3501_set_to_wla(this, ptr, &sig, sizeof(sig));
398 wl3501_esbq_req(this, &ptr);
399 this->sig_get_confirm.mib_status = 255;
403 spin_unlock_irqrestore(&this->lock, flags);
408 static int wl3501_get_mib_value(struct wl3501_card *this, u8 index,
413 rc = wl3501_request_mib(this, index, bf);
417 rc = wait_event_interruptible(this->wait,
418 this->sig_get_confirm.mib_status != 255);
422 memcpy(bf, this->sig_get_confirm.mib_value, size);
426 static int wl3501_pwr_mgmt(struct wl3501_card *this, int suspend)
437 spin_lock_irqsave(&this->lock, flags);
438 if (wl3501_esbq_req_test(this)) {
439 u16 ptr = wl3501_get_tx_buffer(this, sizeof(sig));
441 wl3501_set_to_wla(this, ptr, &sig, sizeof(sig));
442 wl3501_esbq_req(this, &ptr);
443 this->sig_pwr_mgmt_confirm.status = 255;
444 spin_unlock_irqrestore(&this->lock, flags);
445 rc = wait_event_interruptible(this->wait,
446 this->sig_pwr_mgmt_confirm.status != 255);
449 this->sig_pwr_mgmt_confirm.status);
453 spin_unlock_irqrestore(&this->lock, flags);
460 * @this: Card
466 static int wl3501_send_pkt(struct wl3501_card *this, u8 *data, u16 len)
476 if (wl3501_esbq_req_test(this)) {
477 sig_bf = wl3501_get_tx_buffer(this, sizeof(sig));
481 bf = wl3501_get_tx_buffer(this, len + 26 + 24);
484 wl3501_free_tx_buffer(this, sig_bf);
497 wl3501_set_to_wla(this, bf + 2 +
508 wl3501_set_to_wla(this,
512 wl3501_get_from_wla(this, bf, &next, sizeof(next));
525 wl3501_set_to_wla(this, bf + 2 +
529 wl3501_get_from_wla(this, bf, &next, sizeof(next));
540 wl3501_set_to_wla(this, bf + 2, pdata, tmplen);
542 wl3501_get_from_wla(this, bf, &next, sizeof(next));
545 wl3501_set_to_wla(this, sig_bf, &sig, sizeof(sig));
546 wl3501_esbq_req(this, &sig_bf);
552 static int wl3501_mgmt_resync(struct wl3501_card *this)
558 return wl3501_esbq_exec(this, &sig, sizeof(sig));
561 static inline int wl3501_fw_bss_type(struct wl3501_card *this)
563 return this->net_type == IW_MODE_INFRA ? WL3501_NET_TYPE_INFRA :
567 static inline int wl3501_fw_cap_info(struct wl3501_card *this)
569 return this->net_type == IW_MODE_INFRA ? WL3501_MGMT_CAPABILITY_ESS :
573 static int wl3501_mgmt_scan(struct wl3501_card *this, u16 chan_time)
581 .bss_type = wl3501_fw_bss_type(this),
584 this->bss_cnt = this->join_sta_bss = 0;
585 return wl3501_esbq_exec(this, &sig, sizeof(sig));
588 static int wl3501_mgmt_join(struct wl3501_card *this, u16 stas)
598 .chan = this->chan,
602 memcpy(&sig.req, &this->bss_set[stas].req, sizeof(sig.req));
603 return wl3501_esbq_exec(this, &sig, sizeof(sig));
606 static int wl3501_mgmt_start(struct wl3501_card *this)
617 .chan = this->chan,
650 .bss_type = wl3501_fw_bss_type(this),
651 .cap_info = wl3501_fw_cap_info(this),
654 iw_copy_mgmt_info_element(&sig.ssid.el, &this->essid.el);
655 iw_copy_mgmt_info_element(&this->keep_essid.el, &this->essid.el);
656 return wl3501_esbq_exec(this, &sig, sizeof(sig));
659 static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
666 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
669 if ((this->net_type == IW_MODE_INFRA &&
671 (this->net_type == IW_MODE_ADHOC &&
673 this->net_type == IW_MODE_AUTO) {
674 if (!this->essid.el.len)
676 else if (this->essid.el.len == 3 &&
677 !memcmp(this->essid.essid, "ANY", 3))
679 else if (this->essid.el.len != sig.req.ssid.el.len)
681 else if (memcmp(this->essid.essid, sig.req.ssid.essid,
682 this->essid.el.len))
687 for (i = 0; i < this->bss_cnt; i++) {
688 if (ether_addr_equal_unaligned(this->bss_set[i].req.bssid,
696 memcpy(&this->bss_set[i].req,
698 this->bss_cnt++;
699 this->rssi = sig.rssi;
700 this->bss_set[i].rssi = sig.rssi;
705 this->join_sta_bss = 0;
706 for (i = this->join_sta_bss; i < this->bss_cnt; i++)
707 if (!wl3501_mgmt_join(this, i))
709 this->join_sta_bss = i;
710 if (this->join_sta_bss == this->bss_cnt) {
711 if (this->net_type == IW_MODE_INFRA)
712 wl3501_mgmt_scan(this, 100);
714 this->adhoc_times++;
715 if (this->adhoc_times > WL3501_MAX_ADHOC_TRIES)
716 wl3501_mgmt_start(this);
718 wl3501_mgmt_scan(this, 100);
726 * @this: Card
731 static int wl3501_block_interrupt(struct wl3501_card *this)
733 u8 old = inb(this->base_addr + WL3501_NIC_GCR);
737 wl3501_outb(new, this->base_addr + WL3501_NIC_GCR);
743 * @this: Card
748 static int wl3501_unblock_interrupt(struct wl3501_card *this)
750 u8 old = inb(this->base_addr + WL3501_NIC_GCR);
754 wl3501_outb(new, this->base_addr + WL3501_NIC_GCR);
763 * @this: card
767 static u16 wl3501_receive(struct wl3501_card *this, u8 *bf, u16 size)
773 wl3501_get_from_wla(this, this->start_seg + 2,
776 wl3501_get_from_wla(this,
777 this->start_seg +
784 wl3501_get_from_wla(this,
785 this->start_seg +
792 wl3501_get_from_wla(this, next_addr + 5, data,
796 wl3501_get_from_wla(this, next_addr + 2, &next_addr1,
800 wl3501_get_from_wla(this, next_addr + 5, data, size);
807 static void wl3501_esbq_req_free(struct wl3501_card *this)
812 if (this->esbq_req_head == this->esbq_req_tail)
814 wl3501_get_from_wla(this, this->esbq_req_tail + 3, &tmp, sizeof(tmp));
817 wl3501_get_from_wla(this, this->esbq_req_tail, &addr, sizeof(addr));
818 wl3501_free_tx_buffer(this, addr);
819 this->esbq_req_tail += 4;
820 if (this->esbq_req_tail >= this->esbq_req_end)
821 this->esbq_req_tail = this->esbq_req_start;
826 static int wl3501_esbq_confirm(struct wl3501_card *this)
830 wl3501_get_from_wla(this, this->esbq_confirm + 3, &tmp, sizeof(tmp));
836 struct wl3501_card *this = netdev_priv(dev);
839 dev->name, this->bssid);
843 static void wl3501_esbq_confirm_done(struct wl3501_card *this)
847 wl3501_set_to_wla(this, this->esbq_confirm + 3, &tmp, sizeof(tmp));
848 this->esbq_confirm += 4;
849 if (this->esbq_confirm >= this->esbq_confirm_end)
850 this->esbq_confirm = this->esbq_confirm_start;
853 static int wl3501_mgmt_auth(struct wl3501_card *this)
862 memcpy(sig.mac_addr, this->bssid, ETH_ALEN);
863 return wl3501_esbq_exec(this, &sig, sizeof(sig));
866 static int wl3501_mgmt_association(struct wl3501_card *this)
872 .cap_info = this->cap_info,
876 memcpy(sig.mac_addr, this->bssid, ETH_ALEN);
877 return wl3501_esbq_exec(this, &sig, sizeof(sig));
882 struct wl3501_card *this = netdev_priv(dev);
886 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
888 if (this->net_type == IW_MODE_INFRA) {
889 if (this->join_sta_bss < this->bss_cnt) {
890 const int i = this->join_sta_bss;
891 memcpy(this->bssid,
892 this->bss_set[i].req.bssid, ETH_ALEN);
893 this->chan = this->bss_set[i].req.ds_pset.chan;
894 iw_copy_mgmt_info_element(&this->keep_essid.el,
895 &this->bss_set[i].req.ssid.el);
896 wl3501_mgmt_auth(this);
899 const int i = this->join_sta_bss;
901 memcpy(&this->bssid, &this->bss_set[i].req.bssid, ETH_ALEN);
902 this->chan = this->bss_set[i].req.ds_pset.chan;
903 iw_copy_mgmt_info_element(&this->keep_essid.el,
904 &this->bss_set[i].req.ssid.el);
909 this->join_sta_bss++;
910 for (i = this->join_sta_bss; i < this->bss_cnt; i++)
911 if (!wl3501_mgmt_join(this, i))
913 this->join_sta_bss = i;
914 if (this->join_sta_bss == this->bss_cnt) {
915 if (this->net_type == IW_MODE_INFRA)
916 wl3501_mgmt_scan(this, 100);
918 this->adhoc_times++;
919 if (this->adhoc_times > WL3501_MAX_ADHOC_TRIES)
920 wl3501_mgmt_start(this);
922 wl3501_mgmt_scan(this, 100);
929 struct wl3501_card *this)
931 if (this->net_type == IW_MODE_INFRA) {
934 wl3501_mgmt_resync(this);
939 struct wl3501_card *this,
945 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
946 wl3501_free_tx_buffer(this, sig.data);
952 struct wl3501_card *this, u16 addr)
959 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
960 this->start_seg = sig.data;
961 wl3501_get_from_wla(this,
964 this->rssi = rssi <= 63 ? (rssi * 100) / 64 : 255;
966 wl3501_get_from_wla(this,
988 wl3501_receive(this, skb->data, pkt_len);
997 static inline void wl3501_get_confirm_interrupt(struct wl3501_card *this,
1001 wl3501_get_from_wla(this, addr, &this->sig_get_confirm,
1002 sizeof(this->sig_get_confirm));
1003 wake_up(&this->wait);
1007 struct wl3501_card *this,
1013 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
1021 struct wl3501_card *this = netdev_priv(dev);
1025 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
1031 static inline void wl3501_auth_confirm_interrupt(struct wl3501_card *this,
1037 wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
1040 wl3501_mgmt_association(this);
1042 wl3501_mgmt_resync(this);
1050 struct wl3501_card *this = netdev_priv(dev);
1055 if (!wl3501_esbq_confirm(this))
1057 wl3501_get_from_wla(this, this->esbq_confirm, &addr, sizeof(addr));
1058 wl3501_get_from_wla(this, addr + 2, &sig_id, sizeof(sig_id));
1064 wl3501_alarm_interrupt(dev, this);
1067 wl3501_md_confirm_interrupt(dev, this, addr);
1070 wl3501_md_ind_interrupt(dev, this, addr);
1073 wl3501_get_confirm_interrupt(this, addr,
1074 &this->sig_get_confirm,
1075 sizeof(this->sig_get_confirm));
1078 wl3501_get_confirm_interrupt(this, addr,
1079 &this->sig_pwr_mgmt_confirm,
1080 sizeof(this->sig_pwr_mgmt_confirm));
1083 wl3501_start_confirm_interrupt(dev, this, addr);
1086 wl3501_mgmt_scan_confirm(this, addr);
1095 wl3501_auth_confirm_interrupt(this, addr);
1098 wl3501_mgmt_resync(this); /* FIXME: should be resync_confirm */
1101 wl3501_esbq_confirm_done(this);
1105 wl3501_esbq_req_free(this);
1110 static inline void wl3501_ack_interrupt(struct wl3501_card *this)
1112 wl3501_outb(WL3501_GCR_ECINT, this->base_addr + WL3501_NIC_GCR);
1130 struct wl3501_card *this;
1132 this = netdev_priv(dev);
1133 spin_lock(&this->lock);
1134 wl3501_ack_interrupt(this);
1135 wl3501_block_interrupt(this);
1137 wl3501_unblock_interrupt(this);
1138 spin_unlock(&this->lock);
1143 static int wl3501_reset_board(struct wl3501_card *this)
1149 wl3501_outb_p(WL3501_GCR_CORESET, this->base_addr + WL3501_NIC_GCR);
1150 wl3501_outb_p(0, this->base_addr + WL3501_NIC_GCR);
1151 wl3501_outb_p(WL3501_GCR_CORESET, this->base_addr + WL3501_NIC_GCR);
1154 wl3501_set_to_wla(this, 0x480, &tmp, sizeof(tmp));
1157 wl3501_outb_p(0, this->base_addr + WL3501_NIC_GCR);
1161 wl3501_unblock_interrupt(this); /* acme: was commented */
1165 wl3501_get_from_wla(this, 0x480, &tmp, sizeof(tmp));
1170 wl3501_set_to_wla(this, 0x480, &tmp, sizeof(tmp));
1181 static int wl3501_init_firmware(struct wl3501_card *this)
1184 int rc = wl3501_reset_board(this);
1188 this->card_name[0] = '\0';
1189 wl3501_get_from_wla(this, 0x1a00,
1190 this->card_name, sizeof(this->card_name));
1191 this->card_name[sizeof(this->card_name) - 1] = '\0';
1192 this->firmware_date[0] = '\0';
1193 wl3501_get_from_wla(this, 0x1a40,
1194 this->firmware_date, sizeof(this->firmware_date));
1195 this->firmware_date[sizeof(this->firmware_date) - 1] = '\0';
1197 wl3501_switch_page(this, WL3501_BSS_SPAGE0);
1199 wl3501_get_from_wla(this, 0x482, &this->esbq_req_start, 2);
1200 wl3501_get_from_wla(this, 0x486, &this->esbq_req_end, 2);
1201 wl3501_get_from_wla(this, 0x488, &this->esbq_confirm_start, 2);
1202 wl3501_get_from_wla(this, 0x48c, &this->esbq_confirm_end, 2);
1203 wl3501_get_from_wla(this, 0x48e, &this->tx_buffer_head, 2);
1204 wl3501_get_from_wla(this, 0x492, &this->tx_buffer_size, 2);
1205 this->esbq_req_tail = this->esbq_req_head = this->esbq_req_start;
1206 this->esbq_req_end += this->esbq_req_start;
1207 this->esbq_confirm = this->esbq_confirm_start;
1208 this->esbq_confirm_end += this->esbq_confirm_start;
1210 this->tx_buffer_cnt = 1;
1211 ptr = this->tx_buffer_head;
1213 while ((next - this->tx_buffer_head) < this->tx_buffer_size) {
1214 this->tx_buffer_cnt++;
1215 wl3501_set_to_wla(this, ptr, &next, sizeof(next));
1221 wl3501_set_to_wla(this, ptr, &next, sizeof(next));
1222 this->tx_buffer_tail = ptr;
1232 struct wl3501_card *this = netdev_priv(dev);
1235 link = this->p_dev;
1237 spin_lock_irqsave(&this->lock, flags);
1242 wl3501_ack_interrupt(this);
1245 wl3501_block_interrupt(this);
1248 spin_unlock_irqrestore(&this->lock, flags);
1262 struct wl3501_card *this = netdev_priv(dev);
1266 spin_lock_irqsave(&this->lock, flags);
1267 wl3501_block_interrupt(this);
1269 if (wl3501_init_firmware(this)) {
1281 this->adhoc_times = 0;
1282 wl3501_ack_interrupt(this);
1283 wl3501_unblock_interrupt(this);
1284 wl3501_mgmt_scan(this, 100);
1288 spin_unlock_irqrestore(&this->lock, flags);
1317 struct wl3501_card *this = netdev_priv(dev);
1320 spin_lock_irqsave(&this->lock, flags);
1321 enabled = wl3501_block_interrupt(this);
1322 rc = wl3501_send_pkt(this, skb->data, skb->len);
1324 wl3501_unblock_interrupt(this);
1333 if (this->tx_buffer_cnt < 2)
1336 spin_unlock_irqrestore(&this->lock, flags);
1343 struct wl3501_card *this = netdev_priv(dev);
1346 link = this->p_dev;
1348 spin_lock_irqsave(&this->lock, flags);
1356 if (wl3501_init_firmware(this))
1359 this->adhoc_times = 0;
1361 wl3501_ack_interrupt(this);
1364 wl3501_unblock_interrupt(this);
1365 wl3501_mgmt_scan(this, 100);
1370 dev->name, this->card_name,
1371 dev->name, this->firmware_date);
1373 spin_unlock_irqrestore(&this->lock, flags);
1382 struct wl3501_card *this = netdev_priv(dev);
1383 struct iw_statistics *wstats = &this->wstats;
1388 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_ICV_ERROR_COUNT,
1391 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_UNDECRYPTABLE_COUNT,
1394 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_EXCLUDED_COUNT,
1397 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_RETRY_COUNT,
1400 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_FAILED_COUNT,
1403 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_RTS_FAILURE_COUNT,
1406 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_ACK_FAILURE_COUNT,
1409 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAME_DUPLICATE_COUNT,
1451 struct wl3501_card *this = netdev_priv(dev);
1455 if (iw_valid_channel(this->reg_domain, channel)) {
1456 this->chan = channel;
1465 struct wl3501_card *this = netdev_priv(dev);
1468 ieee80211_channel_to_frequency(this->chan, NL80211_BAND_2GHZ);
1481 struct wl3501_card *this = netdev_priv(dev);
1483 this->net_type = wrqu->mode;
1492 struct wl3501_card *this = netdev_priv(dev);
1494 wrqu->mode = this->net_type;
1501 struct wl3501_card *this = netdev_priv(dev);
1503 wrqu->sens.value = this->rssi;
1532 struct wl3501_card *this = netdev_priv(dev);
1541 memcpy(this->bssid, wrqu->ap_addr.sa_data, ETH_ALEN);
1551 struct wl3501_card *this = netdev_priv(dev);
1554 memcpy(wrqu->ap_addr.sa_data, this->bssid, ETH_ALEN);
1570 struct wl3501_card *this = netdev_priv(dev);
1575 for (i = 0; i < this->bss_cnt; ++i) {
1578 memcpy(iwe.u.ap_addr.sa_data, this->bss_set[i].req.bssid, ETH_ALEN);
1584 iwe.u.data.length = this->bss_set[i].req.ssid.el.len;
1588 this->bss_set[i].req.ssid.essid);
1590 iwe.u.mode = this->bss_set[i].req.bss_type;
1595 iwe.u.freq.m = this->bss_set[i].req.ds_pset.chan;
1601 if (this->bss_set[i].req.cap_info & WL3501_MGMT_CAPABILITY_PRIVACY)
1620 struct wl3501_card *this = netdev_priv(dev);
1624 &this->essid.el,
1628 &this->essid.el, "ANY", 3);
1637 struct wl3501_card *this = netdev_priv(dev);
1640 spin_lock_irqsave(&this->lock, flags);
1642 wrqu->essid.length = this->essid.el.len;
1643 memcpy(extra, this->essid.essid, this->essid.el.len);
1644 spin_unlock_irqrestore(&this->lock, flags);
1651 struct wl3501_card *this = netdev_priv(dev);
1653 if (wrqu->data.length > sizeof(this->nick))
1655 strscpy(this->nick, extra, wrqu->data.length);
1662 struct wl3501_card *this = netdev_priv(dev);
1664 strscpy(extra, this->nick, 32);
1673 * FIXME: have to see from where to get this info, perhaps this card
1687 struct wl3501_card *this = netdev_priv(dev);
1688 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_RTS_THRESHOLD,
1703 struct wl3501_card *this = netdev_priv(dev);
1704 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAG_THRESHOLD,
1719 struct wl3501_card *this = netdev_priv(dev);
1720 int rc = wl3501_get_mib_value(this,
1727 * From the MIB values I think this can be configurable,
1741 struct wl3501_card *this = netdev_priv(dev);
1742 int rc = wl3501_get_mib_value(this,
1751 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_SHORT_RETRY_LIMIT,
1768 struct wl3501_card *this = netdev_priv(dev);
1769 int rc = wl3501_get_mib_value(this,
1778 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_EXCLUDE_UNENCRYPTED,
1784 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_KEY_MAPPINGS_LEN,
1788 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_KEY_MAPPINGS,
1805 struct wl3501_card *this = netdev_priv(dev);
1806 int rc = wl3501_get_mib_value(this,
1864 struct wl3501_card *this;
1882 this = netdev_priv(dev);
1883 this->wireless_data.spy_data = &this->spy_data;
1884 this->p_dev = p_dev;
1885 dev->wireless_data = &this->wireless_data;
1905 struct wl3501_card *this;
1914 * 0x200-0x2ff, and so on, because this seems safer */
1924 /* Now allocate an interrupt line. Note that this does not actually
1943 this = netdev_priv(dev);
1945 this->base_addr = dev->base_addr;
1947 if (!wl3501_get_flash_mac_addr(this)) {
1954 eth_hw_addr_set(dev, this->mac_addr);
1959 dev->name, this->base_addr, (int)dev->irq,
1964 this->net_type = IW_MODE_INFRA;
1965 this->bss_cnt = 0;
1966 this->join_sta_bss = 0;
1967 this->adhoc_times = 0;
1968 iw_set_mgmt_info_element(IW_MGMT_INFO_ELEMENT_SSID, &this->essid.el,
1970 this->card_name[0] = '\0';
1971 this->firmware_date[0] = '\0';
1972 this->rssi = 255;
1973 this->chan = iw_default_channel(this->reg_domain);
1974 strscpy(this->nick, "Planet WL3501", sizeof(this->nick));
1975 spin_lock_init(&this->lock);
1976 init_waitqueue_head(&this->wait);