]> git.baikalelectronics.ru Git - kernel.git/commitdiff
qtnfmac: pass max scan SSIDs limit on per-radio basis
authorIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Mon, 27 Jan 2020 10:46:52 +0000 (10:46 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 12 Feb 2020 16:16:45 +0000 (18:16 +0200)
Each radio on a given wifi device may have different max scan SSIDs
limitation, so take this information from a per-radio info structure.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
drivers/net/wireless/quantenna/qtnfmac/commands.c
drivers/net/wireless/quantenna/qtnfmac/core.h
drivers/net/wireless/quantenna/qtnfmac/qlink.h

index a53ffe04a90367e8a3096cae090fb87fb842a3d2..73d5014a42342b7c62f3171b8e57500045509e1f 100644 (file)
@@ -1108,7 +1108,7 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac)
        wiphy->coverage_class = macinfo->coverage_class;
 
        wiphy->max_scan_ssids =
-               (hw_info->max_scan_ssids) ? hw_info->max_scan_ssids : 1;
+               (macinfo->max_scan_ssids) ? macinfo->max_scan_ssids : 1;
        wiphy->max_scan_ie_len = QTNF_MAX_VSIE_LEN;
        wiphy->mgmt_stypes = qtnf_mgmt_stypes;
        wiphy->max_remain_on_channel_duration = 5000;
index 6a13b29bf81412b5964c459cb30676305347be3d..a4be2aa199973549cb858e3db7c606ba331a8bc6 100644 (file)
@@ -941,9 +941,6 @@ qtnf_cmd_resp_proc_hw_info(struct qtnf_bus *bus,
                case QTN_TLV_ID_UBOOT_VER:
                        uboot_ver = (const void *)tlv->val;
                        break;
-               case QTN_TLV_ID_MAX_SCAN_SSIDS:
-                       hwinfo->max_scan_ssids = *tlv->val;
-                       break;
                case QTN_TLV_ID_BITMAP:
                        memcpy(hwinfo->hw_capab, tlv->val,
                               min(sizeof(hwinfo->hw_capab), (size_t)tlv_len));
@@ -1272,6 +1269,7 @@ qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac,
        mac_info->sretry_limit = resp_info->retry_short;
        mac_info->lretry_limit = resp_info->retry_long;
        mac_info->coverage_class = resp_info->coverage_class;
+       mac_info->max_scan_ssids = resp_info->max_scan_ssids;
 
        memcpy(&mac_info->ht_cap_mod_mask, &resp_info->ht_cap_mod_mask,
               sizeof(mac_info->ht_cap_mod_mask));
index 6fe82179df7fc3553ca056fa85fc875a01f96738..b993f9ca14c59f33eae700e4219aaefe3b17ec6f 100644 (file)
@@ -84,6 +84,7 @@ struct qtnf_mac_info {
        u8 sretry_limit;
        u8 coverage_class;
        u8 radar_detect_widths;
+       u8 max_scan_ssids;
        u16 max_acl_mac_addrs;
        struct ieee80211_ht_cap ht_cap_mod_mask;
        struct ieee80211_vht_cap vht_cap_mod_mask;
@@ -117,7 +118,6 @@ struct qtnf_hw_info {
        u8 total_rx_chain;
        char fw_version[ETHTOOL_FWVERS_LEN];
        u32 hw_version;
-       u8 max_scan_ssids;
        u8 hw_capab[QLINK_HW_CAPAB_NUM / BITS_PER_BYTE + 1];
 };
 
index 38d3d60926ff924a4b5765fe83eec9cb88a0de12..16acb10386ad9740b142454064a6339308c928ac 100644 (file)
@@ -965,6 +965,7 @@ enum qlink_dfs_regions {
  * @num_rx_chain: Number of receive chains used by WMAC.
  * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered.
  * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered.
+ * @max_scan_ssids: maximum number of SSIDs the device can scan for in any scan.
  * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band.
  * @max_ap_assoc_sta: Maximum number of associations supported by WMAC.
  * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar.
@@ -1378,8 +1379,6 @@ struct qlink_event_mic_failure {
  * @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by
  *     &struct qlink_sta_stats. Valid values are marked as such in a bitmap
  *     carried by QTN_TLV_ID_BITMAP.
- * @QTN_TLV_ID_MAX_SCAN_SSIDS: maximum number of SSIDs the device can scan
- *     for in any given scan.
  * @QTN_TLV_ID_SCAN_DWELL_ACTIVE: time spent on a single channel for an active
  *     scan.
  * @QTN_TLV_ID_SCAN_DWELL_PASSIVE: time spent on a single channel for a passive
@@ -1415,7 +1414,6 @@ enum qlink_tlv_id {
        QTN_TLV_ID_CALIBRATION_VER      = 0x0406,
        QTN_TLV_ID_UBOOT_VER            = 0x0407,
        QTN_TLV_ID_RANDOM_MAC_ADDR      = 0x0408,
-       QTN_TLV_ID_MAX_SCAN_SSIDS       = 0x0409,
        QTN_TLV_ID_WOWLAN_CAPAB         = 0x0410,
        QTN_TLV_ID_WOWLAN_PATTERN       = 0x0411,
        QTN_TLV_ID_SCAN_FLUSH           = 0x0412,