summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudip Mukherjee2015-09-17 18:44:32 +0200
committerGreg Kroah-Hartman2015-09-19 04:53:50 +0200
commit78affe6522738ccda21c3f4e83bcaf08aab18d6e (patch)
treee12fa44935e4247b82b7c5bfa1ab7153c38bbc95
parentstaging: rtl8188eu: Introduce monitor interface for IEEE 802.11 frames (diff)
downloadkernel-qcow2-linux-78affe6522738ccda21c3f4e83bcaf08aab18d6e.tar.gz
kernel-qcow2-linux-78affe6522738ccda21c3f4e83bcaf08aab18d6e.tar.xz
kernel-qcow2-linux-78affe6522738ccda21c3f4e83bcaf08aab18d6e.zip
staging: slicoss: return status of slic_link_event_handler
slic_link_event_handler() issues command READ_LINK_STATUS to be executed asynchronously, which is followed by UP configuration write command. But it can fail while setting up the command and in that case the link will not be up. Lets check the status and return it. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/slicoss/slicoss.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 858597087ba7..b1a8b4b9e1a3 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1717,14 +1717,14 @@ static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb)
* will also complete asynchronously.
*
*/
-static void slic_link_event_handler(struct adapter *adapter)
+static int slic_link_event_handler(struct adapter *adapter)
{
int status;
struct slic_shmem *pshmem;
if (adapter->state != ADAPT_UP) {
/* Adapter is not operational. Ignore. */
- return;
+ return -ENODEV;
}
pshmem = (struct slic_shmem *)(unsigned long)adapter->phys_shmem;
@@ -1740,6 +1740,7 @@ static void slic_link_event_handler(struct adapter *adapter)
(u32) &pshmem->linkstatus, /* no 4GB wrap guaranteed */
0, 0, 0);
#endif
+ return status;
}
static void slic_init_cleanup(struct adapter *adapter)