Commit 494e46d0 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Kalle Valo

airo: Replace in_atomic() usage.

issuecommand() is using in_atomic() to decide if it is safe to invoke
schedule() while waiting for the command to be accepted.

Usage of in_atomic() for this is only half correct as it can not detect all
condition where it is not allowed to schedule(). Also Linus clearly
requested that code which changes behaviour depending on context should
either be seperated or the context be conveyed in an argument passed by the
caller, which usually knows the context.

Add an may_sleep argument to issuecommand() indicating when it is save to
sleep and change schedule() to cond_resched() because it's pointless to
invoke schedule() if there is no request to reschedule.

Pass the may_sleep condition through the various call chains leading to
issuecommand().
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201101211536.2966644-5-bigeasy@linutronix.de
parent 49eb0199
...@@ -1115,7 +1115,8 @@ static int enable_MAC(struct airo_info *ai, int lock); ...@@ -1115,7 +1115,8 @@ static int enable_MAC(struct airo_info *ai, int lock);
static void disable_MAC(struct airo_info *ai, int lock); static void disable_MAC(struct airo_info *ai, int lock);
static void enable_interrupts(struct airo_info*); static void enable_interrupts(struct airo_info*);
static void disable_interrupts(struct airo_info*); static void disable_interrupts(struct airo_info*);
static u16 issuecommand(struct airo_info*, Cmd *pCmd, Resp *pRsp); static u16 issuecommand(struct airo_info*, Cmd *pCmd, Resp *pRsp,
bool may_sleep);
static int bap_setup(struct airo_info*, u16 rid, u16 offset, int whichbap); static int bap_setup(struct airo_info*, u16 rid, u16 offset, int whichbap);
static int aux_bap_read(struct airo_info*, __le16 *pu16Dst, int bytelen, static int aux_bap_read(struct airo_info*, __le16 *pu16Dst, int bytelen,
int whichbap); int whichbap);
...@@ -1130,8 +1131,10 @@ static int PC4500_writerid(struct airo_info*, u16 rid, const void ...@@ -1130,8 +1131,10 @@ static int PC4500_writerid(struct airo_info*, u16 rid, const void
static int do_writerid(struct airo_info*, u16 rid, const void *rid_data, static int do_writerid(struct airo_info*, u16 rid, const void *rid_data,
int len, int dummy); int len, int dummy);
static u16 transmit_allocate(struct airo_info*, int lenPayload, int raw); static u16 transmit_allocate(struct airo_info*, int lenPayload, int raw);
static int transmit_802_3_packet(struct airo_info*, int len, char *pPacket); static int transmit_802_3_packet(struct airo_info*, int len, char *pPacket,
static int transmit_802_11_packet(struct airo_info*, int len, char *pPacket); bool may_sleep);
static int transmit_802_11_packet(struct airo_info*, int len, char *pPacket,
bool may_sleep);
static int mpi_send_packet(struct net_device *dev); static int mpi_send_packet(struct net_device *dev);
static void mpi_unmap_card(struct pci_dev *pci); static void mpi_unmap_card(struct pci_dev *pci);
...@@ -1753,7 +1756,7 @@ static int readBSSListRid(struct airo_info *ai, int first, ...@@ -1753,7 +1756,7 @@ static int readBSSListRid(struct airo_info *ai, int first,
if (down_interruptible(&ai->sem)) if (down_interruptible(&ai->sem))
return -ERESTARTSYS; return -ERESTARTSYS;
ai->list_bss_task = current; ai->list_bss_task = current;
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp, true);
up(&ai->sem); up(&ai->sem);
/* Let the command take effect */ /* Let the command take effect */
schedule_timeout_uninterruptible(3 * HZ); schedule_timeout_uninterruptible(3 * HZ);
...@@ -2096,7 +2099,7 @@ static void get_tx_error(struct airo_info *ai, s32 fid) ...@@ -2096,7 +2099,7 @@ static void get_tx_error(struct airo_info *ai, s32 fid)
} }
} }
static void airo_end_xmit(struct net_device *dev) static void airo_end_xmit(struct net_device *dev, bool may_sleep)
{ {
u16 status; u16 status;
int i; int i;
...@@ -2107,7 +2110,7 @@ static void airo_end_xmit(struct net_device *dev) ...@@ -2107,7 +2110,7 @@ static void airo_end_xmit(struct net_device *dev)
clear_bit(JOB_XMIT, &priv->jobs); clear_bit(JOB_XMIT, &priv->jobs);
clear_bit(FLAG_PENDING_XMIT, &priv->flags); clear_bit(FLAG_PENDING_XMIT, &priv->flags);
status = transmit_802_3_packet (priv, fids[fid], skb->data); status = transmit_802_3_packet(priv, fids[fid], skb->data, may_sleep);
up(&priv->sem); up(&priv->sem);
i = 0; i = 0;
...@@ -2164,11 +2167,11 @@ static netdev_tx_t airo_start_xmit(struct sk_buff *skb, ...@@ -2164,11 +2167,11 @@ static netdev_tx_t airo_start_xmit(struct sk_buff *skb,
set_bit(JOB_XMIT, &priv->jobs); set_bit(JOB_XMIT, &priv->jobs);
wake_up_interruptible(&priv->thr_wait); wake_up_interruptible(&priv->thr_wait);
} else } else
airo_end_xmit(dev); airo_end_xmit(dev, false);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
static void airo_end_xmit11(struct net_device *dev) static void airo_end_xmit11(struct net_device *dev, bool may_sleep)
{ {
u16 status; u16 status;
int i; int i;
...@@ -2179,7 +2182,7 @@ static void airo_end_xmit11(struct net_device *dev) ...@@ -2179,7 +2182,7 @@ static void airo_end_xmit11(struct net_device *dev)
clear_bit(JOB_XMIT11, &priv->jobs); clear_bit(JOB_XMIT11, &priv->jobs);
clear_bit(FLAG_PENDING_XMIT11, &priv->flags); clear_bit(FLAG_PENDING_XMIT11, &priv->flags);
status = transmit_802_11_packet (priv, fids[fid], skb->data); status = transmit_802_11_packet(priv, fids[fid], skb->data, may_sleep);
up(&priv->sem); up(&priv->sem);
i = MAX_FIDS / 2; i = MAX_FIDS / 2;
...@@ -2243,7 +2246,7 @@ static netdev_tx_t airo_start_xmit11(struct sk_buff *skb, ...@@ -2243,7 +2246,7 @@ static netdev_tx_t airo_start_xmit11(struct sk_buff *skb,
set_bit(JOB_XMIT11, &priv->jobs); set_bit(JOB_XMIT11, &priv->jobs);
wake_up_interruptible(&priv->thr_wait); wake_up_interruptible(&priv->thr_wait);
} else } else
airo_end_xmit11(dev); airo_end_xmit11(dev, false);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -2293,7 +2296,7 @@ static struct net_device_stats *airo_get_stats(struct net_device *dev) ...@@ -2293,7 +2296,7 @@ static struct net_device_stats *airo_get_stats(struct net_device *dev)
return &dev->stats; return &dev->stats;
} }
static void airo_set_promisc(struct airo_info *ai) static void airo_set_promisc(struct airo_info *ai, bool may_sleep)
{ {
Cmd cmd; Cmd cmd;
Resp rsp; Resp rsp;
...@@ -2302,7 +2305,7 @@ static void airo_set_promisc(struct airo_info *ai) ...@@ -2302,7 +2305,7 @@ static void airo_set_promisc(struct airo_info *ai)
cmd.cmd = CMD_SETMODE; cmd.cmd = CMD_SETMODE;
clear_bit(JOB_PROMISC, &ai->jobs); clear_bit(JOB_PROMISC, &ai->jobs);
cmd.parm0=(ai->flags&IFF_PROMISC) ? PROMISC : NOPROMISC; cmd.parm0=(ai->flags&IFF_PROMISC) ? PROMISC : NOPROMISC;
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp, may_sleep);
up(&ai->sem); up(&ai->sem);
} }
...@@ -2316,7 +2319,7 @@ static void airo_set_multicast_list(struct net_device *dev) ...@@ -2316,7 +2319,7 @@ static void airo_set_multicast_list(struct net_device *dev)
set_bit(JOB_PROMISC, &ai->jobs); set_bit(JOB_PROMISC, &ai->jobs);
wake_up_interruptible(&ai->thr_wait); wake_up_interruptible(&ai->thr_wait);
} else } else
airo_set_promisc(ai); airo_set_promisc(ai, false);
} }
if ((dev->flags&IFF_ALLMULTI) || !netdev_mc_empty(dev)) { if ((dev->flags&IFF_ALLMULTI) || !netdev_mc_empty(dev)) {
...@@ -2476,7 +2479,7 @@ static int mpi_init_descriptors (struct airo_info *ai) ...@@ -2476,7 +2479,7 @@ static int mpi_init_descriptors (struct airo_info *ai)
cmd.parm0 = FID_RX; cmd.parm0 = FID_RX;
cmd.parm1 = (ai->rxfids[0].card_ram_off - ai->pciaux); cmd.parm1 = (ai->rxfids[0].card_ram_off - ai->pciaux);
cmd.parm2 = MPI_MAX_FIDS; cmd.parm2 = MPI_MAX_FIDS;
rc = issuecommand(ai, &cmd, &rsp); rc = issuecommand(ai, &cmd, &rsp, true);
if (rc != SUCCESS) { if (rc != SUCCESS) {
airo_print_err(ai->dev->name, "Couldn't allocate RX FID"); airo_print_err(ai->dev->name, "Couldn't allocate RX FID");
return rc; return rc;
...@@ -2504,7 +2507,7 @@ static int mpi_init_descriptors (struct airo_info *ai) ...@@ -2504,7 +2507,7 @@ static int mpi_init_descriptors (struct airo_info *ai)
} }
ai->txfids[i-1].tx_desc.eoc = 1; /* Last descriptor has EOC set */ ai->txfids[i-1].tx_desc.eoc = 1; /* Last descriptor has EOC set */
rc = issuecommand(ai, &cmd, &rsp); rc = issuecommand(ai, &cmd, &rsp, true);
if (rc != SUCCESS) { if (rc != SUCCESS) {
airo_print_err(ai->dev->name, "Couldn't allocate TX FID"); airo_print_err(ai->dev->name, "Couldn't allocate TX FID");
return rc; return rc;
...@@ -2518,7 +2521,7 @@ static int mpi_init_descriptors (struct airo_info *ai) ...@@ -2518,7 +2521,7 @@ static int mpi_init_descriptors (struct airo_info *ai)
cmd.parm0 = RID_RW; cmd.parm0 = RID_RW;
cmd.parm1 = (ai->config_desc.card_ram_off - ai->pciaux); cmd.parm1 = (ai->config_desc.card_ram_off - ai->pciaux);
cmd.parm2 = 1; /* Magic number... */ cmd.parm2 = 1; /* Magic number... */
rc = issuecommand(ai, &cmd, &rsp); rc = issuecommand(ai, &cmd, &rsp, true);
if (rc != SUCCESS) { if (rc != SUCCESS) {
airo_print_err(ai->dev->name, "Couldn't allocate RID"); airo_print_err(ai->dev->name, "Couldn't allocate RID");
return rc; return rc;
...@@ -3144,13 +3147,13 @@ static int airo_thread(void *data) ...@@ -3144,13 +3147,13 @@ static int airo_thread(void *data)
} }
if (test_bit(JOB_XMIT, &ai->jobs)) if (test_bit(JOB_XMIT, &ai->jobs))
airo_end_xmit(dev); airo_end_xmit(dev, true);
else if (test_bit(JOB_XMIT11, &ai->jobs)) else if (test_bit(JOB_XMIT11, &ai->jobs))
airo_end_xmit11(dev); airo_end_xmit11(dev, true);
else if (test_bit(JOB_STATS, &ai->jobs)) else if (test_bit(JOB_STATS, &ai->jobs))
airo_read_stats(dev); airo_read_stats(dev);
else if (test_bit(JOB_PROMISC, &ai->jobs)) else if (test_bit(JOB_PROMISC, &ai->jobs))
airo_set_promisc(ai); airo_set_promisc(ai, true);
else if (test_bit(JOB_MIC, &ai->jobs)) else if (test_bit(JOB_MIC, &ai->jobs))
micinit(ai); micinit(ai);
else if (test_bit(JOB_EVENT, &ai->jobs)) else if (test_bit(JOB_EVENT, &ai->jobs))
...@@ -3599,7 +3602,7 @@ static int enable_MAC(struct airo_info *ai, int lock) ...@@ -3599,7 +3602,7 @@ static int enable_MAC(struct airo_info *ai, int lock)
if (!test_bit(FLAG_ENABLED, &ai->flags)) { if (!test_bit(FLAG_ENABLED, &ai->flags)) {
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = MAC_ENABLE; cmd.cmd = MAC_ENABLE;
rc = issuecommand(ai, &cmd, &rsp); rc = issuecommand(ai, &cmd, &rsp, true);
if (rc == SUCCESS) if (rc == SUCCESS)
set_bit(FLAG_ENABLED, &ai->flags); set_bit(FLAG_ENABLED, &ai->flags);
} else } else
...@@ -3631,7 +3634,7 @@ static void disable_MAC(struct airo_info *ai, int lock) ...@@ -3631,7 +3634,7 @@ static void disable_MAC(struct airo_info *ai, int lock)
netif_carrier_off(ai->dev); netif_carrier_off(ai->dev);
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = MAC_DISABLE; // disable in case already enabled cmd.cmd = MAC_DISABLE; // disable in case already enabled
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp, true);
clear_bit(FLAG_ENABLED, &ai->flags); clear_bit(FLAG_ENABLED, &ai->flags);
} }
if (lock == 1) if (lock == 1)
...@@ -3834,7 +3837,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ...@@ -3834,7 +3837,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
cmd.parm0 = cmd.parm1 = cmd.parm2 = 0; cmd.parm0 = cmd.parm1 = cmd.parm2 = 0;
if (lock && down_interruptible(&ai->sem)) if (lock && down_interruptible(&ai->sem))
return ERROR; return ERROR;
if (issuecommand(ai, &cmd, &rsp) != SUCCESS) { if (issuecommand(ai, &cmd, &rsp, true) != SUCCESS) {
if (lock) if (lock)
up(&ai->sem); up(&ai->sem);
return ERROR; return ERROR;
...@@ -3844,7 +3847,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ...@@ -3844,7 +3847,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
// Let's figure out if we need to use the AUX port // Let's figure out if we need to use the AUX port
if (!test_bit(FLAG_MPI,&ai->flags)) { if (!test_bit(FLAG_MPI,&ai->flags)) {
cmd.cmd = CMD_ENABLEAUX; cmd.cmd = CMD_ENABLEAUX;
if (issuecommand(ai, &cmd, &rsp) != SUCCESS) { if (issuecommand(ai, &cmd, &rsp, true) != SUCCESS) {
if (lock) if (lock)
up(&ai->sem); up(&ai->sem);
airo_print_err(ai->dev->name, "Error checking for AUX port"); airo_print_err(ai->dev->name, "Error checking for AUX port");
...@@ -3956,7 +3959,8 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ...@@ -3956,7 +3959,8 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
return SUCCESS; return SUCCESS;
} }
static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp,
bool may_sleep)
{ {
// Im really paranoid about letting it run forever! // Im really paranoid about letting it run forever!
int max_tries = 600000; int max_tries = 600000;
...@@ -3973,8 +3977,8 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) ...@@ -3973,8 +3977,8 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp)
if ((IN4500(ai, COMMAND)) == pCmd->cmd) if ((IN4500(ai, COMMAND)) == pCmd->cmd)
// PC4500 didn't notice command, try again // PC4500 didn't notice command, try again
OUT4500(ai, COMMAND, pCmd->cmd); OUT4500(ai, COMMAND, pCmd->cmd);
if (!in_atomic() && (max_tries & 255) == 0) if (may_sleep && (max_tries & 255) == 0)
schedule(); cond_resched();
} }
if (max_tries == -1) { if (max_tries == -1) {
...@@ -4131,7 +4135,7 @@ static int PC4500_accessrid(struct airo_info *ai, u16 rid, u16 accmd) ...@@ -4131,7 +4135,7 @@ static int PC4500_accessrid(struct airo_info *ai, u16 rid, u16 accmd)
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = accmd; cmd.cmd = accmd;
cmd.parm0 = rid; cmd.parm0 = rid;
status = issuecommand(ai, &cmd, &rsp); status = issuecommand(ai, &cmd, &rsp, true);
if (status != 0) return status; if (status != 0) return status;
if ((rsp.status & 0x7F00) != 0) { if ((rsp.status & 0x7F00) != 0) {
return (accmd << 8) + (rsp.rsp0 & 0xFF); return (accmd << 8) + (rsp.rsp0 & 0xFF);
...@@ -4167,7 +4171,7 @@ static int PC4500_readrid(struct airo_info *ai, u16 rid, void *pBuf, int len, in ...@@ -4167,7 +4171,7 @@ static int PC4500_readrid(struct airo_info *ai, u16 rid, void *pBuf, int len, in
memcpy_toio(ai->config_desc.card_ram_off, memcpy_toio(ai->config_desc.card_ram_off,
&ai->config_desc.rid_desc, sizeof(Rid)); &ai->config_desc.rid_desc, sizeof(Rid));
rc = issuecommand(ai, &cmd, &rsp); rc = issuecommand(ai, &cmd, &rsp, true);
if (rsp.status & 0x7f00) if (rsp.status & 0x7f00)
rc = rsp.rsp0; rc = rsp.rsp0;
...@@ -4246,7 +4250,7 @@ static int PC4500_writerid(struct airo_info *ai, u16 rid, ...@@ -4246,7 +4250,7 @@ static int PC4500_writerid(struct airo_info *ai, u16 rid,
memcpy(ai->config_desc.virtual_host_addr, memcpy(ai->config_desc.virtual_host_addr,
pBuf, len); pBuf, len);
rc = issuecommand(ai, &cmd, &rsp); rc = issuecommand(ai, &cmd, &rsp, true);
if ((rc & 0xff00) != 0) { if ((rc & 0xff00) != 0) {
airo_print_err(ai->dev->name, "%s: Write rid Error %d", airo_print_err(ai->dev->name, "%s: Write rid Error %d",
__func__, rc); __func__, rc);
...@@ -4292,7 +4296,7 @@ static u16 transmit_allocate(struct airo_info *ai, int lenPayload, int raw) ...@@ -4292,7 +4296,7 @@ static u16 transmit_allocate(struct airo_info *ai, int lenPayload, int raw)
cmd.parm0 = lenPayload; cmd.parm0 = lenPayload;
if (down_interruptible(&ai->sem)) if (down_interruptible(&ai->sem))
return ERROR; return ERROR;
if (issuecommand(ai, &cmd, &rsp) != SUCCESS) { if (issuecommand(ai, &cmd, &rsp, true) != SUCCESS) {
txFid = ERROR; txFid = ERROR;
goto done; goto done;
} }
...@@ -4338,7 +4342,8 @@ static u16 transmit_allocate(struct airo_info *ai, int lenPayload, int raw) ...@@ -4338,7 +4342,8 @@ static u16 transmit_allocate(struct airo_info *ai, int lenPayload, int raw)
/* In general BAP1 is dedicated to transmiting packets. However, /* In general BAP1 is dedicated to transmiting packets. However,
since we need a BAP when accessing RIDs, we also use BAP1 for that. since we need a BAP when accessing RIDs, we also use BAP1 for that.
Make sure the BAP1 spinlock is held when this is called. */ Make sure the BAP1 spinlock is held when this is called. */
static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket) static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket,
bool may_sleep)
{ {
__le16 payloadLen; __le16 payloadLen;
Cmd cmd; Cmd cmd;
...@@ -4376,12 +4381,14 @@ static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket) ...@@ -4376,12 +4381,14 @@ static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket)
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = CMD_TRANSMIT; cmd.cmd = CMD_TRANSMIT;
cmd.parm0 = txFid; cmd.parm0 = txFid;
if (issuecommand(ai, &cmd, &rsp) != SUCCESS) return ERROR; if (issuecommand(ai, &cmd, &rsp, may_sleep) != SUCCESS)
return ERROR;
if ((rsp.status & 0xFF00) != 0) return ERROR; if ((rsp.status & 0xFF00) != 0) return ERROR;
return SUCCESS; return SUCCESS;
} }
static int transmit_802_11_packet(struct airo_info *ai, int len, char *pPacket) static int transmit_802_11_packet(struct airo_info *ai, int len, char *pPacket,
bool may_sleep)
{ {
__le16 fc, payloadLen; __le16 fc, payloadLen;
Cmd cmd; Cmd cmd;
...@@ -4416,7 +4423,8 @@ static int transmit_802_11_packet(struct airo_info *ai, int len, char *pPacket) ...@@ -4416,7 +4423,8 @@ static int transmit_802_11_packet(struct airo_info *ai, int len, char *pPacket)
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = CMD_TRANSMIT; cmd.cmd = CMD_TRANSMIT;
cmd.parm0 = txFid; cmd.parm0 = txFid;
if (issuecommand(ai, &cmd, &rsp) != SUCCESS) return ERROR; if (issuecommand(ai, &cmd, &rsp, may_sleep) != SUCCESS)
return ERROR;
if ((rsp.status & 0xFF00) != 0) return ERROR; if ((rsp.status & 0xFF00) != 0) return ERROR;
return SUCCESS; return SUCCESS;
} }
...@@ -5480,7 +5488,7 @@ static int proc_BSSList_open(struct inode *inode, struct file *file) ...@@ -5480,7 +5488,7 @@ static int proc_BSSList_open(struct inode *inode, struct file *file)
kfree(file->private_data); kfree(file->private_data);
return -ERESTARTSYS; return -ERESTARTSYS;
} }
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp, true);
up(&ai->sem); up(&ai->sem);
data->readlen = 0; data->readlen = 0;
return 0; return 0;
...@@ -5617,7 +5625,7 @@ static int __maybe_unused airo_pci_suspend(struct device *dev_d) ...@@ -5617,7 +5625,7 @@ static int __maybe_unused airo_pci_suspend(struct device *dev_d)
netif_device_detach(dev); netif_device_detach(dev);
ai->power = PMSG_SUSPEND; ai->power = PMSG_SUSPEND;
cmd.cmd = HOSTSLEEP; cmd.cmd = HOSTSLEEP;
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp, true);
device_wakeup_enable(dev_d); device_wakeup_enable(dev_d);
return 0; return 0;
...@@ -5960,7 +5968,7 @@ static int airo_set_wap(struct net_device *dev, ...@@ -5960,7 +5968,7 @@ static int airo_set_wap(struct net_device *dev,
cmd.cmd = CMD_LOSE_SYNC; cmd.cmd = CMD_LOSE_SYNC;
if (down_interruptible(&local->sem)) if (down_interruptible(&local->sem))
return -ERESTARTSYS; return -ERESTARTSYS;
issuecommand(local, &cmd, &rsp); issuecommand(local, &cmd, &rsp, true);
up(&local->sem); up(&local->sem);
} else { } else {
memset(APList_rid, 0, sizeof(*APList_rid)); memset(APList_rid, 0, sizeof(*APList_rid));
...@@ -7258,7 +7266,7 @@ static int airo_set_scan(struct net_device *dev, ...@@ -7258,7 +7266,7 @@ static int airo_set_scan(struct net_device *dev,
ai->scan_timeout = RUN_AT(3*HZ); ai->scan_timeout = RUN_AT(3*HZ);
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.cmd = CMD_LISTBSS; cmd.cmd = CMD_LISTBSS;
issuecommand(ai, &cmd, &rsp); issuecommand(ai, &cmd, &rsp, true);
wake = 1; wake = 1;
out: out:
...@@ -7525,7 +7533,7 @@ static int airo_config_commit(struct net_device *dev, ...@@ -7525,7 +7533,7 @@ static int airo_config_commit(struct net_device *dev,
writeConfigRid(local, 0); writeConfigRid(local, 0);
enable_MAC(local, 0); enable_MAC(local, 0);
if (test_bit (FLAG_RESET, &local->flags)) if (test_bit (FLAG_RESET, &local->flags))
airo_set_promisc(local); airo_set_promisc(local, true);
else else
up(&local->sem); up(&local->sem);
......
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