aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-12-02 18:02:45 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 09:48:46 +0100
commit38b3ffa0ae8334cd721c12a06c8ae51c37fa2691 (patch)
tree952119add0921dd669460f5c5ab9ce61a706a0f7 /drivers/staging/wilc1000
parentstaging: wilc1000: use is_zero_ether_addr() API to check mac address (diff)
downloadlinux-dev-38b3ffa0ae8334cd721c12a06c8ae51c37fa2691.tar.xz
linux-dev-38b3ffa0ae8334cd721c12a06c8ae51c37fa2691.zip
staging: wilc1000: handle delete beacon cfg ops from cfg80211 context()
Refactor the code to handle delete beacon cfg operation from cfg80211 context. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r--drivers/staging/wilc1000/host_interface.c39
1 files changed, 10 insertions, 29 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 310138d82d5f..995ca65998a9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1934,26 +1934,6 @@ error:
kfree(msg);
}
-static void handle_del_beacon(struct work_struct *work)
-{
- struct host_if_msg *msg = container_of(work, struct host_if_msg, work);
- struct wilc_vif *vif = msg->vif;
- int result;
- struct wid wid;
- u8 del_beacon = 0;
-
- wid.id = WID_DEL_BEACON;
- wid.type = WID_CHAR;
- wid.size = sizeof(char);
- wid.val = &del_beacon;
-
- result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
- if (result)
- netdev_err(vif->ndev, "Failed to send delete beacon\n");
- kfree(msg);
-}
-
static void wilc_hif_pack_sta_param(u8 *cur_byte, const u8 *mac,
struct station_parameters *params)
{
@@ -3326,17 +3306,18 @@ error:
int wilc_del_beacon(struct wilc_vif *vif)
{
int result;
- struct host_if_msg *msg;
+ struct wid wid;
+ u8 del_beacon = 0;
- msg = wilc_alloc_work(vif, handle_del_beacon, false);
- if (IS_ERR(msg))
- return PTR_ERR(msg);
+ wid.id = WID_DEL_BEACON;
+ wid.type = WID_CHAR;
+ wid.size = sizeof(char);
+ wid.val = &del_beacon;
- result = wilc_enqueue_work(msg);
- if (result) {
- netdev_err(vif->ndev, "%s: enqueue work failed\n", __func__);
- kfree(msg);
- }
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
+ if (result)
+ netdev_err(vif->ndev, "Failed to send delete beacon\n");
return result;
}