qcacmn: Control the size of the freq and chan_num (Scan)

Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:-

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD ) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size: When the frequency range is not very
large, a smaller size(e.g. 16bit integer) can be used. It saves a
large amount of space especially when many large arrays containing
elements of this type/size are defined in the driver.

Also, change the size of the IEEE channel variables to unsigned
8-bit integer.

Change-Id: Ie503623ec6e4473abe8ee95c19dc4470853326dd
CRs-Fixed: 2586177
This commit is contained in:
Abhijit Pradhan
2019-11-25 14:07:17 +05:30
committed by nshrivas
parent 2c1420a617
commit 0f16cba633
2 changed files with 5 additions and 5 deletions

View File

@@ -810,7 +810,7 @@ struct probe_req_whitelist_attr {
* @phymode: phymode in which @frequency should be scanned
*/
struct chan_info {
uint32_t freq;
qdf_freq_t freq;
uint32_t phymode;
};
@@ -821,7 +821,7 @@ struct chan_info {
* @chan: channel parameters used for this scan
*/
struct chan_list {
uint32_t num_chan;
uint8_t num_chan;
struct chan_info chan[NUM_CHANNELS];
};

View File

@@ -1278,8 +1278,8 @@ ucfg_scan_init_bssid_params(struct scan_start_request *req,
*/
static bool
is_chan_enabled_for_scan(struct regulatory_channel *reg_chan,
uint32_t low_2g, uint32_t high_2g, uint32_t low_5g,
uint32_t high_5g)
qdf_freq_t low_2g, qdf_freq_t high_2g, qdf_freq_t low_5g,
qdf_freq_t high_5g)
{
if (reg_chan->state == CHANNEL_STATE_DISABLE)
return false;
@@ -1307,7 +1307,7 @@ ucfg_scan_init_chanlist_params(struct scan_start_request *req,
uint32_t idx;
QDF_STATUS status;
struct regulatory_channel *reg_chan_list = NULL;
uint32_t low_2g, high_2g, low_5g, high_5g;
qdf_freq_t low_2g, high_2g, low_5g, high_5g;
struct wlan_objmgr_pdev *pdev = NULL;
uint32_t *scan_freqs = NULL;
uint32_t max_chans = sizeof(req->scan_req.chan_list.chan) /