Commit 634b8f49 authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville

[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: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ec3eef28
...@@ -1823,7 +1823,7 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str) ...@@ -1823,7 +1823,7 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str)
lbs_deb_cmd("Event Indication String length = %d\n", iwrq.data.length); lbs_deb_cmd("Event Indication String length = %d\n", iwrq.data.length);
lbs_deb_cmd("Sending wireless event IWEVCUSTOM for %s\n", str); lbs_deb_cmd("Sending wireless event IWEVCUSTOM for %s\n", str);
wireless_send_event(priv->wlan_dev.netdev, IWEVCUSTOM, &iwrq, buf); wireless_send_event(priv->dev, IWEVCUSTOM, &iwrq, buf);
lbs_deb_leave(LBS_DEB_CMD); lbs_deb_leave(LBS_DEB_CMD);
} }
...@@ -1842,7 +1842,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size) ...@@ -1842,7 +1842,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size); lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size);
ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size); ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size);
priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED; priv->dnld_sent = DNLD_RES_RECEIVED;
spin_lock_irqsave(&adapter->driver_lock, flags); spin_lock_irqsave(&adapter->driver_lock, flags);
if (adapter->intcounter || adapter->currenttxskb) if (adapter->intcounter || adapter->currenttxskb)
...@@ -1926,7 +1926,7 @@ void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode) ...@@ -1926,7 +1926,7 @@ void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode)
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
if (priv->wlan_dev.dnld_sent) { if (priv->dnld_sent) {
allowed = 0; allowed = 0;
lbs_deb_cmd("D"); lbs_deb_cmd("D");
} }
......
...@@ -42,15 +42,15 @@ void libertas_mac_event_disconnected(wlan_private * priv) ...@@ -42,15 +42,15 @@ void libertas_mac_event_disconnected(wlan_private * priv)
*/ */
msleep_interruptible(1000); msleep_interruptible(1000);
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
/* Free Tx and Rx packets */ /* Free Tx and Rx packets */
kfree_skb(priv->adapter->currenttxskb); kfree_skb(priv->adapter->currenttxskb);
priv->adapter->currenttxskb = NULL; priv->adapter->currenttxskb = NULL;
/* report disconnect to upper layer */ /* report disconnect to upper layer */
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(priv->dev);
netif_carrier_off(priv->wlan_dev.netdev); netif_carrier_off(priv->dev);
/* reset SNR/NF/RSSI values */ /* reset SNR/NF/RSSI values */
memset(adapter->SNR, 0x00, sizeof(adapter->SNR)); memset(adapter->SNR, 0x00, sizeof(adapter->SNR));
...@@ -218,7 +218,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv, ...@@ -218,7 +218,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
ETH_ALEN); ETH_ALEN);
} }
memcpy(priv->wlan_dev.netdev->dev_addr, adapter->current_addr, ETH_ALEN); memcpy(priv->dev->dev_addr, adapter->current_addr, ETH_ALEN);
if (priv->mesh_dev) if (priv->mesh_dev)
memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, memcpy(priv->mesh_dev->dev_addr, adapter->current_addr,
ETH_ALEN); ETH_ALEN);
...@@ -774,14 +774,14 @@ int libertas_process_rx_command(wlan_private * priv) ...@@ -774,14 +774,14 @@ int libertas_process_rx_command(wlan_private * priv)
resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr); resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr);
lbs_dbg_hex("CMD_RESP:", adapter->cur_cmd->bufvirtualaddr, lbs_dbg_hex("CMD_RESP:", adapter->cur_cmd->bufvirtualaddr,
priv->wlan_dev.upld_len); priv->upld_len);
respcmd = le16_to_cpu(resp->command); respcmd = le16_to_cpu(resp->command);
result = le16_to_cpu(resp->result); result = le16_to_cpu(resp->result);
lbs_deb_cmd("CMD_RESP: %x result: %d length: %d\n", respcmd, lbs_deb_cmd("CMD_RESP: %x result: %d length: %d\n", respcmd,
result, priv->wlan_dev.upld_len); result, priv->upld_len);
if (!(respcmd & 0x8000)) { if (!(respcmd & 0x8000)) {
lbs_deb_cmd("Invalid response to command!"); lbs_deb_cmd("Invalid response to command!");
......
...@@ -197,7 +197,7 @@ static ssize_t libertas_extscan(struct file *file, const char __user *userbuf, ...@@ -197,7 +197,7 @@ static ssize_t libertas_extscan(struct file *file, const char __user *userbuf,
libertas_send_specific_SSID_scan(priv, &extscan_ssid, 1); libertas_send_specific_SSID_scan(priv, &extscan_ssid, 1);
memset(&wrqu, 0, sizeof(union iwreq_data)); memset(&wrqu, 0, sizeof(union iwreq_data));
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWSCAN, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
out_unlock: out_unlock:
free_page(addr); free_page(addr);
...@@ -387,7 +387,7 @@ static ssize_t libertas_setuserscan(struct file *file, ...@@ -387,7 +387,7 @@ static ssize_t libertas_setuserscan(struct file *file,
!priv->adapter->nr_cmd_pending); !priv->adapter->nr_cmd_pending);
memset(&wrqu, 0x00, sizeof(union iwreq_data)); memset(&wrqu, 0x00, sizeof(union iwreq_data));
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWSCAN, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
out_unlock: out_unlock:
free_page(addr); free_page(addr);
......
...@@ -89,31 +89,6 @@ struct sleep_params { ...@@ -89,31 +89,6 @@ struct sleep_params {
u16 sp_reserved; u16 sp_reserved;
}; };
/** Data structure for the Marvell WLAN device */
typedef struct _wlan_dev {
/** device name */
char name[DEV_NAME_LEN];
/** card pointer */
void *card;
/** IO port */
u32 ioport;
/** Upload received */
u32 upld_rcv;
/** Upload type */
u32 upld_typ;
/** Upload length */
u32 upld_len;
/** netdev pointer */
struct net_device *netdev;
/* Upload buffer */
u8 upld_buf[WLAN_UPLD_SIZE];
/* Download sent:
bit0 1/0=data_sent/data_tx_done,
bit1 1/0=cmd_sent/cmd_tx_done,
all other bits reserved 0 */
u8 dnld_sent;
} wlan_dev_t, *pwlan_dev_t;
/* Mesh statistics */ /* Mesh statistics */
struct wlan_mesh_stats { struct wlan_mesh_stats {
u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */ u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
...@@ -132,8 +107,11 @@ struct _wlan_private { ...@@ -132,8 +107,11 @@ struct _wlan_private {
int mesh_open; int mesh_open;
int infra_open; int infra_open;
char name[DEV_NAME_LEN];
void *card;
wlan_adapter *adapter; wlan_adapter *adapter;
wlan_dev_t wlan_dev; struct net_device *dev;
struct net_device_stats stats; struct net_device_stats stats;
struct net_device *mesh_dev ; /* Virtual device */ struct net_device *mesh_dev ; /* Virtual device */
...@@ -154,6 +132,16 @@ struct _wlan_private { ...@@ -154,6 +132,16 @@ struct _wlan_private {
u32 bbp_offset; u32 bbp_offset;
u32 rf_offset; u32 rf_offset;
/** Upload length */
u32 upld_len;
/* Upload buffer */
u8 upld_buf[WLAN_UPLD_SIZE];
/* Download sent:
bit0 1/0=data_sent/data_tx_done,
bit1 1/0=cmd_sent/cmd_tx_done,
all other bits reserved 0 */
u8 dnld_sent;
const struct firmware *firmware; const struct firmware *firmware;
struct device *hotplug_device; struct device *hotplug_device;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
int if_usb_issue_boot_command(wlan_private *priv, int ivalue) int if_usb_issue_boot_command(wlan_private *priv, int ivalue)
{ {
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
struct bootcmdstr sbootcmd; struct bootcmdstr sbootcmd;
int i; int i;
......
...@@ -61,7 +61,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) ...@@ -61,7 +61,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
{ {
wlan_private *priv = (wlan_private *) (urb->context); wlan_private *priv = (wlan_private *) (urb->context);
wlan_adapter *adapter = priv->adapter; wlan_adapter *adapter = priv->adapter;
struct net_device *dev = priv->wlan_dev.netdev; struct net_device *dev = priv->dev;
/* handle the transmission complete validations */ /* handle the transmission complete validations */
...@@ -74,7 +74,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) ...@@ -74,7 +74,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
lbs_deb_usbd(&urb->dev->dev, "Actual length transmitted %d\n", lbs_deb_usbd(&urb->dev->dev, "Actual length transmitted %d\n",
urb->actual_length); urb->actual_length);
*/ */
priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED; priv->dnld_sent = DNLD_RES_RECEIVED;
/* Wake main thread if commands are pending */ /* Wake main thread if commands are pending */
if (!adapter->cur_cmd) if (!adapter->cur_cmd)
wake_up_interruptible(&priv->mainthread.waitq); wake_up_interruptible(&priv->mainthread.waitq);
...@@ -239,7 +239,7 @@ err_activate_card: ...@@ -239,7 +239,7 @@ err_activate_card:
unregister_netdev(priv->mesh_dev); unregister_netdev(priv->mesh_dev);
free_netdev(priv->mesh_dev); free_netdev(priv->mesh_dev);
err_add_mesh: err_add_mesh:
free_netdev(priv->wlan_dev.netdev); free_netdev(priv->dev);
kfree(priv->adapter); kfree(priv->adapter);
dealloc: dealloc:
if_usb_free(cardp); if_usb_free(cardp);
...@@ -289,7 +289,7 @@ static void if_usb_disconnect(struct usb_interface *intf) ...@@ -289,7 +289,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
*/ */
static int if_prog_firmware(wlan_private * priv) static int if_prog_firmware(wlan_private * priv)
{ {
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
struct FWData *fwdata; struct FWData *fwdata;
struct fwheader *fwheader; struct fwheader *fwheader;
u8 *firmware = priv->firmware->data; u8 *firmware = priv->firmware->data;
...@@ -368,7 +368,7 @@ static int if_prog_firmware(wlan_private * priv) ...@@ -368,7 +368,7 @@ static int if_prog_firmware(wlan_private * priv)
static int libertas_do_reset(wlan_private *priv) static int libertas_do_reset(wlan_private *priv)
{ {
int ret; int ret;
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
lbs_deb_enter(LBS_DEB_USB); lbs_deb_enter(LBS_DEB_USB);
...@@ -394,7 +394,7 @@ static int libertas_do_reset(wlan_private *priv) ...@@ -394,7 +394,7 @@ static int libertas_do_reset(wlan_private *priv)
int usb_tx_block(wlan_private * priv, u8 * payload, u16 nb) int usb_tx_block(wlan_private * priv, u8 * payload, u16 nb)
{ {
/* pointer to card structure */ /* pointer to card structure */
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
int ret = -1; int ret = -1;
/* check if device is removed */ /* check if device is removed */
...@@ -427,7 +427,7 @@ static int __if_usb_submit_rx_urb(wlan_private * priv, ...@@ -427,7 +427,7 @@ static int __if_usb_submit_rx_urb(wlan_private * priv,
void (*callbackfn) void (*callbackfn)
(struct urb *urb)) (struct urb *urb))
{ {
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
struct sk_buff *skb; struct sk_buff *skb;
struct read_cb_info *rinfo = &cardp->rinfo; struct read_cb_info *rinfo = &cardp->rinfo;
int ret = -1; int ret = -1;
...@@ -478,7 +478,7 @@ static void if_usb_receive_fwload(struct urb *urb) ...@@ -478,7 +478,7 @@ static void if_usb_receive_fwload(struct urb *urb)
struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; struct read_cb_info *rinfo = (struct read_cb_info *)urb->context;
wlan_private *priv = rinfo->priv; wlan_private *priv = rinfo->priv;
struct sk_buff *skb = rinfo->skb; struct sk_buff *skb = rinfo->skb;
struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
struct fwsyncheader *syncfwheader; struct fwsyncheader *syncfwheader;
struct bootcmdrespStr bootcmdresp; struct bootcmdrespStr bootcmdresp;
...@@ -582,7 +582,7 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, ...@@ -582,7 +582,7 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
skb_put(skb, recvlength); skb_put(skb, recvlength);
skb_pull(skb, MESSAGE_HEADER_LEN); skb_pull(skb, MESSAGE_HEADER_LEN);
libertas_process_rxed_packet(priv, skb); libertas_process_rxed_packet(priv, skb);
priv->wlan_dev.upld_len = (recvlength - MESSAGE_HEADER_LEN); priv->upld_len = (recvlength - MESSAGE_HEADER_LEN);
} }
static inline void process_cmdrequest(int recvlength, u8 *recvbuff, static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
...@@ -605,18 +605,18 @@ static inline void process_cmdrequest(int recvlength, u8 *recvbuff, ...@@ -605,18 +605,18 @@ static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
/* take care of cur_cmd = NULL case by reading the /* take care of cur_cmd = NULL case by reading the
* data to clear the interrupt */ * data to clear the interrupt */
if (!priv->adapter->cur_cmd) { if (!priv->adapter->cur_cmd) {
cmdbuf = priv->wlan_dev.upld_buf; cmdbuf = priv->upld_buf;
priv->adapter->hisregcpy &= ~his_cmdupldrdy; priv->adapter->hisregcpy &= ~his_cmdupldrdy;
} else } else
cmdbuf = priv->adapter->cur_cmd->bufvirtualaddr; cmdbuf = priv->adapter->cur_cmd->bufvirtualaddr;
cardp->usb_int_cause |= his_cmdupldrdy; cardp->usb_int_cause |= his_cmdupldrdy;
priv->wlan_dev.upld_len = (recvlength - MESSAGE_HEADER_LEN); priv->upld_len = (recvlength - MESSAGE_HEADER_LEN);
memcpy(cmdbuf, recvbuff + MESSAGE_HEADER_LEN, memcpy(cmdbuf, recvbuff + MESSAGE_HEADER_LEN,
priv->wlan_dev.upld_len); priv->upld_len);
kfree_skb(skb); kfree_skb(skb);
libertas_interrupt(priv->wlan_dev.netdev); libertas_interrupt(priv->dev);
spin_unlock(&priv->adapter->driver_lock); spin_unlock(&priv->adapter->driver_lock);
lbs_deb_usbd(&cardp->udev->dev, lbs_deb_usbd(&cardp->udev->dev,
...@@ -637,7 +637,7 @@ static void if_usb_receive(struct urb *urb) ...@@ -637,7 +637,7 @@ static void if_usb_receive(struct urb *urb)
struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; struct read_cb_info *rinfo = (struct read_cb_info *)urb->context;
wlan_private *priv = rinfo->priv; wlan_private *priv = rinfo->priv;
struct sk_buff *skb = rinfo->skb; struct sk_buff *skb = rinfo->skb;
struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
int recvlength = urb->actual_length; int recvlength = urb->actual_length;
u8 *recvbuff = NULL; u8 *recvbuff = NULL;
...@@ -689,7 +689,7 @@ static void if_usb_receive(struct urb *urb) ...@@ -689,7 +689,7 @@ static void if_usb_receive(struct urb *urb)
cardp->usb_event_cause = le32_to_cpu(cardp->usb_event_cause) << 3; cardp->usb_event_cause = le32_to_cpu(cardp->usb_event_cause) << 3;
cardp->usb_int_cause |= his_cardevent; cardp->usb_int_cause |= his_cardevent;
kfree_skb(skb); kfree_skb(skb);
libertas_interrupt(priv->wlan_dev.netdev); libertas_interrupt(priv->dev);
spin_unlock(&priv->adapter->driver_lock); spin_unlock(&priv->adapter->driver_lock);
goto rx_exit; goto rx_exit;
default: default:
...@@ -715,20 +715,20 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n ...@@ -715,20 +715,20 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n
{ {
int ret = -1; int ret = -1;
u32 tmp; u32 tmp;
struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
lbs_deb_usbd(&cardp->udev->dev,"*** type = %u\n", type); lbs_deb_usbd(&cardp->udev->dev,"*** type = %u\n", type);
lbs_deb_usbd(&cardp->udev->dev,"size after = %d\n", nb); lbs_deb_usbd(&cardp->udev->dev,"size after = %d\n", nb);
if (type == MVMS_CMD) { if (type == MVMS_CMD) {
tmp = cpu_to_le32(CMD_TYPE_REQUEST); tmp = cpu_to_le32(CMD_TYPE_REQUEST);
priv->wlan_dev.dnld_sent = DNLD_CMD_SENT; priv->dnld_sent = DNLD_CMD_SENT;
memcpy(cardp->bulk_out_buffer, (u8 *) & tmp, memcpy(cardp->bulk_out_buffer, (u8 *) & tmp,
MESSAGE_HEADER_LEN); MESSAGE_HEADER_LEN);
} else { } else {
tmp = cpu_to_le32(CMD_TYPE_DATA); tmp = cpu_to_le32(CMD_TYPE_DATA);
priv->wlan_dev.dnld_sent = DNLD_DATA_SENT; priv->dnld_sent = DNLD_DATA_SENT;
memcpy(cardp->bulk_out_buffer, (u8 *) & tmp, memcpy(cardp->bulk_out_buffer, (u8 *) & tmp,
MESSAGE_HEADER_LEN); MESSAGE_HEADER_LEN);
} }
...@@ -744,7 +744,7 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n ...@@ -744,7 +744,7 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n
/* called with adapter->driver_lock held */ /* called with adapter->driver_lock held */
static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
{ {
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
*ireg = cardp->usb_int_cause; *ireg = cardp->usb_int_cause;
cardp->usb_int_cause = 0; cardp->usb_int_cause = 0;
...@@ -756,7 +756,7 @@ static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) ...@@ -756,7 +756,7 @@ static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
static int if_usb_read_event_cause(wlan_private * priv) static int if_usb_read_event_cause(wlan_private * priv)
{ {
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
priv->adapter->eventcause = cardp->usb_event_cause; priv->adapter->eventcause = cardp->usb_event_cause;
/* Re-submit rx urb here to avoid event lost issue */ /* Re-submit rx urb here to avoid event lost issue */
if_usb_submit_rx_urb(priv); if_usb_submit_rx_urb(priv);
...@@ -798,12 +798,12 @@ static int if_usb_unregister_dev(wlan_private * priv) ...@@ -798,12 +798,12 @@ static int if_usb_unregister_dev(wlan_private * priv)
*/ */
static int if_usb_register_dev(wlan_private * priv) static int if_usb_register_dev(wlan_private * priv)
{ {
struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
lbs_deb_enter(LBS_DEB_USB); lbs_deb_enter(LBS_DEB_USB);
cardp->priv = priv; cardp->priv = priv;
cardp->eth_dev = priv->wlan_dev.netdev; cardp->eth_dev = priv->dev;
priv->hotplug_device = &(cardp->udev->dev); priv->hotplug_device = &(cardp->udev->dev);
SET_NETDEV_DEV(cardp->eth_dev, &(cardp->udev->dev)); SET_NETDEV_DEV(cardp->eth_dev, &(cardp->udev->dev));
...@@ -820,7 +820,7 @@ static int if_usb_register_dev(wlan_private * priv) ...@@ -820,7 +820,7 @@ static int if_usb_register_dev(wlan_private * priv)
static int if_usb_prog_firmware(wlan_private * priv) static int if_usb_prog_firmware(wlan_private * priv)
{ {
struct usb_card_rec *cardp = priv->wlan_dev.card; struct usb_card_rec *cardp = priv->card;
int i = 0; int i = 0;
static int reset_count = 10; static int reset_count = 10;
int ret = 0; int ret = 0;
......
...@@ -804,8 +804,8 @@ int libertas_ret_80211_associate(wlan_private * priv, ...@@ -804,8 +804,8 @@ int libertas_ret_80211_associate(wlan_private * priv,
adapter->nextSNRNF = 0; adapter->nextSNRNF = 0;
adapter->numSNRNF = 0; adapter->numSNRNF = 0;
netif_carrier_on(priv->wlan_dev.netdev); netif_carrier_on(priv->dev);
netif_wake_queue(priv->wlan_dev.netdev); netif_wake_queue(priv->dev);
netif_carrier_on(priv->mesh_dev); netif_carrier_on(priv->mesh_dev);
netif_wake_queue(priv->mesh_dev); netif_wake_queue(priv->mesh_dev);
...@@ -814,7 +814,7 @@ int libertas_ret_80211_associate(wlan_private * priv, ...@@ -814,7 +814,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER; wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
done: done:
lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); 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,8 +899,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
memcpy(&adapter->curbssparams.ssid, memcpy(&adapter->curbssparams.ssid,
&pbssdesc->ssid, sizeof(struct WLAN_802_11_SSID)); &pbssdesc->ssid, sizeof(struct WLAN_802_11_SSID));
netif_carrier_on(priv->wlan_dev.netdev); netif_carrier_on(priv->dev);
netif_wake_queue(priv->wlan_dev.netdev); netif_wake_queue(priv->dev);
netif_carrier_on(priv->mesh_dev); netif_carrier_on(priv->mesh_dev);
netif_wake_queue(priv->mesh_dev); netif_wake_queue(priv->mesh_dev);
...@@ -908,7 +908,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv, ...@@ -908,7 +908,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
memset(&wrqu, 0, sizeof(wrqu)); memset(&wrqu, 0, sizeof(wrqu));
memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER; wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n"); lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n");
lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->adhocchannel); lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->adhocchannel);
......
...@@ -261,10 +261,10 @@ static int wlan_dev_open(struct net_device *dev) ...@@ -261,10 +261,10 @@ static int wlan_dev_open(struct net_device *dev)
priv->open = 1; priv->open = 1;
if (adapter->connect_status == libertas_connected) { if (adapter->connect_status == libertas_connected) {
netif_carrier_on(priv->wlan_dev.netdev); netif_carrier_on(priv->dev);
netif_carrier_on(priv->mesh_dev); netif_carrier_on(priv->mesh_dev);
} else { } else {
netif_carrier_off(priv->wlan_dev.netdev); netif_carrier_off(priv->dev);
netif_carrier_off(priv->mesh_dev); netif_carrier_off(priv->mesh_dev);
} }
...@@ -286,7 +286,7 @@ static int mesh_open(struct net_device *dev) ...@@ -286,7 +286,7 @@ static int mesh_open(struct net_device *dev)
priv->mesh_open = 1 ; priv->mesh_open = 1 ;
netif_wake_queue(priv->mesh_dev); netif_wake_queue(priv->mesh_dev);
if (priv->infra_open == 0) if (priv->infra_open == 0)
return wlan_dev_open(priv->wlan_dev.netdev) ; return wlan_dev_open(priv->dev) ;
return 0; return 0;
} }
...@@ -303,9 +303,9 @@ static int wlan_open(struct net_device *dev) ...@@ -303,9 +303,9 @@ static int wlan_open(struct net_device *dev)
if(pre_open_check(dev) == -1) if(pre_open_check(dev) == -1)
return -1; return -1;
priv->infra_open = 1 ; priv->infra_open = 1 ;
netif_wake_queue(priv->wlan_dev.netdev); netif_wake_queue(priv->dev);
if (priv->open == 0) if (priv->open == 0)
return wlan_dev_open(priv->wlan_dev.netdev) ; return wlan_dev_open(priv->dev) ;
return 0; return 0;
} }
...@@ -315,7 +315,7 @@ static int wlan_dev_close(struct net_device *dev) ...@@ -315,7 +315,7 @@ static int wlan_dev_close(struct net_device *dev)
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
netif_carrier_off(priv->wlan_dev.netdev); netif_carrier_off(priv->dev);
netif_carrier_off(priv->mesh_dev); netif_carrier_off(priv->mesh_dev);
priv->open = 0; priv->open = 0;
...@@ -336,7 +336,7 @@ static int mesh_close(struct net_device *dev) ...@@ -336,7 +336,7 @@ static int mesh_close(struct net_device *dev)
priv->mesh_open = 0; priv->mesh_open = 0;
netif_stop_queue(priv->mesh_dev); netif_stop_queue(priv->mesh_dev);
if (priv->infra_open == 0) if (priv->infra_open == 0)
return wlan_dev_close( ((wlan_private *) dev->priv)->wlan_dev.netdev) ; return wlan_dev_close(dev);
else else
return 0; return 0;
} }
...@@ -351,10 +351,10 @@ static int wlan_close(struct net_device *dev) ...@@ -351,10 +351,10 @@ static int wlan_close(struct net_device *dev)
{ {
wlan_private *priv = (wlan_private *) dev->priv; wlan_private *priv = (wlan_private *) dev->priv;
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(dev);
priv->infra_open = 0; priv->infra_open = 0;
if (priv->mesh_open == 0) if (priv->mesh_open == 0)
return wlan_dev_close( ((wlan_private *) dev->priv)->wlan_dev.netdev) ; return wlan_dev_close(dev);
else else
return 0; return 0;
} }
...@@ -367,12 +367,12 @@ static int wlan_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -367,12 +367,12 @@ static int wlan_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
if (priv->wlan_dev.dnld_sent || priv->adapter->TxLockFlag) { if (priv->dnld_sent || priv->adapter->TxLockFlag) {
priv->stats.tx_dropped++; priv->stats.tx_dropped++;
goto done; goto done;
} }
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(priv->dev);
netif_stop_queue(priv->mesh_dev); netif_stop_queue(priv->mesh_dev);
if (libertas_process_tx(priv, skb) == 0) 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,7 +395,7 @@ static int mesh_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
SET_MESH_FRAME(skb); SET_MESH_FRAME(skb);
ret = wlan_hard_start_xmit(skb, priv->wlan_dev.netdev); ret = wlan_hard_start_xmit(skb, priv->dev);
lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
return ret; return ret;
} }
...@@ -425,7 +425,7 @@ static void wlan_tx_timeout(struct net_device *dev) ...@@ -425,7 +425,7 @@ static void wlan_tx_timeout(struct net_device *dev)
lbs_pr_err("tx watch dog timeout\n"); lbs_pr_err("tx watch dog timeout\n");
priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED; priv->dnld_sent = DNLD_RES_RECEIVED;
dev->trans_start = jiffies; dev->trans_start = jiffies;
if (priv->adapter->currenttxskb) { if (priv->adapter->currenttxskb) {
...@@ -437,7 +437,7 @@ static void wlan_tx_timeout(struct net_device *dev) ...@@ -437,7 +437,7 @@ static void wlan_tx_timeout(struct net_device *dev)
} else } else
wake_up_interruptible(&priv->mainthread.waitq); wake_up_interruptible(&priv->mainthread.waitq);
} else if (priv->adapter->connect_status == libertas_connected) { } else if (priv->adapter->connect_status == libertas_connected) {
netif_wake_queue(priv->wlan_dev.netdev); netif_wake_queue(priv->dev);
netif_wake_queue(priv->mesh_dev); netif_wake_queue(priv->mesh_dev);
} }
...@@ -611,14 +611,14 @@ static int wlan_service_main_thread(void *data) ...@@ -611,14 +611,14 @@ static int wlan_service_main_thread(void *data)
lbs_deb_thread( "main-thread 111: intcounter=%d " lbs_deb_thread( "main-thread 111: intcounter=%d "
"currenttxskb=%p dnld_sent=%d\n", "currenttxskb=%p dnld_sent=%d\n",
adapter->intcounter, adapter->intcounter,
adapter->currenttxskb, priv->wlan_dev.dnld_sent); adapter->currenttxskb, priv->dnld_sent);
add_wait_queue(&thread->waitq, &wait); add_wait_queue(&thread->waitq, &wait);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irq(&adapter->driver_lock); spin_lock_irq(&adapter->driver_lock);
if ((adapter->psstate == PS_STATE_SLEEP) || if ((adapter->psstate == PS_STATE_SLEEP) ||
(!adapter->intcounter (!adapter->intcounter
&& (priv->wlan_dev.dnld_sent || adapter->cur_cmd || && (priv->dnld_sent || adapter->cur_cmd ||
list_empty(&adapter->cmdpendingq)))) { list_empty(&adapter->cmdpendingq)))) {
lbs_deb_thread( lbs_deb_thread(
"main-thread sleeping... Conn=%d IntC=%d PS_mode=%d PS_State=%d\n", "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,7 +633,7 @@ static int wlan_service_main_thread(void *data)
lbs_deb_thread( lbs_deb_thread(
"main-thread 222 (waking up): intcounter=%d currenttxskb=%p " "main-thread 222 (waking up): intcounter=%d currenttxskb=%p "
"dnld_sent=%d\n", adapter->intcounter, "dnld_sent=%d\n", adapter->intcounter,
adapter->currenttxskb, priv->wlan_dev.dnld_sent); adapter->currenttxskb, priv->dnld_sent);
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
remove_wait_queue(&thread->waitq, &wait); remove_wait_queue(&thread->waitq, &wait);
...@@ -642,7 +642,7 @@ static int wlan_service_main_thread(void *data) ...@@ -642,7 +642,7 @@ static int wlan_service_main_thread(void *data)
lbs_deb_thread("main-thread 333: intcounter=%d currenttxskb=%p " lbs_deb_thread("main-thread 333: intcounter=%d currenttxskb=%p "
"dnld_sent=%d\n", "dnld_sent=%d\n",
adapter->intcounter, adapter->intcounter,
adapter->currenttxskb, priv->wlan_dev.dnld_sent); adapter->currenttxskb, priv->dnld_sent);
if (kthread_should_stop() if (kthread_should_stop()
|| adapter->surpriseremoved) { || adapter->surpriseremoved) {
...@@ -671,7 +671,7 @@ static int wlan_service_main_thread(void *data) ...@@ -671,7 +671,7 @@ static int wlan_service_main_thread(void *data)
lbs_deb_thread("main-thread 444: intcounter=%d currenttxskb=%p " lbs_deb_thread("main-thread 444: intcounter=%d currenttxskb=%p "
"dnld_sent=%d\n", "dnld_sent=%d\n",
adapter->intcounter, adapter->intcounter,
adapter->currenttxskb, priv->wlan_dev.dnld_sent); adapter->currenttxskb, priv->dnld_sent);
/* command response? */ /* command response? */
if (adapter->hisregcpy & his_cmdupldrdy) { if (adapter->hisregcpy & his_cmdupldrdy) {
...@@ -702,7 +702,7 @@ static int wlan_service_main_thread(void *data) ...@@ -702,7 +702,7 @@ static int wlan_service_main_thread(void *data)
/* Check if we need to confirm Sleep Request received previously */ /* Check if we need to confirm Sleep Request received previously */
if (adapter->psstate == PS_STATE_PRE_SLEEP) { if (adapter->psstate == PS_STATE_PRE_SLEEP) {
if (!priv->wlan_dev.dnld_sent && !adapter->cur_cmd) { if (!priv->dnld_sent && !adapter->cur_cmd) {
if (adapter->connect_status == if (adapter->connect_status ==
libertas_connected) { libertas_connected) {
lbs_deb_thread( lbs_deb_thread(
...@@ -710,7 +710,7 @@ static int wlan_service_main_thread(void *data) ...@@ -710,7 +710,7 @@ static int wlan_service_main_thread(void *data)
"dnld_sent=%d cur_cmd=%p, confirm now\n", "dnld_sent=%d cur_cmd=%p, confirm now\n",
adapter->intcounter, adapter->intcounter,
adapter->currenttxskb, adapter->currenttxskb,
priv->wlan_dev.dnld_sent, priv->dnld_sent,
adapter->cur_cmd); adapter->cur_cmd);
libertas_ps_confirm_sleep(priv, libertas_ps_confirm_sleep(priv,
...@@ -736,7 +736,7 @@ static int wlan_service_main_thread(void *data) ...@@ -736,7 +736,7 @@ static int wlan_service_main_thread(void *data)
continue; continue;
/* Execute the next command */ /* Execute the next command */
if (!priv->wlan_dev.dnld_sent && !priv->adapter->cur_cmd) if (!priv->dnld_sent && !priv->adapter->cur_cmd)
libertas_execute_next_command(priv); libertas_execute_next_command(priv);
/* Wake-up command waiters which can't sleep in /* Wake-up command waiters which can't sleep in
...@@ -784,8 +784,8 @@ wlan_private *libertas_add_card(void *card) ...@@ -784,8 +784,8 @@ wlan_private *libertas_add_card(void *card)
goto err_kzalloc; goto err_kzalloc;
} }
priv->wlan_dev.netdev = dev; priv->dev = dev;
priv->wlan_dev.card = card; priv->card = card;
priv->mesh_open = 0; priv->mesh_open = 0;
priv->infra_open = 0; priv->infra_open = 0;
...@@ -828,7 +828,7 @@ EXPORT_SYMBOL_GPL(libertas_add_card); ...@@ -828,7 +828,7 @@ EXPORT_SYMBOL_GPL(libertas_add_card);
int libertas_activate_card(wlan_private *priv, char *fw_name) int libertas_activate_card(wlan_private *priv, char *fw_name)
{ {
struct net_device *dev = priv->wlan_dev.netdev; struct net_device *dev = priv->dev;
int ret = -1; int ret = -1;
lbs_deb_enter(LBS_DEB_MAIN); lbs_deb_enter(LBS_DEB_MAIN);
...@@ -916,8 +916,8 @@ int libertas_add_mesh(wlan_private *priv) ...@@ -916,8 +916,8 @@ int libertas_add_mesh(wlan_private *priv)
mesh_dev->do_ioctl = libertas_do_ioctl; mesh_dev->do_ioctl = libertas_do_ioctl;
mesh_dev->get_stats = wlan_get_stats; mesh_dev->get_stats = wlan_get_stats;
mesh_dev->ethtool_ops = &libertas_ethtool_ops; mesh_dev->ethtool_ops = &libertas_ethtool_ops;
memcpy(mesh_dev->dev_addr, priv->wlan_dev.netdev->dev_addr, memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
sizeof(priv->wlan_dev.netdev->dev_addr)); sizeof(priv->dev->dev_addr));
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
mesh_dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; mesh_dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def;
...@@ -984,10 +984,10 @@ int libertas_remove_card(wlan_private *priv) ...@@ -984,10 +984,10 @@ int libertas_remove_card(wlan_private *priv)
if (!adapter) if (!adapter)
goto out; goto out;
dev = priv->wlan_dev.netdev; dev = priv->dev;
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(priv->dev);
netif_carrier_off(priv->wlan_dev.netdev); netif_carrier_off(priv->dev);
wake_pending_cmdnodes(priv); wake_pending_cmdnodes(priv);
...@@ -1003,7 +1003,7 @@ int libertas_remove_card(wlan_private *priv) ...@@ -1003,7 +1003,7 @@ int libertas_remove_card(wlan_private *priv)
memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER; wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
adapter->surpriseremoved = 1; adapter->surpriseremoved = 1;
...@@ -1017,7 +1017,7 @@ int libertas_remove_card(wlan_private *priv) ...@@ -1017,7 +1017,7 @@ int libertas_remove_card(wlan_private *priv)
lbs_deb_net("unregister finish\n"); lbs_deb_net("unregister finish\n");
priv->wlan_dev.netdev = NULL; priv->dev = NULL;
free_netdev(dev); free_netdev(dev);
out: out:
......
...@@ -143,8 +143,8 @@ void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -143,8 +143,8 @@ void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
if (priv->mesh_dev && IS_MESH_FRAME(skb)) if (priv->mesh_dev && IS_MESH_FRAME(skb))
skb->dev = priv->mesh_dev; skb->dev = priv->mesh_dev;
else else
skb->dev = priv->wlan_dev.netdev; skb->dev = priv->dev;
skb->protocol = eth_type_trans(skb, priv->wlan_dev.netdev); skb->protocol = eth_type_trans(skb, priv->dev);
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
netif_rx(skb); netif_rx(skb);
......
...@@ -733,7 +733,7 @@ static int wlan_scan_channel_list(wlan_private * priv, ...@@ -733,7 +733,7 @@ static int wlan_scan_channel_list(wlan_private * priv,
priv->adapter->last_scanned_channel = ptmpchan->channumber; priv->adapter->last_scanned_channel = ptmpchan->channumber;
memset(&wrqu, 0, sizeof(union iwreq_data)); memset(&wrqu, 0, sizeof(union iwreq_data));
wireless_send_event(priv->wlan_dev.netdev, SIOCGIWSCAN, &wrqu, NULL); wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
done: done:
lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret);
...@@ -805,8 +805,8 @@ int wlan_scan_networks(wlan_private * priv, ...@@ -805,8 +805,8 @@ int wlan_scan_networks(wlan_private * priv,
/* Keep the data path active if we are only scanning our current channel */ /* Keep the data path active if we are only scanning our current channel */
if (!scancurrentchanonly) { if (!scancurrentchanonly) {
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(priv->dev);
netif_carrier_off(priv->wlan_dev.netdev); netif_carrier_off(priv->dev);
netif_stop_queue(priv->mesh_dev); netif_stop_queue(priv->mesh_dev);
netif_carrier_off(priv->mesh_dev); netif_carrier_off(priv->mesh_dev);
} }
...@@ -827,8 +827,8 @@ int wlan_scan_networks(wlan_private * priv, ...@@ -827,8 +827,8 @@ int wlan_scan_networks(wlan_private * priv,
wlan_scan_process_results(priv); wlan_scan_process_results(priv);
if (priv->adapter->connect_status == libertas_connected) { if (priv->adapter->connect_status == libertas_connected) {
netif_carrier_on(priv->wlan_dev.netdev); netif_carrier_on(priv->dev);
netif_wake_queue(priv->wlan_dev.netdev); netif_wake_queue(priv->dev);
netif_carrier_on(priv->mesh_dev); netif_carrier_on(priv->mesh_dev);
netif_wake_queue(priv->mesh_dev); netif_wake_queue(priv->mesh_dev);
} }
......
...@@ -157,7 +157,7 @@ done: ...@@ -157,7 +157,7 @@ done:
received from FW */ received from FW */
skb_orphan(skb); skb_orphan(skb);
/* stop processing outgoing pkts */ /* stop processing outgoing pkts */
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(priv->dev);
netif_stop_queue(priv->mesh_dev); netif_stop_queue(priv->mesh_dev);
/* freeze any packets already in our queues */ /* freeze any packets already in our queues */
priv->adapter->TxLockFlag = 1; priv->adapter->TxLockFlag = 1;
...@@ -196,10 +196,10 @@ static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb) ...@@ -196,10 +196,10 @@ static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb)
WARN_ON(priv->adapter->tx_queue_idx >= NR_TX_QUEUE); WARN_ON(priv->adapter->tx_queue_idx >= NR_TX_QUEUE);
adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb; adapter->tx_queue_ps[adapter->tx_queue_idx++] = skb;
if (adapter->tx_queue_idx == NR_TX_QUEUE) { if (adapter->tx_queue_idx == NR_TX_QUEUE) {
netif_stop_queue(priv->wlan_dev.netdev); netif_stop_queue(priv->dev);
netif_stop_queue(priv->mesh_dev); netif_stop_queue(priv->mesh_dev);
} else { } else {
netif_start_queue(priv->wlan_dev.netdev); netif_start_queue(priv->dev);
netif_start_queue(priv->mesh_dev); netif_start_queue(priv->mesh_dev);
} }
...@@ -220,9 +220,9 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb) ...@@ -220,9 +220,9 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb)
lbs_deb_enter(LBS_DEB_TX); lbs_deb_enter(LBS_DEB_TX);
lbs_dbg_hex("TX Data", skb->data, min_t(unsigned int, skb->len, 100)); lbs_dbg_hex("TX Data", skb->data, min_t(unsigned int, skb->len, 100));
if (priv->wlan_dev.dnld_sent) { if (priv->dnld_sent) {
lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n", lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n",
priv->wlan_dev.dnld_sent); priv->dnld_sent);
goto done; goto done;
} }
...@@ -283,7 +283,7 @@ void libertas_send_tx_feedback(wlan_private * priv) ...@@ -283,7 +283,7 @@ void libertas_send_tx_feedback(wlan_private * priv)
adapter->currenttxskb = NULL; adapter->currenttxskb = NULL;
priv->adapter->TxLockFlag = 0; priv->adapter->TxLockFlag = 0;
if (priv->adapter->connect_status == libertas_connected) { if (priv->adapter->connect_status == libertas_connected) {
netif_wake_queue(priv->wlan_dev.netdev); netif_wake_queue(priv->dev);
netif_wake_queue(priv->mesh_dev); netif_wake_queue(priv->mesh_dev);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment