qcacmn: Process rx_mgmt_pkt based on frequency

As a part of 802.11ax amendment, 6GHz band operation is added.
Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: I33e31fa124cedfab31dd1827721a420ad6cdba07
CRs-Fixed: 2519512
This commit is contained in:
Ashish Kumar Dhanotiya
2019-08-29 19:17:44 +05:30
committed by nshrivas
부모 973308ae13
커밋 75ccbd439c
7개의 변경된 파일111개의 추가작업 그리고 57개의 파일을 삭제

파일 보기

@@ -89,15 +89,15 @@ struct wlan_objmgr_psoc;
/**
* struct channel_info - BSS channel information
* @chan_idx: current operating channel index
* @chan_freq: channel frequency
* @cfreq0: channel frequency index0
* @cfreq1: channel frequency index1
* @priv: channel private information
*/
struct channel_info {
uint8_t chan_idx;
uint8_t cfreq0;
uint8_t cfreq1;
uint32_t chan_freq;
uint32_t cfreq0;
uint32_t cfreq1;
void *priv;
};
@@ -317,6 +317,7 @@ struct scan_mbssid_info {
* @alt_wcn_ie: alternate WCN IE
* @ie_list: IE list pointers
* @raw_frame: contain raw frame and the length of the raw frame
* @pdev_id: pdev id
*/
struct scan_cache_entry {
uint8_t frm_subtype;
@@ -357,6 +358,12 @@ struct scan_cache_entry {
struct element_info alt_wcn_ie;
struct ie_list ie_list;
struct element_info raw_frame;
/*
* This is added temporarily for 6GHz channel to freq conversion
* to get pdev wherever it requores to convert frequency to
* channel as regulatory apis requires pdev as argument
*/
uint8_t pdev_id;
};
#define MAX_FAVORED_BSSID 16

파일 보기

@@ -30,6 +30,7 @@
#include <wlan_objmgr_vdev_obj.h>
#include <wlan_scan_public_structs.h>
#include<wlan_mgmt_txrx_utils_api.h>
#include <wlan_reg_services_api.h>
#define ASCII_SPACE_CHARACTER 32
@@ -741,17 +742,17 @@ util_scan_entry_channel(struct scan_cache_entry *scan_entry)
}
/**
* util_scan_entry_channel_num() - function to read channel number
* util_scan_entry_channel_frequency() - function to read channel number
* @scan_entry: scan entry
*
* API, function to read channel number
*
* Return: channel number
*/
static inline uint8_t
util_scan_entry_channel_num(struct scan_cache_entry *scan_entry)
static inline uint32_t
util_scan_entry_channel_frequency(struct scan_cache_entry *scan_entry)
{
return scan_entry->channel.chan_idx;
return scan_entry->channel.chan_freq;
}
/**

파일 보기

@@ -141,8 +141,8 @@ bool util_is_scan_entry_match(
util_scan_is_null_ssid(&entry2->ssid))
return true;
} else if (entry1->cap_info.wlan_caps.ibss &&
(entry1->channel.chan_idx ==
entry2->channel.chan_idx)) {
(entry1->channel.chan_freq ==
entry2->channel.chan_freq)) {
/*
* Same channel cannot have same SSID for
* different IBSS, so no need to check BSSID
@@ -499,7 +499,8 @@ util_scan_parse_vendor_ie(struct scan_cache_entry *scan_params,
}
static QDF_STATUS
util_scan_populate_bcn_ie_list(struct scan_cache_entry *scan_params)
util_scan_populate_bcn_ie_list(struct scan_cache_entry *scan_params,
uint8_t *chan_idx)
{
struct ie_header *ie, *sub_ie;
uint32_t ie_len, sub_ie_len;
@@ -539,7 +540,7 @@ util_scan_populate_bcn_ie_list(struct scan_cache_entry *scan_params)
if (ie->ie_len != WLAN_DS_PARAM_IE_MAX_LEN)
return QDF_STATUS_E_INVAL;
scan_params->ie_list.ds_param = (uint8_t *)ie;
scan_params->channel.chan_idx =
*chan_idx =
((struct ds_ie *)ie)->cur_chan;
break;
case WLAN_ELEMID_TIM:
@@ -617,8 +618,8 @@ util_scan_populate_bcn_ie_list(struct scan_cache_entry *scan_params)
goto err;
scan_params->ie_list.htinfo =
(uint8_t *)&(((struct wlan_ie_htinfo *) ie)->hi_ie);
scan_params->channel.chan_idx =
((struct wlan_ie_htinfo_cmn *)
*chan_idx =
((struct wlan_ie_htinfo_cmn *)
(scan_params->ie_list.htinfo))->hi_ctrlchannel;
break;
case WLAN_ELEMID_WAPI:
@@ -1045,7 +1046,7 @@ util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *scan_entry;
struct qbss_load_ie *qbss_load;
struct scan_cache_node *scan_node;
uint8_t i;
uint8_t i, chan_idx = 0;
scan_entry = qdf_mem_malloc_atomic(sizeof(*scan_entry));
if (!scan_entry) {
@@ -1079,6 +1080,7 @@ util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
scan_entry->rssi_raw = rx_param->rssi;
scan_entry->avg_rssi = WLAN_RSSI_IN(scan_entry->rssi_raw);
scan_entry->tsf_delta = rx_param->tsf_delta;
scan_entry->pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
/* Copy per chain rssi to scan entry */
qdf_mem_copy(scan_entry->per_chain_rssi, rx_param->rssi_ctl,
@@ -1119,7 +1121,7 @@ util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
scan_entry->raw_frame.len = frame_len;
qdf_mem_copy(scan_entry->raw_frame.ptr,
frame, frame_len);
status = util_scan_populate_bcn_ie_list(scan_entry);
status = util_scan_populate_bcn_ie_list(scan_entry, &chan_idx);
if (QDF_IS_STATUS_ERROR(status)) {
scm_debug("failed to parse beacon IE");
qdf_mem_free(scan_entry->raw_frame.ptr);
@@ -1139,13 +1141,21 @@ util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
if (scan_entry->ie_list.p2p)
scan_entry->is_p2p = true;
if (chan_idx) {
uint8_t band_mask = BIT(wlan_reg_freq_to_band(
rx_param->chan_freq));
scan_entry->channel.chan_freq =
wlan_reg_chan_band_to_freq(
pdev, chan_idx,
band_mask);
}
/* If no channel info is present in beacon use meta channel */
if (!scan_entry->channel.chan_idx) {
scan_entry->channel.chan_idx =
rx_param->channel;
} else if (rx_param->channel !=
scan_entry->channel.chan_idx) {
if (!wlan_reg_chan_is_49ghz(pdev, scan_entry->channel.chan_idx))
if (!scan_entry->channel.chan_freq) {
scan_entry->channel.chan_freq = rx_param->chan_freq;
} else if (rx_param->chan_freq !=
scan_entry->channel.chan_freq) {
if (!wlan_reg_is_49ghz_freq(scan_entry->channel.chan_freq))
scan_entry->channel_mismatch = true;
}
@@ -1161,7 +1171,7 @@ util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
}
qdf_mem_copy(&scan_entry->mbssid_info, mbssid_info,
sizeof(scan_entry->mbssid_info));
if (WLAN_CHAN_IS_5GHZ(scan_entry->channel.chan_idx))
if (WLAN_REG_IS_5GHZ_CH_FREQ(scan_entry->channel.chan_freq))
scan_entry->phy_mode = util_scan_get_phymode_5g(scan_entry);
else
scan_entry->phy_mode = util_scan_get_phymode_2g(scan_entry);