31 #include <linux/types.h>
35 #include <linux/kernel.h>
36 #include <linux/module.h>
37 #include <linux/fcntl.h>
38 #include <linux/if_arp.h>
40 #include <linux/netdevice.h>
43 #include <linux/slab.h>
44 #include <linux/string.h>
45 #include <linux/wireless.h>
55 #include <asm/uaccess.h>
60 #define slow_down_io()
64 #define WL3501_NOPLOOP(n) { int x = 0; while (x++ < n) slow_down_io(); }
68 #define wl3501_outb(a, b) { outb(a, b); slow_down_io(); }
69 #define wl3501_outb_p(a, b) { outb_p(a, b); slow_down_io(); }
70 #define wl3501_outsb(a, b, c) { outsb(a, b, c); slow_down_io(); }
72 #define WL3501_RELEASE_TIMEOUT (25 * HZ)
73 #define WL3501_MAX_ADHOC_TRIES 16
75 #define WL3501_RESUME 0
76 #define WL3501_SUSPEND 1
78 static int wl3501_config(
struct pcmcia_device *
link);
79 static void wl3501_release(
struct pcmcia_device *
link);
84 } iw_channel_table[] = {
146 for (i = 0; i <
ARRAY_SIZE(iw_channel_table); i++)
147 if (reg_domain == iw_channel_table[i].reg_domain) {
148 rc = channel >= iw_channel_table[
i].min &&
149 channel <= iw_channel_table[
i].max;
161 static int iw_default_channel(
int reg_domain)
165 for (i = 0; i <
ARRAY_SIZE(iw_channel_table); i++)
166 if (reg_domain == iw_channel_table[i].reg_domain) {
167 rc = iw_channel_table[
i].deflt;
175 void *
value,
int len)
185 iw_set_mgmt_info_element(from->
id, to, from->
data, from->
len);
199 static int wl3501_get_flash_mac_addr(
struct wl3501_card *
this)
201 int base_addr = this->base_addr;
268 static void wl3501_get_from_wla(
struct wl3501_card *
this,
u16 src,
void *dest,
300 if (full_len > this->tx_buffer_cnt * 254)
302 ret = this->tx_buffer_head;
308 wl3501_get_from_wla(
this, this->tx_buffer_head, &next,
311 wl3501_set_to_wla(
this, this->tx_buffer_head, &
zero,
313 this->tx_buffer_head =
next;
316 if (!next && full_len) {
317 this->tx_buffer_head =
ret;
322 this->tx_buffer_cnt -=
blk_cnt;
333 if (!this->tx_buffer_head)
334 this->tx_buffer_head =
ptr;
336 wl3501_set_to_wla(
this, this->tx_buffer_tail,
341 this->tx_buffer_cnt++;
342 wl3501_get_from_wla(
this, ptr, &next,
sizeof(next));
343 this->tx_buffer_tail =
ptr;
348 static int wl3501_esbq_req_test(
struct wl3501_card *
this)
352 wl3501_get_from_wla(
this, this->esbq_req_head + 3, &tmp,
sizeof(tmp));
360 wl3501_set_to_wla(
this, this->esbq_req_head, ptr, 2);
361 wl3501_set_to_wla(
this, this->esbq_req_head + 2, &tmp,
sizeof(tmp));
362 this->esbq_req_head += 4;
363 if (this->esbq_req_head >= this->esbq_req_end)
364 this->esbq_req_head = this->esbq_req_start;
367 static int wl3501_esbq_exec(
struct wl3501_card *
this,
void *
sig,
int sig_size)
371 if (wl3501_esbq_req_test(
this)) {
372 u16 ptr = wl3501_get_tx_buffer(
this, sig_size);
374 wl3501_set_to_wla(
this, ptr, sig, sig_size);
375 wl3501_esbq_req(
this, &ptr);
393 if (wl3501_esbq_req_test(
this)) {
394 u16 ptr = wl3501_get_tx_buffer(
this,
sizeof(sig));
396 wl3501_set_to_wla(
this, ptr, &sig,
sizeof(sig));
397 wl3501_esbq_req(
this, &ptr);
398 this->sig_get_confirm.mib_status = 255;
399 spin_unlock_irqrestore(&this->lock, flags);
401 this->sig_get_confirm.mib_status != 255);
403 memcpy(bf, this->sig_get_confirm.mib_value,
408 spin_unlock_irqrestore(&this->lock, flags);
425 if (wl3501_esbq_req_test(
this)) {
426 u16 ptr = wl3501_get_tx_buffer(
this,
sizeof(sig));
428 wl3501_set_to_wla(
this, ptr, &sig,
sizeof(sig));
429 wl3501_esbq_req(
this, &ptr);
430 this->sig_pwr_mgmt_confirm.status = 255;
431 spin_unlock_irqrestore(&this->lock, flags);
433 this->sig_pwr_mgmt_confirm.status != 255);
435 suspend ?
"suspend" :
"resume",
436 this->sig_pwr_mgmt_confirm.status);
440 spin_unlock_irqrestore(&this->lock, flags);
464 if (wl3501_esbq_req_test(
this)) {
465 sig_bf = wl3501_get_tx_buffer(
this,
sizeof(sig));
469 bf = wl3501_get_tx_buffer(
this, len + 26 + 24);
472 wl3501_free_tx_buffer(
this, sig_bf);
480 if (((*pdata) * 256 + (*(pdata + 1))) > 1500) {
482 [0] = 0xAA, [1] = 0xAA, [2] = 0x03, [4] = 0x00,
485 wl3501_set_to_wla(
this, bf + 2 +
487 addr4,
sizeof(addr4));
488 sig.
size = pktlen + 24 + 4 + 6;
496 wl3501_set_to_wla(
this,
500 wl3501_get_from_wla(
this, bf, &next,
sizeof(next));
503 sig.
size = pktlen + 24 + 4 - 2;
513 wl3501_set_to_wla(
this, bf + 2 +
517 wl3501_get_from_wla(
this, bf, &next,
sizeof(next));
528 wl3501_set_to_wla(
this, bf + 2, pdata, tmplen);
530 wl3501_get_from_wla(
this, bf, &next,
sizeof(next));
533 wl3501_set_to_wla(
this, sig_bf, &sig,
sizeof(sig));
534 wl3501_esbq_req(
this, &sig_bf);
540 static int wl3501_mgmt_resync(
struct wl3501_card *
this)
546 return wl3501_esbq_exec(
this, &sig,
sizeof(sig));
549 static inline int wl3501_fw_bss_type(
struct wl3501_card *
this)
555 static inline int wl3501_fw_cap_info(
struct wl3501_card *
this)
561 static int wl3501_mgmt_scan(
struct wl3501_card *
this,
u16 chan_time)
567 .min_chan_time = chan_time,
568 .max_chan_time = chan_time,
569 .bss_type = wl3501_fw_bss_type(
this),
572 this->bss_cnt = this->join_sta_bss = 0;
573 return wl3501_esbq_exec(
this, &sig,
sizeof(sig));
591 return wl3501_esbq_exec(
this, &sig,
sizeof(sig));
594 static int wl3501_mgmt_start(
struct wl3501_card *
this)
598 .beacon_period = 400,
612 .data_rate_labels = {
619 .operational_rset = {
624 .data_rate_labels = {
638 .bss_type = wl3501_fw_bss_type(
this),
639 .cap_info = wl3501_fw_cap_info(
this),
642 iw_copy_mgmt_info_element(&sig.
ssid.el, &this->essid.el);
643 iw_copy_mgmt_info_element(&this->keep_essid.el, &this->essid.el);
644 return wl3501_esbq_exec(
this, &sig,
sizeof(sig));
654 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
662 if (!this->essid.el.len)
664 else if (this->essid.el.len == 3 &&
665 !
memcmp(this->essid.essid,
"ANY", 3))
667 else if (this->essid.el.len != sig.
ssid.el.len)
669 else if (
memcmp(this->essid.essid, sig.
ssid.essid,
675 for (i = 0; i < this->bss_cnt; i++) {
683 if (matchflag && (i < 20)) {
687 this->
rssi = sig.rssi;
692 this->join_sta_bss = 0;
693 for (i = this->join_sta_bss; i < this->bss_cnt; i++)
694 if (!wl3501_mgmt_join(
this, i))
696 this->join_sta_bss =
i;
697 if (this->join_sta_bss == this->bss_cnt) {
699 wl3501_mgmt_scan(
this, 100);
703 wl3501_mgmt_start(
this);
705 wl3501_mgmt_scan(
this, 100);
718 static int wl3501_block_interrupt(
struct wl3501_card *
this)
735 static int wl3501_unblock_interrupt(
struct wl3501_card *
this)
756 u16 next_addr, next_addr1;
760 wl3501_get_from_wla(
this, this->start_seg + 2,
761 &next_addr,
sizeof(next_addr));
763 wl3501_get_from_wla(
this,
771 wl3501_get_from_wla(
this,
779 wl3501_get_from_wla(
this, next_addr + 5, data,
783 wl3501_get_from_wla(
this, next_addr + 2, &next_addr1,
785 next_addr = next_addr1;
787 wl3501_get_from_wla(
this, next_addr + 5, data, size);
794 static void wl3501_esbq_req_free(
struct wl3501_card *
this)
799 if (this->esbq_req_head == this->esbq_req_tail)
801 wl3501_get_from_wla(
this, this->esbq_req_tail + 3, &tmp,
sizeof(tmp));
804 wl3501_get_from_wla(
this, this->esbq_req_tail, &addr,
sizeof(addr));
805 wl3501_free_tx_buffer(
this, addr);
806 this->esbq_req_tail += 4;
807 if (this->esbq_req_tail >= this->esbq_req_end)
808 this->esbq_req_tail = this->esbq_req_start;
813 static int wl3501_esbq_confirm(
struct wl3501_card *
this)
817 wl3501_get_from_wla(
this, this->esbq_confirm + 3, &tmp,
sizeof(tmp));
826 dev->
name, this->bssid);
827 netif_wake_queue(dev);
830 static void wl3501_esbq_confirm_done(
struct wl3501_card *
this)
834 wl3501_set_to_wla(
this, this->
esbq_confirm + 3, &tmp,
sizeof(tmp));
840 static int wl3501_mgmt_auth(
struct wl3501_card *
this)
850 return wl3501_esbq_exec(
this, &sig,
sizeof(sig));
853 static int wl3501_mgmt_association(
struct wl3501_card *
this)
858 .listen_interval = 5,
864 return wl3501_esbq_exec(
this, &sig,
sizeof(sig));
873 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
876 if (this->join_sta_bss < this->bss_cnt) {
877 const int i = this->join_sta_bss;
880 this->
chan = this->bss_set[
i].ds_pset.chan;
881 iw_copy_mgmt_info_element(&this->keep_essid.el,
882 &this->bss_set[i].ssid.el);
883 wl3501_mgmt_auth(
this);
886 const int i = this->join_sta_bss;
889 this->
chan = this->bss_set[
i].ds_pset.chan;
890 iw_copy_mgmt_info_element(&this->keep_essid.el,
891 &this->bss_set[i].ssid.el);
896 this->join_sta_bss++;
897 for (i = this->join_sta_bss; i < this->bss_cnt; i++)
898 if (!wl3501_mgmt_join(
this, i))
900 this->join_sta_bss =
i;
901 if (this->join_sta_bss == this->bss_cnt) {
903 wl3501_mgmt_scan(
this, 100);
907 wl3501_mgmt_start(
this);
909 wl3501_mgmt_scan(
this, 100);
915 static inline void wl3501_alarm_interrupt(
struct net_device *dev,
920 netif_stop_queue(dev);
921 wl3501_mgmt_resync(
this);
925 static inline void wl3501_md_confirm_interrupt(
struct net_device *dev,
932 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
933 wl3501_free_tx_buffer(
this, sig.data);
934 if (netif_queue_stopped(dev))
935 netif_wake_queue(dev);
938 static inline void wl3501_md_ind_interrupt(
struct net_device *dev,
946 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
947 this->start_seg = sig.data;
948 wl3501_get_from_wla(
this,
950 &rssi,
sizeof(rssi));
951 this->rssi = rssi <= 63 ? (rssi * 100) / 64 : 255;
953 wl3501_get_from_wla(
this,
956 &addr4,
sizeof(addr4));
957 if (!(addr4[0] == 0xAA && addr4[1] == 0xAA &&
958 addr4[2] == 0x03 && addr4[4] == 0x00)) {
962 pkt_len = sig.size + 12 - 24 - 4 - 6;
964 skb = dev_alloc_skb(pkt_len + 5);
969 dev->
stats.rx_dropped++;
973 skb_copy_to_linear_data(skb, (
unsigned char *)&sig.daddr, 12);
974 wl3501_receive(
this, skb->
data, pkt_len);
977 dev->
stats.rx_packets++;
983 static inline void wl3501_get_confirm_interrupt(
struct wl3501_card *
this,
984 u16 addr,
void *sig,
int size)
987 wl3501_get_from_wla(
this, addr, &this->sig_get_confirm,
988 sizeof(this->sig_get_confirm));
992 static inline void wl3501_start_confirm_interrupt(
struct net_device *dev,
999 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
1001 netif_wake_queue(dev);
1004 static inline void wl3501_assoc_confirm_interrupt(
struct net_device *dev,
1011 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
1017 static inline void wl3501_auth_confirm_interrupt(
struct wl3501_card *
this,
1023 wl3501_get_from_wla(
this, addr, &sig,
sizeof(sig));
1026 wl3501_mgmt_association(
this);
1028 wl3501_mgmt_resync(
this);
1031 static inline void wl3501_rx_interrupt(
struct net_device *dev)
1041 if (!wl3501_esbq_confirm(
this))
1043 wl3501_get_from_wla(
this, this->
esbq_confirm, &addr,
sizeof(addr));
1044 wl3501_get_from_wla(
this, addr + 2, &sig_id,
sizeof(sig_id));
1050 wl3501_alarm_interrupt(dev,
this);
1053 wl3501_md_confirm_interrupt(dev,
this, addr);
1056 wl3501_md_ind_interrupt(dev,
this, addr);
1059 wl3501_get_confirm_interrupt(
this, addr,
1064 wl3501_get_confirm_interrupt(
this, addr,
1069 wl3501_start_confirm_interrupt(dev,
this, addr);
1072 wl3501_mgmt_scan_confirm(
this, addr);
1075 wl3501_mgmt_join_confirm(dev, addr);
1078 wl3501_assoc_confirm_interrupt(dev, addr);
1081 wl3501_auth_confirm_interrupt(
this, addr);
1084 wl3501_mgmt_resync(
this);
1087 wl3501_esbq_confirm_done(
this);
1091 wl3501_esbq_req_free(
this);
1096 static inline void wl3501_ack_interrupt(
struct wl3501_card *
this)
1118 this = netdev_priv(dev);
1119 spin_lock(&this->
lock);
1120 wl3501_ack_interrupt(
this);
1121 wl3501_block_interrupt(
this);
1122 wl3501_rx_interrupt(dev);
1123 wl3501_unblock_interrupt(
this);
1124 spin_unlock(&this->
lock);
1129 static int wl3501_reset_board(
struct wl3501_card *
this)
1140 wl3501_set_to_wla(
this, 0x480, &tmp,
sizeof(tmp));
1147 wl3501_unblock_interrupt(
this);
1150 for (i = 0; i < 10000; i++) {
1151 wl3501_get_from_wla(
this, 0x480, &tmp,
sizeof(tmp));
1156 wl3501_set_to_wla(
this, 0x480, &tmp,
sizeof(tmp));
1167 static int wl3501_init_firmware(
struct wl3501_card *
this)
1170 int rc = wl3501_reset_board(
this);
1175 wl3501_get_from_wla(
this, 0x1a00,
1179 wl3501_get_from_wla(
this, 0x1a40,
1180 this->firmware_date,
sizeof(this->firmware_date));
1181 this->firmware_date[
sizeof(this->
firmware_date) - 1] =
'\0';
1186 wl3501_get_from_wla(
this, 0x486, &this->
esbq_req_end, 2);
1201 wl3501_set_to_wla(
this, ptr, &next,
sizeof(next));
1207 wl3501_set_to_wla(
this, ptr, &next,
sizeof(next));
1216 static int wl3501_close(
struct net_device *dev)
1220 unsigned long flags;
1221 struct pcmcia_device *
link;
1228 netif_stop_queue(dev);
1229 wl3501_ack_interrupt(
this);
1232 wl3501_block_interrupt(
this);
1236 spin_unlock_irqrestore(&this->lock, flags);
1248 static int wl3501_reset(
struct net_device *dev)
1253 wl3501_block_interrupt(
this);
1255 if (wl3501_init_firmware(
this)) {
1266 netif_stop_queue(dev);
1268 wl3501_ack_interrupt(
this);
1269 wl3501_unblock_interrupt(
this);
1270 wl3501_mgmt_scan(
this, 100);
1277 static void wl3501_tx_timeout(
struct net_device *dev)
1281 unsigned long flags;
1286 rc = wl3501_reset(dev);
1287 spin_unlock_irqrestore(&this->lock, flags);
1293 netif_wake_queue(dev);
1307 unsigned long flags;
1310 enabled = wl3501_block_interrupt(
this);
1311 rc = wl3501_send_pkt(
this, skb->
data, skb->
len);
1313 wl3501_unblock_interrupt(
this);
1315 ++dev->
stats.tx_dropped;
1316 netif_stop_queue(dev);
1318 ++dev->
stats.tx_packets;
1323 netif_stop_queue(dev);
1325 spin_unlock_irqrestore(&this->
lock, flags);
1329 static int wl3501_open(
struct net_device *dev)
1333 unsigned long flags;
1334 struct pcmcia_device *
link;
1344 pr_debug(
"%s: Initialize WL3501 firmware...", dev->
name);
1345 if (wl3501_init_firmware(
this))
1348 this->adhoc_times = 0;
1350 wl3501_ack_interrupt(
this);
1353 wl3501_unblock_interrupt(
this);
1354 wl3501_mgmt_scan(
this, 100);
1358 "%s: Firmware Date: %s\n",
1359 dev->
name, this->card_name,
1360 dev->
name, this->firmware_date);
1362 spin_unlock_irqrestore(&this->lock, flags);
1375 memset(wstats, 0,
sizeof(*wstats));
1376 wstats->
status = netif_running(dev);
1378 &value,
sizeof(value)))
1381 &value,
sizeof(value)))
1384 &value,
sizeof(value)))
1387 &value,
sizeof(value)))
1390 &value,
sizeof(value)))
1393 &value,
sizeof(value)))
1396 &value,
sizeof(value)))
1399 &value,
sizeof(value)))
1412 static void wl3501_detach(
struct pcmcia_device *link)
1420 while (link->open > 0)
1424 wl3501_release(link);
1443 int channel = wrqu->
freq.m;
1446 if (iw_valid_channel(this->reg_domain, channel)) {
1448 rc = wl3501_reset(dev);
1458 wrqu->
freq.m = ieee80211_dsss_chan_to_freq(this->
chan) * 100000;
1474 rc = wl3501_reset(dev);
1494 wrqu->
sens.disabled = !wrqu->
sens.value;
1495 wrqu->
sens.fixed = 1;
1499 static int wl3501_get_range(
struct net_device *dev,
1506 wrqu->
data.length =
sizeof(*range);
1509 memset(range, 0,
sizeof(*range));
1528 if (is_broadcast_ether_addr(wrqu->
ap_addr.sa_data)) {
1554 return wl3501_reset(dev);
1562 char *current_ev =
extra;
1565 for (i = 0; i < this->bss_cnt; ++
i) {
1569 current_ev = iwe_stream_add_event(info, current_ev,
1573 iwe.u.data.flags = 1;
1574 iwe.u.data.length = this->bss_set[
i].ssid.el.len;
1575 current_ev = iwe_stream_add_point(info, current_ev,
1578 this->bss_set[i].
ssid.essid);
1580 iwe.u.mode = this->bss_set[
i].bss_type;
1581 current_ev = iwe_stream_add_event(info, current_ev,
1585 iwe.u.freq.m = this->bss_set[
i].ds_pset.chan;
1587 current_ev = iwe_stream_add_event(info, current_ev,
1595 iwe.u.data.length = 0;
1596 current_ev = iwe_stream_add_point(info, current_ev,
1601 wrqu->
data.length = (current_ev -
extra);
1602 wrqu->
data.flags = 0;
1606 static int wl3501_set_essid(
struct net_device *dev,
1612 if (wrqu->
data.flags) {
1615 extra, wrqu->
data.length);
1618 &this->
essid.el,
"ANY", 3);
1620 return wl3501_reset(dev);
1623 static int wl3501_get_essid(
struct net_device *dev,
1628 unsigned long flags;
1631 wrqu->
essid.flags = 1;
1633 memcpy(extra, this->
essid.essid, this->essid.el.len);
1634 spin_unlock_irqrestore(&this->
lock, flags);
1643 if (wrqu->
data.length >
sizeof(this->nick))
1667 wrqu->
bitrate.value = 2000000;
1672 static int wl3501_get_rts_threshold(
struct net_device *dev,
1679 &threshold,
sizeof(threshold));
1682 wrqu->
rts.disabled = threshold >= 2347;
1683 wrqu->
rts.fixed = 1;
1688 static int wl3501_get_frag_threshold(
struct net_device *dev,
1695 &threshold,
sizeof(threshold));
1698 wrqu->
frag.disabled = threshold >= 2346;
1699 wrqu->
frag.fixed = 1;
1704 static int wl3501_get_txpow(
struct net_device *dev,
1710 int rc = wl3501_get_mib_value(
this,
1712 &txpow,
sizeof(txpow));
1726 static int wl3501_get_retry(
struct net_device *dev,
1732 int rc = wl3501_get_mib_value(
this,
1734 &retry,
sizeof(retry));
1742 &retry,
sizeof(retry));
1748 wrqu->
retry.disabled = 0;
1753 static int wl3501_get_encode(
struct net_device *dev,
1757 u8 implemented, restricted,
keys[100], len_keys, tocopy;
1759 int rc = wl3501_get_mib_value(
this,
1761 &implemented,
sizeof(implemented));
1769 &restricted,
sizeof(restricted));
1775 &len_keys,
sizeof(len_keys));
1783 tocopy =
min_t(
u8, tocopy, 100);
1785 memcpy(extra, keys, tocopy);
1790 static int wl3501_get_power(
struct net_device *dev,
1796 int rc = wl3501_get_mib_value(
this,
1798 &pwr_state,
sizeof(pwr_state));
1801 wrqu->
power.disabled = !pwr_state;
1843 .ndo_open = wl3501_open,
1844 .ndo_stop = wl3501_close,
1845 .ndo_start_xmit = wl3501_hard_start_xmit,
1846 .ndo_tx_timeout = wl3501_tx_timeout,
1852 static int wl3501_probe(
struct pcmcia_device *p_dev)
1858 p_dev->resource[0]->end = 16;
1859 p_dev->resource[0]->flags = IO_DATA_PATH_WIDTH_8;
1862 p_dev->config_flags = CONF_ENABLE_IRQ;
1863 p_dev->config_index = 1;
1873 this = netdev_priv(dev);
1875 this->p_dev =
p_dev;
1877 dev->wireless_handlers = &wl3501_handler_def;
1878 netif_stop_queue(dev);
1881 return wl3501_config(p_dev);
1886 static int wl3501_config(
struct pcmcia_device *link)
1897 for (
j = 0x280;
j < 0x400;
j += 0x20) {
1900 link->resource[0]->start =
j;
1901 link->resource[1]->start = link->resource[0]->start + 0x10;
1920 dev->
irq = link->irq;
1921 dev->
base_addr = link->resource[0]->start;
1928 this = netdev_priv(dev);
1932 if (!wl3501_get_flash_mac_addr(
this)) {
1939 for (i = 0; i < 6; i++)
1940 dev->
dev_addr[i] = ((
char *)&this->mac_addr)[
i];
1944 "MAC addr in flash ROM:%pM\n",
1945 dev->
name, this->base_addr, (
int)dev->
irq,
1957 this->firmware_date[0] =
'\0';
1959 this->
chan = iw_default_channel(this->reg_domain);
1963 netif_start_queue(dev);
1967 wl3501_release(link);
1971 static void wl3501_release(
struct pcmcia_device *link)
1976 static int wl3501_suspend(
struct pcmcia_device *link)
1987 static int wl3501_resume(
struct pcmcia_device *link)
2002 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0001),
2007 static struct pcmcia_driver wl3501_driver = {
2009 .name =
"wl3501_cs",
2010 .probe = wl3501_probe,
2011 .remove = wl3501_detach,
2012 .id_table = wl3501_ids,
2013 .suspend = wl3501_suspend,
2014 .resume = wl3501_resume,
2017 static int __init wl3501_init_module(
void)
2022 static void __exit wl3501_exit_module(
void)