diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2021-09-16 19:49:18 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-21 18:08:15 +0300 |
commit | 0ec5408cd44855956f7741bd776f44db167801b7 (patch) | |
tree | f4665aa345b9378e1423674084c2f2035a1ffd91 /drivers/net/wireless/microchip/wilc1000/hif.c | |
parent | 3c719fed0f3a5e95b1d164609ecc81c4191ade70 (diff) | |
download | linux-0ec5408cd44855956f7741bd776f44db167801b7.tar.xz |
wilc1000: add new WID to pass wake_enable information to firmware
Add new WID(WID_WOWLAN_TRIGGER) to send wake_enable information to firmware.
In 'set_wakeup' cfg80211_ops callback, the enable information was not
passed to firmware which is required to handle WOWLan trigger notification
from firmware.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210916164902.74629-4-ajay.kathat@microchip.com
Diffstat (limited to 'drivers/net/wireless/microchip/wilc1000/hif.c')
-rw-r--r-- | drivers/net/wireless/microchip/wilc1000/hif.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c index 497a49a182ef..e69b9c7f3d31 100644 --- a/drivers/net/wireless/microchip/wilc1000/hif.c +++ b/drivers/net/wireless/microchip/wilc1000/hif.c @@ -23,6 +23,10 @@ struct wilc_set_multicast { u8 *mc_list; }; +struct host_if_wowlan_trigger { + u8 wowlan_trigger; +}; + struct wilc_del_all_sta { u8 assoc_sta; u8 mac[WILC_MAX_NUM_STA][ETH_ALEN]; @@ -34,6 +38,7 @@ union wilc_message_body { struct wilc_set_multicast mc_info; struct wilc_remain_ch remain_on_ch; char *data; + struct host_if_wowlan_trigger wow_trigger; }; struct host_if_msg { @@ -962,6 +967,25 @@ error: kfree(msg); } +void wilc_set_wowlan_trigger(struct wilc_vif *vif, bool enabled) +{ + int ret; + struct wid wid; + u8 wowlan_trigger = 0; + + if (enabled) + wowlan_trigger = 1; + + wid.id = WID_WOWLAN_TRIGGER; + wid.type = WID_CHAR; + wid.val = &wowlan_trigger; + wid.size = sizeof(char); + + ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1); + if (ret) + pr_err("Failed to send wowlan trigger config packet\n"); +} + static void handle_scan_timer(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); |