Commit 8f1180e0 authored by Andrey Shevchenko's avatar Andrey Shevchenko Committed by Kalle Valo

qtnfmac: enable multiple SSIDs scan support

Enable support for multiple SSIDs scans. Get max number of supported
SSIDs from firmware and report to cfg80211 core.
Signed-off-by: default avatarAndrey Shevchenko <ashevchenko@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4775ad06
...@@ -995,7 +995,8 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) ...@@ -995,7 +995,8 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac)
wiphy->retry_long = macinfo->lretry_limit; wiphy->retry_long = macinfo->lretry_limit;
wiphy->coverage_class = macinfo->coverage_class; wiphy->coverage_class = macinfo->coverage_class;
wiphy->max_scan_ssids = QTNF_MAX_SSID_LIST_LENGTH; wiphy->max_scan_ssids =
(hw_info->max_scan_ssids) ? hw_info->max_scan_ssids : 1;
wiphy->max_scan_ie_len = QTNF_MAX_VSIE_LEN; wiphy->max_scan_ie_len = QTNF_MAX_VSIE_LEN;
wiphy->mgmt_stypes = qtnf_mgmt_stypes; wiphy->mgmt_stypes = qtnf_mgmt_stypes;
wiphy->max_remain_on_channel_duration = 5000; wiphy->max_remain_on_channel_duration = 5000;
......
...@@ -1092,6 +1092,9 @@ qtnf_cmd_resp_proc_hw_info(struct qtnf_bus *bus, ...@@ -1092,6 +1092,9 @@ qtnf_cmd_resp_proc_hw_info(struct qtnf_bus *bus,
case QTN_TLV_ID_UBOOT_VER: case QTN_TLV_ID_UBOOT_VER:
uboot_ver = (const void *)tlv->val; uboot_ver = (const void *)tlv->val;
break; break;
case QTN_TLV_ID_MAX_SCAN_SSIDS:
hwinfo->max_scan_ssids = *tlv->val;
break;
default: default:
break; break;
} }
...@@ -2260,11 +2263,6 @@ int qtnf_cmd_send_scan(struct qtnf_wmac *mac) ...@@ -2260,11 +2263,6 @@ int qtnf_cmd_send_scan(struct qtnf_wmac *mac)
int count = 0; int count = 0;
int ret; int ret;
if (scan_req->n_ssids > QTNF_MAX_SSID_LIST_LENGTH) {
pr_err("MAC%u: too many SSIDs in scan request\n", mac->macid);
return -EINVAL;
}
cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD, cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD,
QLINK_CMD_SCAN, QLINK_CMD_SCAN,
sizeof(struct qlink_cmd)); sizeof(struct qlink_cmd));
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#undef pr_fmt #undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ #define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
#define QTNF_MAX_SSID_LIST_LENGTH 2
#define QTNF_MAX_VSIE_LEN 255 #define QTNF_MAX_VSIE_LEN 255
#define QTNF_MAX_INTF 8 #define QTNF_MAX_INTF 8
#define QTNF_MAX_EVENT_QUEUE_LEN 255 #define QTNF_MAX_EVENT_QUEUE_LEN 255
...@@ -145,6 +144,7 @@ struct qtnf_hw_info { ...@@ -145,6 +144,7 @@ struct qtnf_hw_info {
u8 total_rx_chain; u8 total_rx_chain;
char fw_version[ETHTOOL_FWVERS_LEN]; char fw_version[ETHTOOL_FWVERS_LEN];
u32 hw_version; u32 hw_version;
u8 max_scan_ssids;
}; };
struct qtnf_vif *qtnf_mac_get_free_vif(struct qtnf_wmac *mac); struct qtnf_vif *qtnf_mac_get_free_vif(struct qtnf_wmac *mac);
......
...@@ -1091,6 +1091,8 @@ struct qlink_event_radar { ...@@ -1091,6 +1091,8 @@ struct qlink_event_radar {
* @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by * @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by
* &struct qlink_sta_stats. Valid values are marked as such in a bitmap * &struct qlink_sta_stats. Valid values are marked as such in a bitmap
* carried by QTN_TLV_ID_STA_STATS_MAP. * carried by QTN_TLV_ID_STA_STATS_MAP.
* @QTN_TLV_ID_MAX_SCAN_SSIDS: maximum number of SSIDs the device can scan
* for in any given scan.
*/ */
enum qlink_tlv_id { enum qlink_tlv_id {
QTN_TLV_ID_FRAG_THRESH = 0x0201, QTN_TLV_ID_FRAG_THRESH = 0x0201,
...@@ -1119,6 +1121,7 @@ enum qlink_tlv_id { ...@@ -1119,6 +1121,7 @@ enum qlink_tlv_id {
QTN_TLV_ID_CALIBRATION_VER = 0x0406, QTN_TLV_ID_CALIBRATION_VER = 0x0406,
QTN_TLV_ID_UBOOT_VER = 0x0407, QTN_TLV_ID_UBOOT_VER = 0x0407,
QTN_TLV_ID_RANDOM_MAC_ADDR = 0x0408, QTN_TLV_ID_RANDOM_MAC_ADDR = 0x0408,
QTN_TLV_ID_MAX_SCAN_SSIDS = 0x0409,
}; };
struct qlink_tlv_hdr { struct qlink_tlv_hdr {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment