diff options
author | Franky Lin <frankyl@broadcom.com> | 2011-08-08 15:58:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-23 13:00:00 -0700 |
commit | f61b2af43de25eb7ead33b390660a4338e75c541 (patch) | |
tree | 495129d8982588c2a98197e410db6aeda6ef9caa /drivers/staging/brcm80211/brcmfmac/dhd_linux.c | |
parent | e1ae77bb4a5a58d1d93619148e0dddcc7c8010d6 (diff) |
staging: brcm80211: move ioctl response wait code to dhd_sdio.c
Ioctl response wait is used only by bus layer in fullmac. Move the
corresponding code to dhd_sdio.c
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/brcmfmac/dhd_linux.c')
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index f3eaef1e1d30..b7a741b64858 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c @@ -76,7 +76,6 @@ struct brcmf_info { struct brcmf_if *iflist[BRCMF_MAX_IFS]; struct mutex proto_block; - wait_queue_head_t ioctl_resp_wait; /* Thread to issue ioctl for multicast */ struct task_struct *sysioc_tsk; @@ -127,9 +126,6 @@ module_param_string(iface_name, iface_name, IFNAMSIZ, 0); /* The following are specific to the SDIO dongle */ -/* IOCTL response timeout */ -int brcmf_ioctl_timeout_msec = IOCTL_RESP_TIMEOUT; - #ifdef SDTEST /* Echo packet generator (pkts/s) */ uint brcmf_pktgen; @@ -1290,8 +1286,6 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen) net->netdev_ops = NULL; mutex_init(&drvr_priv->proto_block); - /* Initialize other structure content */ - init_waitqueue_head(&drvr_priv->ioctl_resp_wait); /* Link to info module */ drvr_priv->pub.info = drvr_priv; @@ -1577,52 +1571,6 @@ int brcmf_os_proto_unblock(struct brcmf_pub *drvr) return 0; } -unsigned int brcmf_os_get_ioctl_resp_timeout(void) -{ - return (unsigned int)brcmf_ioctl_timeout_msec; -} - -void brcmf_os_set_ioctl_resp_timeout(unsigned int timeout_msec) -{ - brcmf_ioctl_timeout_msec = (int)timeout_msec; -} - -int brcmf_os_ioctl_resp_wait(struct brcmf_pub *drvr, uint *condition, - bool *pending) -{ - struct brcmf_info *drvr_priv = drvr->info; - DECLARE_WAITQUEUE(wait, current); - int timeout = brcmf_ioctl_timeout_msec; - - /* Convert timeout in millsecond to jiffies */ - timeout = timeout * HZ / 1000; - - /* Wait until control frame is available */ - add_wait_queue(&drvr_priv->ioctl_resp_wait, &wait); - set_current_state(TASK_INTERRUPTIBLE); - - while (!(*condition) && (!signal_pending(current) && timeout)) - timeout = schedule_timeout(timeout); - - if (signal_pending(current)) - *pending = true; - - set_current_state(TASK_RUNNING); - remove_wait_queue(&drvr_priv->ioctl_resp_wait, &wait); - - return timeout; -} - -int brcmf_os_ioctl_resp_wake(struct brcmf_pub *drvr) -{ - struct brcmf_info *drvr_priv = drvr->info; - - if (waitqueue_active(&drvr_priv->ioctl_resp_wait)) - wake_up_interruptible(&drvr_priv->ioctl_resp_wait); - - return 0; -} - static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, struct brcmf_event_msg *event, void **data) { |