ath10k: support NET_DETECT WoWLAN feature
PATCH v2 1/1 ath10k: support NET_DETECT WoWLAN feature
For WoWLAN support, it expect to support wake up based on discovery of one or more known SSIDs. This is the WIPHY_WOWLAN_NET_DETECT feature, which shows up as an NL80211 feature flag.
With an upgrade iw, this shows up in 'iw phy' as:
WoWLAN support:
* wake up on network detection, up to 16 match sets
And it can use command:
"iw phy0 wowlan enable net-detect interval 5000 delay 30 freqs 2412 matches ssid foo" to configure the parameters of net detect.
Firmware will do scan by the configured parameters after suspend and wakeup if it found matched SSIDs. Tested with QCA6174 hw3.0 with firmware WLAN.RM.4.4.1-00110-QCARMSWPZ-1.
---
V2:
-fix the waring of endian
drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 12 ++ drivers/net/wireless/ath/ath10k/wmi-ops.h | 21 +++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 180 +++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 226 ++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 57 ++++++++ drivers/net/wireless/ath/ath10k/wow.c | 168 ++++++++++++++++++++++ 7 files changed, 664 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/core.h +1 -0
@@ -904,6 +904,7 @@ struct ath10k {u32 high_5ghz_chan;bool ani_enabled; +bool nlo_enabled;bool p2p;struct {
drivers/net/wireless/ath/ath10k/mac.c +12 -0
@@ -8361,6 +8361,18 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->max_scan_ssids =WLAN_SCAN_PARAMS_MAX_SSID ; ar->hw->wiphy->max_scan_ie_len =WLAN_SCAN_PARAMS_MAX_IE_LEN ; +if (test_bit (WMI_SERVICE_NLO , ar->wmi.svc_map)) { + ar->hw->wiphy->max_sched_scan_reqs =1 ; + ar->hw->wiphy->max_sched_scan_ssids =WMI_PNO_MAX_SUPP_NETWORKS ; + ar->hw->wiphy->max_match_sets =WMI_PNO_MAX_SUPP_NETWORKS ; + ar->hw->wiphy->max_sched_scan_ie_len =WMI_PNO_MAX_IE_LENGTH ; + ar->hw->wiphy->max_sched_scan_plans =WMI_PNO_MAX_SCHED_SCAN_PLANS ; + ar->hw->wiphy->max_sched_scan_plan_interval = +WMI_PNO_MAX_SCHED_SCAN_PLAN_INT ; + ar->hw->wiphy->max_sched_scan_plan_iterations = +WMI_PNO_MAX_SCHED_SCAN_PLAN_ITRNS ; + } + ar->hw->vif_data_size =sizeof (struct ath10k_vif ); ar->hw->sta_data_size =sizeof (struct ath10k_sta ); ar->hw->txq_data_size =sizeof (struct ath10k_txq );
drivers/net/wireless/ath/ath10k/wmi-ops.h +21 -0
@@ -208,6 +208,9 @@ struct wmi_ops { u32 fw_feature_bitmap);int (*get_vdev_subtype)(struct ath10k *ar,enum wmi_vdev_subtype subtype); +struct sk_buff *(*gen_wow_config_pno)(struct ath10k *ar, +u32 vdev_id, +struct wmi_pno_scan_req *pno_scan);struct sk_buff *(*gen_pdev_bss_chan_info_req) (struct ath10k *ar,enum wmi_bss_survey_req_type type);
@@ -1349,6 +1352,24 @@ struct wmi_ops { }static inline int +ath10k_wmi_wow_config_pno (struct ath10k *ar,u32 vdev_id, +struct wmi_pno_scan_req *pno_scan) +{ +struct sk_buff *skb; +u32 cmd_id; + +if (!ar->wmi.ops->gen_wow_config_pno) +return -EOPNOTSUPP ; + + skb = ar->wmi.ops->gen_wow_config_pno (ar, vdev_id, pno_scan); +if (IS_ERR (skb)) +return PTR_ERR (skb); + + cmd_id = ar->wmi.cmd->network_list_offload_config_cmdid; +return ath10k_wmi_cmd_send (ar, skb, cmd_id); +} + +static inline int ath10k_wmi_update_fw_tdls_state (struct ath10k *ar,u32 vdev_id,enum wmi_tdls_state state) {
drivers/net/wireless/ath/ath10k/wmi-tlv.c +179 -1
198 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi-tlv.h +226 -0
232 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.h +57 -0
63 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wow.c +168 -0
198 lines not on this page · raw message
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k