diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-05-25 13:05:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:40 -0400 |
commit | 634b8f49c11f49272b09d13a34b22a17b8c3d419 (patch) | |
tree | 75ccd1d8160390235ada42d1c311710534392a02 /drivers | |
parent | ec3eef28d9bc3fbcc5d3dd668dffcaa675015b11 (diff) |
[PATCH] libertas: remove unused variables in wlan_dev_t
Actually, this patch removev wlan_dev_t totally and puts the used variables
of it directly into wlan_private. That reduces one level of indirection and
looks a little bit simpler. It's now "priv->card" and not
"priv->wlan_dev.card" and "priv->dev" instead of "priv->wlan_dev.netdev"
Changed two occurences of "((wlan_private *) dev->priv)->wlan_dev.netdev"
into "dev", because I didn't see the point in doing pointer-ping-pong.
The variables "ioport", "upld_rcv" and "upld_type" where unused. They have
been removed.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/debugfs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 40 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_bootcmd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 46 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 64 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 12 |
11 files changed, 100 insertions, 112 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index c6e50195d65c..5aaeb91418b4 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1823,7 +1823,7 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str) | |||
1823 | lbs_deb_cmd("Event Indication String length = %d\n", iwrq.data.length); | 1823 | lbs_deb_cmd("Event Indication String length = %d\n", iwrq.data.length); |
1824 | 1824 | ||
1825 | lbs_deb_cmd("Sending wireless event IWEVCUSTOM for %s\n", str); | 1825 | lbs_deb_cmd("Sending wireless event IWEVCUSTOM for %s\n", str); |
1826 | wireless_send_event(priv->wlan_dev.netdev, IWEVCUSTOM, &iwrq, buf); | 1826 | wireless_send_event(priv->dev, IWEVCUSTOM, &iwrq, buf); |
1827 | 1827 | ||
1828 | lbs_deb_leave(LBS_DEB_CMD); | 1828 | lbs_deb_leave(LBS_DEB_CMD); |
1829 | } | 1829 | } |
@@ -1842,7 +1842,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size) | |||
1842 | lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size); | 1842 | lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size); |
1843 | 1843 | ||
1844 | ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size); | 1844 | ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size); |
1845 | priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED; | 1845 | priv->dnld_sent = DNLD_RES_RECEIVED; |
1846 | 1846 | ||
1847 | spin_lock_irqsave(&adapter->driver_lock, flags); | 1847 | spin_lock_irqsave(&adapter->driver_lock, flags); |
1848 | if (adapter->intcounter || adapter->currenttxskb) | 1848 | if (adapter->intcounter || adapter->currenttxskb) |
@@ -1926,7 +1926,7 @@ void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode) | |||
1926 | 1926 | ||
1927 | lbs_deb_enter(LBS_DEB_CMD); | 1927 | lbs_deb_enter(LBS_DEB_CMD); |
1928 | 1928 | ||
1929 | if (priv->wlan_dev.dnld_sent) { | 1929 | if (priv->dnld_sent) { |
1930 | allowed = 0; | 1930 | allowed = 0; |
1931 | lbs_deb_cmd("D"); | 1931 | lbs_deb_cmd("D"); |
1932 | } | 1932 | } |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 1efdc4beb7f0..45459d4ba684 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -42,15 +42,15 @@ void libertas_mac_event_disconnected(wlan_private * priv) | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | msleep_interruptible(1000); | 44 | msleep_interruptible(1000); |
45 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); | 45 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); |
46 | 46 | ||
47 | /* Free Tx and Rx packets */ | 47 | /* Free Tx and Rx packets */ |
48 | kfree_skb(priv->adapter->currenttxskb); | 48 | kfree_skb(priv->adapter->currenttxskb); |
49 | priv->adapter->currenttxskb = NULL; | 49 | priv->adapter->currenttxskb = NULL; |
50 | 50 | ||
51 | /* report disconnect to upper layer */ | 51 | /* report disconnect to upper layer */ |
52 | netif_stop_queue(priv->wlan_dev.netdev); | 52 | netif_stop_queue(priv->dev); |
53 | netif_carrier_off(priv->wlan_dev.netdev); | 53 | netif_carrier_off(priv->dev); |
54 | 54 | ||
55 | /* reset SNR/NF/RSSI values */ | 55 | /* reset SNR/NF/RSSI values */ |
56 | memset(adapter->SNR, 0x00, sizeof(adapter->SNR)); | 56 | memset(adapter->SNR, 0x00, sizeof(adapter->SNR)); |
@@ -218,7 +218,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv, | |||
218 | ETH_ALEN); | 218 | ETH_ALEN); |
219 | } | 219 | } |
220 | 220 | ||
221 | memcpy(priv->wlan_dev.netdev->dev_addr, adapter->current_addr, ETH_ALEN); | 221 | memcpy(priv->dev->dev_addr, adapter->current_addr, ETH_ALEN); |
222 | if (priv->mesh_dev) | 222 | if (priv->mesh_dev) |
223 | memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, | 223 | memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, |
224 | ETH_ALEN); | 224 | ETH_ALEN); |
@@ -774,14 +774,14 @@ int libertas_process_rx_command(wlan_private * priv) | |||
774 | resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr); | 774 | resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr); |
775 | 775 | ||
776 | lbs_dbg_hex("CMD_RESP:", adapter->cur_cmd->bufvirtualaddr, | 776 | lbs_dbg_hex("CMD_RESP:", adapter->cur_cmd->bufvirtualaddr, |
777 | priv->wlan_dev.upld_len); | 777 | priv->upld_len); |
778 | 778 | ||
779 | respcmd = le16_to_cpu(resp->command); | 779 | respcmd = le16_to_cpu(resp->command); |
780 | 780 | ||
781 | result = le16_to_cpu(resp->result); | 781 | result = le16_to_cpu(resp->result); |
782 | 782 | ||
783 | lbs_deb_cmd("CMD_RESP: %x result: %d length: %d\n", respcmd, | 783 | lbs_deb_cmd("CMD_RESP: %x result: %d length: %d\n", respcmd, |
784 | result, priv->wlan_dev.upld_len); | 784 | result, priv->upld_len); |
785 | 785 | ||
786 | if (!(respcmd & 0x8000)) { | 786 | if (!(respcmd & 0x8000)) { |
787 | lbs_deb_cmd("Invalid response to command!"); | 787 | lbs_deb_cmd("Invalid response to command!"); |
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index eb1cee42ccef..8720abb3a27e 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c | |||
@@ -197,7 +197,7 @@ static ssize_t libertas_extscan(struct file *file, const char __user *userbuf, | |||
197 | libertas_send_specific_SSID_scan(priv, &extscan_ssid, 1); | 197 | libertas_send_specific_SSID_scan(priv, &extscan_ssid, 1); |
198 | 198 | ||
199 | memset(&wrqu, 0, sizeof(union iwreq_data)); | 199 | memset(&wrqu, 0, sizeof(union iwreq_data)); |
200 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWSCAN, &wrqu, NULL); | 200 | wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); |
201 | 201 | ||
202 | out_unlock: | 202 | out_unlock: |
203 | free_page(addr); | 203 | free_page(addr); |
@@ -387,7 +387,7 @@ static ssize_t libertas_setuserscan(struct file *file, | |||
387 | !priv->adapter->nr_cmd_pending); | 387 | !priv->adapter->nr_cmd_pending); |
388 | 388 | ||
389 | memset(&wrqu, 0x00, sizeof(union iwreq_data)); | 389 | memset(&wrqu, 0x00, sizeof(union iwreq_data)); |
390 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWSCAN, &wrqu, NULL); | 390 | wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); |
391 | 391 | ||
392 | out_unlock: | 392 | out_unlock: |
393 | free_page(addr); | 393 | free_page(addr); |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 32e2077617bb..c43aa10f1a8b 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -89,31 +89,6 @@ struct sleep_params { | |||
89 | u16 sp_reserved; | 89 | u16 sp_reserved; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | /** Data structure for the Marvell WLAN device */ | ||
93 | typedef struct _wlan_dev { | ||
94 | /** device name */ | ||
95 | char name[DEV_NAME_LEN]; | ||
96 | /** card pointer */ | ||
97 | void *card; | ||
98 | /** IO port */ | ||
99 | u32 ioport; | ||
100 | /** Upload received */ | ||
101 | u32 upld_rcv; | ||
102 | /** Upload type */ | ||
103 | u32 upld_typ; | ||
104 | /** Upload length */ | ||
105 | u32 upld_len; | ||
106 | /** netdev pointer */ | ||
107 | struct net_device *netdev; | ||
108 | /* Upload buffer */ | ||
109 | u8 upld_buf[WLAN_UPLD_SIZE]; | ||
110 | /* Download sent: | ||
111 | bit0 1/0=data_sent/data_tx_done, | ||
112 | bit1 1/0=cmd_sent/cmd_tx_done, | ||
113 | all other bits reserved 0 */ | ||
114 | u8 dnld_sent; | ||
115 | } wlan_dev_t, *pwlan_dev_t; | ||
116 | |||
117 | /* Mesh statistics */ | 92 | /* Mesh statistics */ |
118 | struct wlan_mesh_stats { | 93 | struct wlan_mesh_stats { |
119 | u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */ | 94 | u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */ |
@@ -132,8 +107,11 @@ struct _wlan_private { | |||
132 | int mesh_open; | 107 | int mesh_open; |
133 | int infra_open; | 108 | int infra_open; |
134 | 109 | ||
110 | char name[DEV_NAME_LEN]; | ||
111 | |||
112 | void *card; | ||
135 | wlan_adapter *adapter; | 113 | wlan_adapter *adapter; |
136 | wlan_dev_t wlan_dev; | 114 | struct net_device *dev; |
137 | 115 | ||
138 | struct net_device_stats stats; | 116 | struct net_device_stats stats; |
139 | struct net_device *mesh_dev ; /* Virtual device */ | 117 | struct net_device *mesh_dev ; /* Virtual device */ |
@@ -154,6 +132,16 @@ struct _wlan_private { | |||
154 | u32 bbp_offset; | 132 | u32 bbp_offset; |
155 | u32 rf_offset; | 133 | u32 rf_offset; |
156 | 134 | ||
135 | /** Upload length */ | ||
136 | u32 upld_len; | ||
137 | /* Upload buffer */ | ||
138 | u8 upld_buf[WLAN_UPLD_SIZE]; | ||
139 | /* Download sent: | ||
140 | bit0 1/0=data_sent/data_tx_done, | ||
141 | bit1 1/0=cmd_sent/cmd_tx_done, | ||
142 | all other bits reserved 0 */ | ||
143 | u8 dnld_sent; | ||
144 | |||
157 | const struct firmware *firmware; | 145 | const struct firmware *firmware; |
158 | struct device *hotplug_device; | 146 | struct device *hotplug_device; |
159 | 147 | ||
diff --git a/drivers/net/wireless/libertas/if_bootcmd.c b/drivers/net/wireless/libertas/if_bootcmd.c index c65e9f445c00..70397a3eec7f 100644 --- a/drivers/net/wireless/libertas/if_bootcmd.c +++ b/drivers/net/wireless/libertas/if_bootcmd.c | |||
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | int if_usb_issue_boot_command(wlan_private *priv, int ivalue) | 23 | int if_usb_issue_boot_command(wlan_private *priv, int ivalue) |
24 | { | 24 | { |
25 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 25 | struct usb_card_rec *cardp = priv->card; |
26 | struct bootcmdstr sbootcmd; | 26 | struct bootcmdstr sbootcmd; |
27 | int i; | 27 | int i; |
28 | 28 | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index d87915dbe827..ad28ecc92285 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -61,7 +61,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) | |||
61 | { | 61 | { |
62 | wlan_private *priv = (wlan_private *) (urb->context); | 62 | wlan_private *priv = (wlan_private *) (urb->context); |
63 | wlan_adapter *adapter = priv->adapter; | 63 | wlan_adapter *adapter = priv->adapter; |
64 | struct net_device *dev = priv->wlan_dev.netdev; | 64 | struct net_device *dev = priv->dev; |
65 | 65 | ||
66 | /* handle the transmission complete validations */ | 66 | /* handle the transmission complete validations */ |
67 | 67 | ||
@@ -74,7 +74,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) | |||
74 | lbs_deb_usbd(&urb->dev->dev, "Actual length transmitted %d\n", | 74 | lbs_deb_usbd(&urb->dev->dev, "Actual length transmitted %d\n", |
75 | urb->actual_length); | 75 | urb->actual_length); |
76 | */ | 76 | */ |
77 | priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED; | 77 | priv->dnld_sent = DNLD_RES_RECEIVED; |
78 | /* Wake main thread if commands are pending */ | 78 | /* Wake main thread if commands are pending */ |
79 | if (!adapter->cur_cmd) | 79 | if (!adapter->cur_cmd) |
80 | wake_up_interruptible(&priv->mainthread.waitq); | 80 | wake_up_interruptible(&priv->mainthread.waitq); |
@@ -239,7 +239,7 @@ err_activate_card: | |||
239 | unregister_netdev(priv->mesh_dev); | 239 | unregister_netdev(priv->mesh_dev); |
240 | free_netdev(priv->mesh_dev); | 240 | free_netdev(priv->mesh_dev); |
241 | err_add_mesh: | 241 | err_add_mesh: |
242 | free_netdev(priv->wlan_dev.netdev); | 242 | free_netdev(priv->dev); |
243 | kfree(priv->adapter); | 243 | kfree(priv->adapter); |
244 | dealloc: | 244 | dealloc: |
245 | if_usb_free(cardp); | 245 | if_usb_free(cardp); |
@@ -289,7 +289,7 @@ static void if_usb_disconnect(struct usb_interface *intf) | |||
289 | */ | 289 | */ |
290 | static int if_prog_firmware(wlan_private * priv) | 290 | static int if_prog_firmware(wlan_private * priv) |
291 | { | 291 | { |
292 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 292 | struct usb_card_rec *cardp = priv->card; |
293 | struct FWData *fwdata; | 293 | struct FWData *fwdata; |
294 | struct fwheader *fwheader; | 294 | struct fwheader *fwheader; |
295 | u8 *firmware = priv->firmware->data; | 295 | u8 *firmware = priv->firmware->data; |
@@ -368,7 +368,7 @@ static int if_prog_firmware(wlan_private * priv) | |||
368 | static int libertas_do_reset(wlan_private *priv) | 368 | static int libertas_do_reset(wlan_private *priv) |
369 | { | 369 | { |
370 | int ret; | 370 | int ret; |
371 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 371 | struct usb_card_rec *cardp = priv->card; |
372 | 372 | ||
373 | lbs_deb_enter(LBS_DEB_USB); | 373 | lbs_deb_enter(LBS_DEB_USB); |
374 | 374 | ||
@@ -394,7 +394,7 @@ static int libertas_do_reset(wlan_private *priv) | |||
394 | int usb_tx_block(wlan_private * priv, u8 * payload, u16 nb) | 394 | int usb_tx_block(wlan_private * priv, u8 * payload, u16 nb) |
395 | { | 395 | { |
396 | /* pointer to card structure */ | 396 | /* pointer to card structure */ |
397 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 397 | struct usb_card_rec *cardp = priv->card; |
398 | int ret = -1; | 398 | int ret = -1; |
399 | 399 | ||
400 | /* check if device is removed */ | 400 | /* check if device is removed */ |
@@ -427,7 +427,7 @@ static int __if_usb_submit_rx_urb(wlan_private * priv, | |||
427 | void (*callbackfn) | 427 | void (*callbackfn) |
428 | (struct urb *urb)) | 428 | (struct urb *urb)) |
429 | { | 429 | { |
430 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 430 | struct usb_card_rec *cardp = priv->card; |
431 | struct sk_buff *skb; | 431 | struct sk_buff *skb; |
432 | struct read_cb_info *rinfo = &cardp->rinfo; | 432 | struct read_cb_info *rinfo = &cardp->rinfo; |
433 | int ret = -1; | 433 | int ret = -1; |
@@ -478,7 +478,7 @@ static void if_usb_receive_fwload(struct urb *urb) | |||
478 | struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; | 478 | struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; |
479 | wlan_private *priv = rinfo->priv; | 479 | wlan_private *priv = rinfo->priv; |
480 | struct sk_buff *skb = rinfo->skb; | 480 | struct sk_buff *skb = rinfo->skb; |
481 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; | 481 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; |
482 | struct fwsyncheader *syncfwheader; | 482 | struct fwsyncheader *syncfwheader; |
483 | struct bootcmdrespStr bootcmdresp; | 483 | struct bootcmdrespStr bootcmdresp; |
484 | 484 | ||
@@ -582,7 +582,7 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, | |||
582 | skb_put(skb, recvlength); | 582 | skb_put(skb, recvlength); |
583 | skb_pull(skb, MESSAGE_HEADER_LEN); | 583 | skb_pull(skb, MESSAGE_HEADER_LEN); |
584 | libertas_process_rxed_packet(priv, skb); | 584 | libertas_process_rxed_packet(priv, skb); |
585 | priv->wlan_dev.upld_len = (recvlength - MESSAGE_HEADER_LEN); | 585 | priv->upld_len = (recvlength - MESSAGE_HEADER_LEN); |
586 | } | 586 | } |
587 | 587 | ||
588 | static inline void process_cmdrequest(int recvlength, u8 *recvbuff, | 588 | static inline void process_cmdrequest(int recvlength, u8 *recvbuff, |
@@ -605,18 +605,18 @@ static inline void process_cmdrequest(int recvlength, u8 *recvbuff, | |||
605 | /* take care of cur_cmd = NULL case by reading the | 605 | /* take care of cur_cmd = NULL case by reading the |
606 | * data to clear the interrupt */ | 606 | * data to clear the interrupt */ |
607 | if (!priv->adapter->cur_cmd) { | 607 | if (!priv->adapter->cur_cmd) { |
608 | cmdbuf = priv->wlan_dev.upld_buf; | 608 | cmdbuf = priv->upld_buf; |
609 | priv->adapter->hisregcpy &= ~his_cmdupldrdy; | 609 | priv->adapter->hisregcpy &= ~his_cmdupldrdy; |
610 | } else | 610 | } else |
611 | cmdbuf = priv->adapter->cur_cmd->bufvirtualaddr; | 611 | cmdbuf = priv->adapter->cur_cmd->bufvirtualaddr; |
612 | 612 | ||
613 | cardp->usb_int_cause |= his_cmdupldrdy; | 613 | cardp->usb_int_cause |= his_cmdupldrdy; |
614 | priv->wlan_dev.upld_len = (recvlength - MESSAGE_HEADER_LEN); | 614 | priv->upld_len = (recvlength - MESSAGE_HEADER_LEN); |
615 | memcpy(cmdbuf, recvbuff + MESSAGE_HEADER_LEN, | 615 | memcpy(cmdbuf, recvbuff + MESSAGE_HEADER_LEN, |
616 | priv->wlan_dev.upld_len); | 616 | priv->upld_len); |
617 | 617 | ||
618 | kfree_skb(skb); | 618 | kfree_skb(skb); |
619 | libertas_interrupt(priv->wlan_dev.netdev); | 619 | libertas_interrupt(priv->dev); |
620 | spin_unlock(&priv->adapter->driver_lock); | 620 | spin_unlock(&priv->adapter->driver_lock); |
621 | 621 | ||
622 | lbs_deb_usbd(&cardp->udev->dev, | 622 | lbs_deb_usbd(&cardp->udev->dev, |
@@ -637,7 +637,7 @@ static void if_usb_receive(struct urb *urb) | |||
637 | struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; | 637 | struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; |
638 | wlan_private *priv = rinfo->priv; | 638 | wlan_private *priv = rinfo->priv; |
639 | struct sk_buff *skb = rinfo->skb; | 639 | struct sk_buff *skb = rinfo->skb; |
640 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; | 640 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; |
641 | 641 | ||
642 | int recvlength = urb->actual_length; | 642 | int recvlength = urb->actual_length; |
643 | u8 *recvbuff = NULL; | 643 | u8 *recvbuff = NULL; |
@@ -689,7 +689,7 @@ static void if_usb_receive(struct urb *urb) | |||
689 | cardp->usb_event_cause = le32_to_cpu(cardp->usb_event_cause) << 3; | 689 | cardp->usb_event_cause = le32_to_cpu(cardp->usb_event_cause) << 3; |
690 | cardp->usb_int_cause |= his_cardevent; | 690 | cardp->usb_int_cause |= his_cardevent; |
691 | kfree_skb(skb); | 691 | kfree_skb(skb); |
692 | libertas_interrupt(priv->wlan_dev.netdev); | 692 | libertas_interrupt(priv->dev); |
693 | spin_unlock(&priv->adapter->driver_lock); | 693 | spin_unlock(&priv->adapter->driver_lock); |
694 | goto rx_exit; | 694 | goto rx_exit; |
695 | default: | 695 | default: |
@@ -715,20 +715,20 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n | |||
715 | { | 715 | { |
716 | int ret = -1; | 716 | int ret = -1; |
717 | u32 tmp; | 717 | u32 tmp; |
718 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; | 718 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; |
719 | 719 | ||
720 | lbs_deb_usbd(&cardp->udev->dev,"*** type = %u\n", type); | 720 | lbs_deb_usbd(&cardp->udev->dev,"*** type = %u\n", type); |
721 | lbs_deb_usbd(&cardp->udev->dev,"size after = %d\n", nb); | 721 | lbs_deb_usbd(&cardp->udev->dev,"size after = %d\n", nb); |
722 | 722 | ||
723 | if (type == MVMS_CMD) { | 723 | if (type == MVMS_CMD) { |
724 | tmp = cpu_to_le32(CMD_TYPE_REQUEST); | 724 | tmp = cpu_to_le32(CMD_TYPE_REQUEST); |
725 | priv->wlan_dev.dnld_sent = DNLD_CMD_SENT; | 725 | priv->dnld_sent = DNLD_CMD_SENT; |
726 | memcpy(cardp->bulk_out_buffer, (u8 *) & tmp, | 726 | memcpy(cardp->bulk_out_buffer, (u8 *) & tmp, |
727 | MESSAGE_HEADER_LEN); | 727 | MESSAGE_HEADER_LEN); |
728 | 728 | ||
729 | } else { | 729 | } else { |
730 | tmp = cpu_to_le32(CMD_TYPE_DATA); | 730 | tmp = cpu_to_le32(CMD_TYPE_DATA); |
731 | priv->wlan_dev.dnld_sent = DNLD_DATA_SENT; | 731 | priv->dnld_sent = DNLD_DATA_SENT; |
732 | memcpy(cardp->bulk_out_buffer, (u8 *) & tmp, | 732 | memcpy(cardp->bulk_out_buffer, (u8 *) & tmp, |
733 | MESSAGE_HEADER_LEN); | 733 | MESSAGE_HEADER_LEN); |
734 | } | 734 | } |
@@ -744,7 +744,7 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n | |||
744 | /* called with adapter->driver_lock held */ | 744 | /* called with adapter->driver_lock held */ |
745 | static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) | 745 | static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) |
746 | { | 746 | { |
747 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 747 | struct usb_card_rec *cardp = priv->card; |
748 | 748 | ||
749 | *ireg = cardp->usb_int_cause; | 749 | *ireg = cardp->usb_int_cause; |
750 | cardp->usb_int_cause = 0; | 750 | cardp->usb_int_cause = 0; |
@@ -756,7 +756,7 @@ static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) | |||
756 | 756 | ||
757 | static int if_usb_read_event_cause(wlan_private * priv) | 757 | static int if_usb_read_event_cause(wlan_private * priv) |
758 | { | 758 | { |
759 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 759 | struct usb_card_rec *cardp = priv->card; |
760 | priv->adapter->eventcause = cardp->usb_event_cause; | 760 | priv->adapter->eventcause = cardp->usb_event_cause; |
761 | /* Re-submit rx urb here to avoid event lost issue */ | 761 | /* Re-submit rx urb here to avoid event lost issue */ |
762 | if_usb_submit_rx_urb(priv); | 762 | if_usb_submit_rx_urb(priv); |
@@ -798,12 +798,12 @@ static int if_usb_unregister_dev(wlan_private * priv) | |||
798 | */ | 798 | */ |
799 | static int if_usb_register_dev(wlan_private * priv) | 799 | static int if_usb_register_dev(wlan_private * priv) |
800 | { | 800 | { |
801 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; | 801 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; |
802 | 802 | ||
803 | lbs_deb_enter(LBS_DEB_USB); | 803 | lbs_deb_enter(LBS_DEB_USB); |
804 | 804 | ||
805 | cardp->priv = priv; | 805 | cardp->priv = priv; |
806 | cardp->eth_dev = priv->wlan_dev.netdev; | 806 | cardp->eth_dev = priv->dev; |
807 | priv->hotplug_device = &(cardp->udev->dev); | 807 | priv->hotplug_device = &(cardp->udev->dev); |
808 | 808 | ||
809 | SET_NETDEV_DEV(cardp->eth_dev, &(cardp->udev->dev)); | 809 | SET_NETDEV_DEV(cardp->eth_dev, &(cardp->udev->dev)); |
@@ -820,7 +820,7 @@ static int if_usb_register_dev(wlan_private * priv) | |||
820 | 820 | ||
821 | static int if_usb_prog_firmware(wlan_private * priv) | 821 | static int if_usb_prog_firmware(wlan_private * priv) |
822 | { | 822 | { |
823 | struct usb_card_rec *cardp = priv->wlan_dev.card; | 823 | struct usb_card_rec *cardp = priv->card; |
824 | int i = 0; | 824 | int i = 0; |
825 | static int reset_count = 10; | 825 | static int reset_count = 10; |
826 | int ret = 0; | 826 | int ret = 0; |
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index 0edce849e4ad..8c578ec452e4 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -804,8 +804,8 @@ int libertas_ret_80211_associate(wlan_private * priv, | |||
804 | adapter->nextSNRNF = 0; | 804 | adapter->nextSNRNF = 0; |
805 | adapter->numSNRNF = 0; | 805 | adapter->numSNRNF = 0; |
806 | 806 | ||
807 | netif_carrier_on(priv->wlan_dev.netdev); | 807 | netif_carrier_on(priv->dev); |
808 | netif_wake_queue(priv->wlan_dev.netdev); | 808 | netif_wake_queue(priv->dev); |
809 | 809 | ||
810 | netif_carrier_on(priv->mesh_dev); | 810 | netif_carrier_on(priv->mesh_dev); |
811 | netif_wake_queue(priv->mesh_dev); | 811 | netif_wake_queue(priv->mesh_dev); |
@@ -814,7 +814,7 @@ int libertas_ret_80211_associate(wlan_private * priv, | |||
814 | 814 | ||
815 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); | 815 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); |
816 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 816 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
817 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); | 817 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); |
818 | 818 | ||
819 | done: | 819 | done: |
820 | lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); | 820 | lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); |
@@ -899,8 +899,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv, | |||
899 | memcpy(&adapter->curbssparams.ssid, | 899 | memcpy(&adapter->curbssparams.ssid, |
900 | &pbssdesc->ssid, sizeof(struct WLAN_802_11_SSID)); | 900 | &pbssdesc->ssid, sizeof(struct WLAN_802_11_SSID)); |
901 | 901 | ||
902 | netif_carrier_on(priv->wlan_dev.netdev); | 902 | netif_carrier_on(priv->dev); |
903 | netif_wake_queue(priv->wlan_dev.netdev); | 903 | netif_wake_queue(priv->dev); |
904 | 904 | ||
905 | netif_carrier_on(priv->mesh_dev); | 905 | netif_carrier_on(priv->mesh_dev); |
906 | netif_wake_queue(priv->mesh_dev); | 906 | netif_wake_queue(priv->mesh_dev); |
@@ -908,7 +908,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv, | |||
908 | memset(&wrqu, 0, sizeof(wrqu)); | 908 | memset(&wrqu, 0, sizeof(wrqu)); |
909 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); | 909 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); |
910 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 910 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
911 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); | 911 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); |
912 | 912 | ||
913 | lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n"); | 913 | lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n"); |
914 | lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->adhocchannel); | 914 | lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->adhocchannel); |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 8c1f0e1e890c..5e0fc8b72d7a 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -261,10 +261,10 @@ static int wlan_dev_open(struct net_device *dev) | |||
261 | priv->open = 1; | 261 | priv->open = 1; |
262 | 262 | ||
263 | if (adapter->connect_status == libertas_connected) { | 263 | if (adapter->connect_status == libertas_connected) { |
264 | netif_carrier_on(priv->wlan_dev.netdev); | 264 | netif_carrier_on(priv->dev); |
265 | netif_carrier_on(priv->mesh_dev); | 265 | netif_carrier_on(priv->mesh_dev); |
266 | } else { | 266 | } else { |
267 | netif_carrier_off(priv->wlan_dev.netdev); | 267 | netif_carrier_off(priv->dev); |
268 | netif_carrier_off(priv->mesh_dev); | 268 | netif_carrier_off(priv->mesh_dev); |
269 | } | 269 | } |
270 | 270 | ||
@@ -286,7 +286,7 @@ static int mesh_open(struct net_device *dev) | |||
286 | priv->mesh_open = 1 ; | 286 | priv->mesh_open = 1 ; |
287 | netif_wake_queue(priv->mesh_dev); | 287 | netif_wake_queue(priv->mesh_dev); |
288 | if (priv->infra_open == 0) | 288 | if (priv->infra_open == 0) |
289 | return wlan_dev_open(priv->wlan_dev.netdev) ; | 289 | return wlan_dev_open(priv->dev) ; |
290 | return 0; | 290 | return 0; |
291 | } | 291 | } |
292 | 292 | ||
@@ -303,9 +303,9 @@ static int wlan_open(struct net_device *dev) | |||
303 | if(pre_open_check(dev) == -1) | 303 | if(pre_open_check(dev) == -1) |
304 | return -1; | 304 | return -1; |
305 | priv->infra_open = 1 ; | 305 | priv->infra_open = 1 ; |
306 | netif_wake_queue(priv->wlan_dev.netdev); | 306 | netif_wake_queue(priv->dev); |
307 | if (priv->open == 0) | 307 | if (priv->open == 0) |
308 | return wlan_dev_open(priv->wlan_dev.netdev) ; | 308 | return wlan_dev_open(priv->dev) ; |
309 | return 0; | 309 | return 0; |
310 | } | 310 | } |
311 | 311 | ||
@@ -315,7 +315,7 @@ static int wlan_dev_close(struct net_device *dev) | |||
315 | 315 | ||
316 | lbs_deb_enter(LBS_DEB_NET); | 316 | lbs_deb_enter(LBS_DEB_NET); |
317 | 317 | ||
318 | netif_carrier_off(priv->wlan_dev.netdev); | 318 | netif_carrier_off(priv->dev); |
319 | netif_carrier_off(priv->mesh_dev); | 319 | netif_carrier_off(priv->mesh_dev); |
320 | priv->open = 0; | 320 | priv->open = 0; |
321 | 321 | ||
@@ -336,7 +336,7 @@ static int mesh_close(struct net_device *dev) | |||
336 | priv->mesh_open = 0; | 336 | priv->mesh_open = 0; |
337 | netif_stop_queue(priv->mesh_dev); | 337 | netif_stop_queue(priv->mesh_dev); |
338 | if (priv->infra_open == 0) | 338 | if (priv->infra_open == 0) |
339 | return wlan_dev_close( ((wlan_private *) dev->priv)->wlan_dev.netdev) ; | 339 | return wlan_dev_close(dev); |
340 | else | 340 | else |
341 | return 0; | 341 | return 0; |
342 | } | 342 | } |
@@ -351,10 +351,10 @@ static int wlan_close(struct net_device *dev) | |||
351 | { | 351 | { |
352 | wlan_private *priv = (wlan_private *) dev->priv; | 352 | wlan_private *priv = (wlan_private *) dev->priv; |
353 | 353 | ||
354 | netif_stop_queue(priv->wlan_dev.netdev); | 354 | netif_stop_queue(dev); |
355 | priv->infra_open = 0; | 355 | priv->infra_open = 0; |
356 | if (priv->mesh_open == 0) | 356 | if (priv->mesh_open == 0) |
357 | return wlan_dev_close( ((wlan_private *) dev->priv)->wlan_dev.netdev) ; | 357 | return wlan_dev_close(dev); |
358 | else | 358 | else |
359 | return 0; | 359 | return 0; |
360 | } | 360 | } |
@@ -367,12 +367,12 @@ static int wlan_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
367 | 367 | ||
368 | lbs_deb_enter(LBS_DEB_NET); | 368 | lbs_deb_enter(LBS_DEB_NET); |
369 | 369 | ||
370 | if (priv->wlan_dev.dnld_sent || priv->adapter->TxLockFlag) { | 370 | if (priv->dnld_sent || priv->adapter->TxLockFlag) { |
371 | priv->stats.tx_dropped++; | 371 | priv->stats.tx_dropped++; |
372 | goto done; | 372 | goto done; |
373 | } | 373 | } |
374 | 374 | ||
375 | netif_stop_queue(priv->wlan_dev.netdev); | 375 | netif_stop_queue(priv->dev); |
376 | netif_stop_queue(priv->mesh_dev); | 376 | netif_stop_queue(priv->mesh_dev); |
377 | 377 | ||
378 | if (libertas_process_tx(priv, skb) == 0) | 378 | if (libertas_process_tx(priv, skb) == 0) |
@@ -395,7 +395,7 @@ static int mesh_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
395 | 395 | ||
396 | SET_MESH_FRAME(skb); | 396 | SET_MESH_FRAME(skb); |
397 | 397 | ||
398 | ret = wlan_hard_start_xmit(skb, priv->wlan_dev.netdev); | 398 | ret = wlan_hard_start_xmit(skb, priv->dev); |
399 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); | 399 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); |
400 | return ret; | 400 | return ret; |
401 | } | 401 | } |
@@ -425,7 +425,7 @@ static void wlan_tx_timeout(struct net_device *dev) | |||
425 | 425 | ||
426 | lbs_pr_err("tx watch dog timeout\n"); | 426 | lbs_pr_err("tx watch dog timeout\n"); |
427 | 427 | ||
428 | priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED; | 428 | priv->dnld_sent = DNLD_RES_RECEIVED; |
429 | dev->trans_start = jiffies; | 429 | dev->trans_start = jiffies; |
430 | 430 | ||
431 | if (priv->adapter->currenttxskb) { | 431 | if (priv->adapter->currenttxskb) { |
@@ -437,7 +437,7 @@ static void wlan_tx_timeout(struct net_device *dev) | |||
437 | } else | 437 | } else |
438 | wake_up_interruptible(&priv->mainthread.waitq); | 438 | wake_up_interruptible(&priv->mainthread.waitq); |
439 | } else if (priv->adapter->connect_status == libertas_connected) { | 439 | } else if (priv->adapter->connect_status == libertas_connected) { |
440 | netif_wake_queue(priv->wlan_dev.netdev); | 440 | netif_wake_queue(priv->dev); |
441 | netif_wake_queue(priv->mesh_dev); | 441 | netif_wake_queue(priv->mesh_dev); |
442 | } | 442 | } |
443 | 443 | ||
@@ -611,14 +611,14 @@ static int wlan_service_main_thread(void *data) | |||
611 | lbs_deb_thread( "main-thread 111: intcounter=%d " | 611 | lbs_deb_thread( "main-thread 111: intcounter=%d " |
612 | "currenttxskb=%p dnld_sent=%d\n", | 612 | "currenttxskb=%p dnld_sent=%d\n", |
613 | adapter->intcounter, | 613 | adapter->intcounter, |
614 | adapter->currenttxskb, priv->wlan_dev.dnld_sent); | 614 | adapter->currenttxskb, priv->dnld_sent); |
615 | 615 | ||
616 | add_wait_queue(&thread->waitq, &wait); | 616 | add_wait_queue(&thread->waitq, &wait); |
617 | set_current_state(TASK_INTERRUPTIBLE); | 617 | set_current_state(TASK_INTERRUPTIBLE); |
618 | spin_lock_irq(&adapter->driver_lock); | 618 | spin_lock_irq(&adapter->driver_lock); |
619 | if ((adapter->psstate == PS_STATE_SLEEP) || | 619 | if ((adapter->psstate == PS_STATE_SLEEP) || |
620 | (!adapter->intcounter | 620 | (!adapter->intcounter |
621 | && (priv->wlan_dev.dnld_sent || adapter->cur_cmd || | 621 | && (priv->dnld_sent || adapter->cur_cmd || |
622 | list_empty(&adapter->cmdpendingq)))) { | 622 | list_empty(&adapter->cmdpendingq)))) { |
623 | lbs_deb_thread( | 623 | lbs_deb_thread( |
624 | "main-thread sleeping... Conn=%d IntC=%d PS_mode=%d PS_State=%d\n", | 624 | "main-thread sleeping... Conn=%d IntC=%d PS_mode=%d PS_State=%d\n", |
@@ -633,7 +633,7 @@ static int wlan_service_main_thread(void *data) | |||
633 | lbs_deb_thread( | 633 | lbs_deb_thread( |
634 | "main-thread 222 (waking up): intcounter=%d currenttxskb=%p " | 634 | "main-thread 222 (waking up): intcounter=%d currenttxskb=%p " |
635 | "dnld_sent=%d\n", adapter->intcounter, | 635 | "dnld_sent=%d\n", adapter->intcounter, |
636 | adapter->currenttxskb, priv->wlan_dev.dnld_sent); | 636 | adapter->currenttxskb, priv->dnld_sent); |
637 | 637 | ||
638 | set_current_state(TASK_RUNNING); | 638 | set_current_state(TASK_RUNNING); |
639 | remove_wait_queue(&thread->waitq, &wait); | 639 | remove_wait_queue(&thread->waitq, &wait); |
@@ -642,7 +642,7 @@ static int wlan_service_main_thread(void *data) | |||
642 | lbs_deb_thread("main-thread 333: intcounter=%d currenttxskb=%p " | 642 | lbs_deb_thread("main-thread 333: intcounter=%d currenttxskb=%p " |
643 | "dnld_sent=%d\n", | 643 | "dnld_sent=%d\n", |
644 | adapter->intcounter, | 644 | adapter->intcounter, |
645 | adapter->currenttxskb, priv->wlan_dev.dnld_sent); | 645 | adapter->currenttxskb, priv->dnld_sent); |
646 | 646 | ||
647 | if (kthread_should_stop() | 647 | if (kthread_should_stop() |
648 | || adapter->surpriseremoved) { | 648 | || adapter->surpriseremoved) { |
@@ -671,7 +671,7 @@ static int wlan_service_main_thread(void *data) | |||
671 | lbs_deb_thread("main-thread 444: intcounter=%d currenttxskb=%p " | 671 | lbs_deb_thread("main-thread 444: intcounter=%d currenttxskb=%p " |
672 | "dnld_sent=%d\n", | 672 | "dnld_sent=%d\n", |
673 | adapter->intcounter, | 673 | adapter->intcounter, |
674 | adapter->currenttxskb, priv->wlan_dev.dnld_sent); | 674 | adapter->currenttxskb, priv->dnld_sent); |
675 | 675 | ||
676 | /* command response? */ | 676 | /* command response? */ |
677 | if (adapter->hisregcpy & his_cmdupldrdy) { | 677 | if (adapter->hisregcpy & his_cmdupldrdy) { |
@@ -702,7 +702,7 @@ static int wlan_service_main_thread(void *data) | |||
702 | 702 | ||
703 | /* Check if we need to confirm Sleep Request received previously */ | 703 | /* Check if we need to confirm Sleep Request received previously */ |
704 | if (adapter->psstate == PS_STATE_PRE_SLEEP) { | 704 | if (adapter->psstate == PS_STATE_PRE_SLEEP) { |
705 | if (!priv->wlan_dev.dnld_sent && !adapter->cur_cmd) { | 705 | if (!priv->dnld_sent && !adapter->cur_cmd) { |
706 | if (adapter->connect_status == | 706 | if (adapter->connect_status == |
707 | libertas_connected) { | 707 | libertas_connected) { |
708 | lbs_deb_thread( | 708 | lbs_deb_thread( |
@@ -710,7 +710,7 @@ static int wlan_service_main_thread(void *data) | |||
710 | "dnld_sent=%d cur_cmd=%p, confirm now\n", | 710 | "dnld_sent=%d cur_cmd=%p, confirm now\n", |
711 | adapter->intcounter, | 711 | adapter->intcounter, |
712 | adapter->currenttxskb, | 712 | adapter->currenttxskb, |
713 | priv->wlan_dev.dnld_sent, | 713 | priv->dnld_sent, |
714 | adapter->cur_cmd); | 714 | adapter->cur_cmd); |
715 | 715 | ||
716 | libertas_ps_confirm_sleep(priv, | 716 | libertas_ps_confirm_sleep(priv, |
@@ -736,7 +736,7 @@ static int wlan_service_main_thread(void *data) | |||
736 | continue; | 736 | continue; |
737 | 737 | ||
738 | /* Execute the next command */ | 738 | /* Execute the next command */ |
739 | if (!priv->wlan_dev.dnld_sent && !priv->adapter->cur_cmd) | 739 | if (!priv->dnld_sent && !priv->adapter->cur_cmd) |
740 | libertas_execute_next_command(priv); | 740 | libertas_execute_next_command(priv); |
741 | 741 | ||
742 | /* Wake-up command waiters which can't sleep in | 742 | /* Wake-up command waiters which can't sleep in |
@@ -784,8 +784,8 @@ wlan_private *libertas_add_card(void *card) | |||
784 | goto err_kzalloc; | 784 | goto err_kzalloc; |
785 | } | 785 | } |
786 | 786 | ||
787 | priv->wlan_dev.netdev = dev; | 787 | priv->dev = dev; |
788 | priv->wlan_dev.card = card; | 788 | priv->card = card; |
789 | priv->mesh_open = 0; | 789 | priv->mesh_open = 0; |
790 | priv->infra_open = 0; | 790 | priv->infra_open = 0; |
791 | 791 | ||
@@ -828,7 +828,7 @@ EXPORT_SYMBOL_GPL(libertas_add_card); | |||
828 | 828 | ||
829 | int libertas_activate_card(wlan_private *priv, char *fw_name) | 829 | int libertas_activate_card(wlan_private *priv, char *fw_name) |
830 | { | 830 | { |
831 | struct net_device *dev = priv->wlan_dev.netdev; | 831 | struct net_device *dev = priv->dev; |
832 | int ret = -1; | 832 | int ret = -1; |
833 | 833 | ||
834 | lbs_deb_enter(LBS_DEB_MAIN); | 834 | lbs_deb_enter(LBS_DEB_MAIN); |
@@ -916,8 +916,8 @@ int libertas_add_mesh(wlan_private *priv) | |||
916 | mesh_dev->do_ioctl = libertas_do_ioctl; | 916 | mesh_dev->do_ioctl = libertas_do_ioctl; |
917 | mesh_dev->get_stats = wlan_get_stats; | 917 | mesh_dev->get_stats = wlan_get_stats; |
918 | mesh_dev->ethtool_ops = &libertas_ethtool_ops; | 918 | mesh_dev->ethtool_ops = &libertas_ethtool_ops; |
919 | memcpy(mesh_dev->dev_addr, priv->wlan_dev.netdev->dev_addr, | 919 | memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, |
920 | sizeof(priv->wlan_dev.netdev->dev_addr)); | 920 | sizeof(priv->dev->dev_addr)); |
921 | 921 | ||
922 | #ifdef WIRELESS_EXT | 922 | #ifdef WIRELESS_EXT |
923 | mesh_dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; | 923 | mesh_dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; |
@@ -984,10 +984,10 @@ int libertas_remove_card(wlan_private *priv) | |||
984 | if (!adapter) | 984 | if (!adapter) |
985 | goto out; | 985 | goto out; |
986 | 986 | ||
987 | dev = priv->wlan_dev.netdev; | 987 | dev = priv->dev; |
988 | 988 | ||
989 | netif_stop_queue(priv->wlan_dev.netdev); | 989 | netif_stop_queue(priv->dev); |
990 | netif_carrier_off(priv->wlan_dev.netdev); | 990 | netif_carrier_off(priv->dev); |
991 | 991 | ||
992 | wake_pending_cmdnodes(priv); | 992 | wake_pending_cmdnodes(priv); |
993 | 993 | ||
@@ -1003,7 +1003,7 @@ int libertas_remove_card(wlan_private *priv) | |||
1003 | 1003 | ||
1004 | memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); | 1004 | memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); |
1005 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 1005 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
1006 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); | 1006 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); |
1007 | 1007 | ||
1008 | adapter->surpriseremoved = 1; | 1008 | adapter->surpriseremoved = 1; |
1009 | 1009 | ||
@@ -1017,7 +1017,7 @@ int libertas_remove_card(wlan_private *priv) | |||
1017 | 1017 | ||
1018 | lbs_deb_net("unregister finish\n"); | 1018 | lbs_deb_net("unregister finish\n"); |
1019 | 1019 | ||
1020 | priv->wlan_dev.netdev = NULL; | 1020 | priv->dev = NULL; |
1021 | free_netdev(dev); | 1021 | free_netdev(dev); |
1022 | 1022 | ||
1023 | out: | 1023 | out: |
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 0b7854d797c4..ec64f6c174bb 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -143,8 +143,8 @@ void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) | |||
143 | if (priv->mesh_dev && IS_MESH_FRAME(skb)) | 143 | if (priv->mesh_dev && IS_MESH_FRAME(skb)) |
144 | skb->dev = priv->mesh_dev; | 144 | skb->dev = priv->mesh_dev; |
145 | else | 145 | else |
146 | skb->dev = priv->wlan_dev.netdev; | 146 | skb->dev = priv->dev; |
147 | skb->protocol = eth_type_trans(skb, priv->wlan_dev.netdev); | 147 | skb->protocol = eth_type_trans(skb, priv->dev); |
148 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 148 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
149 | 149 | ||
150 | netif_rx(skb); | 150 | netif_rx(skb); |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 48317503360a..479c0090b947 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -733,7 +733,7 @@ static int wlan_scan_channel_list(wlan_private * priv, | |||
733 | priv->adapter->last_scanned_channel = ptmpchan->channumber; | 733 | priv->adapter->last_scanned_channel = ptmpchan->channumber; |
734 | 734 | ||
735 | memset(&wrqu, 0, sizeof(union iwreq_data)); | 735 | memset(&wrqu, 0, sizeof(union iwreq_data)); |
736 | wireless_send_event(priv->wlan_dev.netdev, SIOCGIWSCAN, &wrqu, NULL); | 736 | wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); |
737 | 737 | ||
738 | done: | 738 | done: |
739 | lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret); | 739 | lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret); |
@@ -805,8 +805,8 @@ int wlan_scan_networks(wlan_private * priv, | |||
805 | 805 | ||
806 | /* Keep the data path active if we are only scanning our current channel */ | 806 | /* Keep the data path active if we are only scanning our current channel */ |
807 | if (!scancurrentchanonly) { | 807 | if (!scancurrentchanonly) { |
808 | netif_stop_queue(priv->wlan_dev.netdev); | 808 | netif_stop_queue(priv->dev); |
809 | netif_carrier_off(priv->wlan_dev.netdev); | 809 | netif_carrier_off(priv->dev); |
810 | netif_stop_queue(priv->mesh_dev); | 810 | netif_stop_queue(priv->mesh_dev); |
811 | netif_carrier_off(priv->mesh_dev); | 811 | netif_carrier_off(priv->mesh_dev); |
812 | } | 812 | } |
@@ -827,8 +827,8 @@ int wlan_scan_networks(wlan_private * priv, | |||
827 | wlan_scan_process_results(priv); | 827 | wlan_scan_process_results(priv); |
828 | 828 | ||
829 | if (priv->adapter->connect_status == libertas_connected) { | 829 | if (priv->adapter->connect_status == libertas_connected) { |
830 | netif_carrier_on(priv->wlan_dev.netdev); | 830 | netif_carrier_on(priv->dev); |
831 | netif_wake_queue(priv->wlan_dev.netdev); | 831 | netif_wake_queue(priv->dev); |
832 | netif_carrier_on(priv->mesh_dev); | 832 | netif_carrier_on(priv->mesh_dev); |
833 | netif_wake_queue(priv->mesh_dev); | 833 | netif_wake_queue(priv->mesh_dev); |
834 | } | 834 | } |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 138668ea9cf6..b6cb675f730d 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -157,7 +157,7 @@ done: | |||
157 | received from FW */ | 157 | received from FW */ |
158 | skb_orphan(skb); | 158 | skb_orphan(skb); |
159 | /* stop processing outgoing pkts */ | 159 | /* stop processing outgoing pkts */ |
160 | netif_stop_queue(priv->wlan_dev.netdev); | 160 | netif_stop_queue(priv->dev); |
161 | netif_stop_queue(priv->mesh_dev); | 161 | netif_stop_queue(priv->mesh_dev); |
162 | /* freeze any packets already in our queues */ | 162 | /* freeze any packets already in our queues */ |
163 | priv->adapter->TxLockFlag = 1; | 163 | priv->adapter->TxLockFlag = 1; |
@@ -196,10 +196,10 @@ static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb) | |||
196 | WARN_ON(priv->adapter->tx_queue_idx >= NR_TX_QUEUE); | 196 | WARN_ON(priv->adapter->tx_queue_idx >= NR_TX_QUEUE); |
197 | adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb; | 197 | adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb; |
198 | if (adapter->tx_queue_idx == NR_TX_QUEUE) { | 198 | if (adapter->tx_queue_idx == NR_TX_QUEUE) { |
199 | netif_stop_queue(priv->wlan_dev.netdev); | 199 | netif_stop_queue(priv->dev); |
200 | netif_stop_queue(priv->mesh_dev); | 200 | netif_stop_queue(priv->mesh_dev); |
201 | } else { | 201 | } else { |
202 | netif_start_queue(priv->wlan_dev.netdev); | 202 | netif_start_queue(priv->dev); |
203 | netif_start_queue(priv->mesh_dev); | 203 | netif_start_queue(priv->mesh_dev); |
204 | } | 204 | } |
205 | 205 | ||
@@ -220,9 +220,9 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb) | |||
220 | lbs_deb_enter(LBS_DEB_TX); | 220 | lbs_deb_enter(LBS_DEB_TX); |
221 | lbs_dbg_hex("TX Data", skb->data, min_t(unsigned int, skb->len, 100)); | 221 | lbs_dbg_hex("TX Data", skb->data, min_t(unsigned int, skb->len, 100)); |
222 | 222 | ||
223 | if (priv->wlan_dev.dnld_sent) { | 223 | if (priv->dnld_sent) { |
224 | lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n", | 224 | lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n", |
225 | priv->wlan_dev.dnld_sent); | 225 | priv->dnld_sent); |
226 | goto done; | 226 | goto done; |
227 | } | 227 | } |
228 | 228 | ||
@@ -283,7 +283,7 @@ void libertas_send_tx_feedback(wlan_private * priv) | |||
283 | adapter->currenttxskb = NULL; | 283 | adapter->currenttxskb = NULL; |
284 | priv->adapter->TxLockFlag = 0; | 284 | priv->adapter->TxLockFlag = 0; |
285 | if (priv->adapter->connect_status == libertas_connected) { | 285 | if (priv->adapter->connect_status == libertas_connected) { |
286 | netif_wake_queue(priv->wlan_dev.netdev); | 286 | netif_wake_queue(priv->dev); |
287 | netif_wake_queue(priv->mesh_dev); | 287 | netif_wake_queue(priv->mesh_dev); |
288 | } | 288 | } |
289 | } | 289 | } |