Commit 0d18a9c0 authored by Igor Mitsyanko's avatar Igor Mitsyanko Committed by Kalle Valo
Browse files

qtnfmac: pass max scan SSIDs limit on per-radio basis



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: default avatarIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 601ce21f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −3
Original line number Diff line number Diff line
@@ -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));
+1 −1
Original line number Diff line number Diff line
@@ -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];
};

+1 −3
Original line number Diff line number Diff line
@@ -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,