Grafik Komit

494 Melakukan

Penulis SHA1 Pesan Tanggal
Hariharan Basuthkar
27dc40344d qcacmn: Check the state of 4.9G channels in reg_compute_chan_to_freq
In the 5G radio, if the current regulatory domain does not support
4.9Ghz channels, and if 4.9Ghz IEEE channel number 1 to 11 are given as
an input to reg_compute_chan_to_freq, instead of returning 0,
it returns the corresponding center frequency of the 4.9 Ghz IEEE
channel number.

This is because the channel state and chan_flags of the 4.9Ghz channel
are not checked, that is why it returns the valid channel frequency.

To fix this issue, check the channel state and chan_flags of the
4.9Ghz channel before returning the non-zero channel frequency.

Change-Id: Icedd74422b4194ac4f1affed7e9f131fb8426986
CRs-Fixed: 2738248
2020-08-03 04:06:50 -07:00
Hariharan Basuthkar
504e0726c7 qcacmn: Add a new API wlan_reg_is_6g_freq_indoor
Add a new API wlan_reg_is_6g_freq_indoor, to check if a 6G channel
frequency is indoor.

Change-Id: I2ccdcc2760b6aeade0409346a315b004014525c7
CRs-Fixed: 2731637
2020-07-31 03:44:54 -07:00
Linux Build Service Account
f262df3fb7 Merge "qcacmn: Remove references to CHAN_NUM_API" 2020-07-25 04:37:11 -07:00
Vijay Krishnan
53f1d00e8f qcacmn: Remove references to CHAN_NUM_API
CONFIG_CHAN_NUM_API macro will be disabled. Remove all the references to
any function defined/declared under the macro. The function
reg_get_channel_list_with_power was placed under CHAN_NUM_API by mistake.
This API does not have any CHAN_FREQ_API counterpart. Therefore, move
this function out of CHAN_NUM_API macro.

The function dfs_send_radar_ind_for_freq is redundant as its counterpart
dfs_send_radar_ind has the same arguments and same functionality,
removing the function dfs_send_radar_ind_for_freq. The function
dfs_send_radar_ind is moved out of CHAN_NUM_API macro.

The function wlan_reg_chan_to_freq, wlan_reg_legacy_chan_to_freq is
moved out of CONFIG_CHAN_NUM_API macro. Since it is applicable for legacy
bands.

CRs-Fixed: 2711600
Change-Id: Ib29be638c17ce51f928c865e362ac5b2b8954b42
2020-07-23 21:37:06 -07:00
Gururaj Pandurangi
0bd8b1bf75 qcacmn: Update reg dmn to support new 5.9 ghz chan
Update reg domain rules to support three new
channels in 5.9 GHz for US.
New channels are 169, 173 and 177 with freq
5845, 5865 and 5885 MHz respectively.
These new channels will be controlled by an
ini fcc_5dot9_ghz_chan_in_master_mode and
a service bit WMI_SERVICE_5_DOT_9GHZ_SUPPORT.
If the service bit is not set we disable the
new channels, and if service bit is set but not
the ini, we make the channels passive. If both
are set, they will be enabled.

Change-Id: I575b02ad387cbda00b015f7075d80c907463bdef
CRs-Fixed: 2683702
2020-07-23 17:24:09 -07:00
Gururaj Pandurangi
b1f6686944 qcacmn: Enable three new 5.9 ghz channels for US
Add new channel bonding pairs as well as frequency
pairs for 40, 80 and 160 MHz with the support of
three new 5.9 GHz channels 169, 173 and 177.
Add new API reg_modify_chan_list_for_5dot9_ghz_channels
to enable/disable these new channels based on
INI value and service bit.

Change-Id: I8598e705ba4047e96e7167661ba70d4236cde251
CRs-Fixed: 2696211
2020-07-23 17:24:06 -07:00
Hariharan Basuthkar
ae92ea605f qcacmn: Fix KW issue in the regulatory component
In  I3c82e2eb98cdaf0ff8754bd990529a1833276304, KW error is reported in
the function, reg_compute_chan_to_freq.

This is because min_chan_range and max_chan_range can be assigned values,
that can cause array out of bounds issue.

To fix the issue, add explicit range checks against min_chan_range and
max_chang_range before iterating through master_chan_list to
avoid out of bound access.

Change-Id: Id5cd032fb899475720080b29012a6de1b5d4a916
CRs-Fixed: 2727082
2020-07-20 04:47:04 -07:00
Lincoln Tran
7a0d8efdaa qcacmn: Update regulatory to use bitmap for band
Setband changes require support for 6G band. Using a bitmap
better supports the addition of new bands. Changes to support
this include:
	1. Update band_capability in regulatory pdev priv obj
	   to be a bitmap.
	2. Add API to convert between the bitmap and
	   enum band_info.
	3. Update channel list modifying function to include
	   case for 6G band.
	4. Update the get and set APIs to use uint32_t instead
	   of band_info.

Change-Id: Iff38fdd7cc540a0e471647de349d7fa57b3a8467
CRs-fixed: 2726285
2020-07-14 22:45:42 -07:00
Lincoln Tran
b5e2eeb87d qcacmn: Remove reg_get_curr_band
Remove reg_get_curr_band because it has the same functionality
as reg_get_band.

Change-Id: I7fa5abfe6a552cc617cd810b41b152c70b3429b8
CRs-fixed: 2726300
2020-07-14 22:45:29 -07:00
Amar Singhal
df1414b0f6 qcacmn: Compute correct channel width for freq
Compute correct channel width for a given frequency by calling
the regulatory channel bonding API.

Change-Id: I3627bc2a4f4c832887447bd6b28abd3432bffa73
CRS-Fixed: 2728810
2020-07-12 07:31:32 -07:00
Amar Singhal
91c8fbfde4 qcacmn: Reduce the level of logs for reg-domain
In regulatory offload case; customer may be using his own
customized regdb. In that case, the host regdb can be different
from firmware regdb. Therefore, reduce the log level.

Change-Id: I165745bd5cb22fe95ae96f387db4d65e39f446ec
CRs-Fixed: 2728587
2020-07-12 05:17:26 -07:00
Amar Singhal
07cc4bb4b1 qcacmn: Maintain wiphy init and de-init states
Wiphy is attached to pdev after pdev has been created, but before pdev
is opened. So maintain the state of wiphy in pdev open and close
callbacks. While calling regulatory callbacks, check the wiphy init
state.

Change-Id: I51243017ac24bc4473abddbfd0506b9e3490de4a
CRs-Fixed: 2718363
2020-07-02 05:55:54 -07:00
Ashish Kumar Dhanotiya
e7e012dc4d Revert "qcacmn: Update freq range 5170-5250 to indoor only for APL9"
This reverts commit I7c52fc76b5a8d6a47d515025d05b110332347246.

Change-Id: I3e24134e02a5a1a3f4a0f901b1c0742c21bd52fa
CRs-Fixed: 2719624
2020-06-30 14:58:25 -07:00
Hariharan Basuthkar
5816c50032 qcacmn: 11ax draft 6.1 6G channelization update
In 11ax draft 6.1, the 6G starting frequency has been shifted by 10 MHz
to the right from 5940 to 5950. Make the following changes in various
variables and structures in the regulatory component:

1. Add a macro SIX_GHZ_NON_ORPHAN_START_FREQ.
2. Add an orphan channel frequency - 5935 MHz to the chan enum.
3. Shift every enum in channel_enum by 10 MHz to the right.
4. Shift MIN_CHANNEL_6GHZ and MAX_CHANNEL_6GHZ by 10 MHz on the right.
5. Shift every center frequeny by 10 MHz on the right in
   bonded_chan_40mhz_list_freq, bonded_chan_80mhz_list_freq,
   bonded_chan_160mhz_list_freq.
6. Shift every center frequeny by 10 MHz on the right in channel_map_us,
   channel_map_eu, channel_map_japan, channel_map_global and
   channel_map_china channel maps.
7. Change 6G starting frequency from 5940 to 5950 for operating class
   131 to 135 in the global_op_class table.
   table.
8. Add operating class 136 in the global_op_class table.

Change-Id: I3c82e2eb98cdaf0ff8754bd990529a1833276304
CRs-Fixed: 2704977
2020-06-27 22:45:43 -07:00
Hariharan Basuthkar
d5b80abab6 qcacmn: Make regulatory APIs common for both WIN and MCC
Make reg_is_disable_for_freq and reg_is_disable_ch common for both WIN
and MCC, by moving the definition from reg_utils.c to
reg_services_common.c and declaration from reg_utils.h to
reg_services_common.h.

Change-Id: I6425c99b403580836d1ee41839086f4df3971091
CRs-Fixed: 2718047
2020-06-25 13:17:57 -07:00
Jianmin Zhu
4f9ae24e67 qcacmn: Replace channel with frequency for 6G
Replace WLAN_REG_IS_24GHZ_CH with WLAN_REG_IS_24GHZ_CH_FREQ

Change-Id: Ia2ff3a317f0286b0a6ca4d8642007e1a608c3e3d
CRs-Fixed: 2714721
2020-06-23 04:01:17 -07:00
Ashish Kumar Dhanotiya
f816484b13 qcacmn: Update freq range 5170-5250 to indoor only for APL9
Based on the latest update in the regulatory, update
frequency range 5170-5250 to indoor only for APL9 reg domain.

Change-Id: I7c52fc76b5a8d6a47d515025d05b110332347246
CRs-Fixed: 2707525
2020-06-16 14:17:43 -07:00
Hariharan Basuthkar
6cb56806d3 qcacmn: Place wlan_reg_is_6ghz_supported under CONFIG_REG_CLIENT macro
Place wlan_reg_is_6ghz_supported under CONFIG_REG_CLIENT macro as it
is an MCC specific API.

Also, within reg_update_pdev_wireless_modes, return QDF_STATUS_E_INVAL
if pdev_priv_obj is NULL.

Change-Id: I1ec23b2f44aec037ba99a2fd71812c8287c9f4dc
CRs-Fixed: 2704712
2020-06-12 01:04:17 -07:00
Amar Singhal
af142cc672 qcacmn: Use channel flags to determine DFS channel
Use channel flags to determine DFS channel. Channel state is
set to CHANNEL_STATE_DFS even for passive channel.

Change-Id: I5ff88f05d2967f9e93de028d59d91369b66303c5
CRs-Fixed: 2695162
2020-06-10 20:23:17 -07:00
Edayilliam Jayadev
fb564225fb qcacmn: Check agile frequency forms a valid 80+80 channel
For agile scan request in 80 + 80 MHz check whether the user given
agile frequency forms a valid 80+80 channel.

CRs-Fixed: 2690964
Change-Id: Ia374333118d4f06861a1cfe0a75db349bca9e879
2020-06-09 06:29:08 -07:00
Ananya Barat
1aa085fcd2 qcacmn: Map Korea to channel_map_us instead of channel_map_eu
In the current implementation, Korea is mapped to channel_map_eu.
Korea is mapped to 5G regdomain APL9 which supports 80MHz channels
upto 161. However, the Europe opclass supports 80 MHz channels only
upto 128. As a result, when the AP tries to switch to the 80 MHz channel
149, the opclass validation logic finds this invalid and fills wrong
channel and opclass number in the ECSA IE. This leads the STA to
disconnect.

Fix this by mapping Korea to channel_map_global for Tx, which will map
it to the Global Operating Class by the following logic:
US Op Class Table : Countries having FCC DFS Region Eg: USA , Canada
EU Op Class Table : Countries having ETSI DFS Region Eg: Denmark
CN Op Class Table : Countries having China DFS Region Eg : China
JP Op Class Table : Countries having MKK DFS Region Eg : Japan
Global Op Class Table : All other countries

Change-Id: I5c6ff14888b218bc4fce707335ba53f60f579e19
CRs-Fixed: 2692802
2020-06-09 04:23:01 -07:00
Shashikala Prabhu
4a452b5de6 qcacmn: Update 11AX wireless modes in reg psoc structure
FW advertises the 11AX wireless modes in service ready ext2 event.
Add a regulatory API to update these modes in regulatory  psoc
private object.

Change-Id: I51e781f6819dabf2b98e129a996213a7eecbf8b2
CRs-Fixed: 2650136
2020-06-08 18:37:00 -07:00
Hariharan Basuthkar
04f7a32d29 qcacmn: Modify reg_rules in FCC4
As per regulatory update database xls, FCC4 supports 4.9GHz channels,
as well as 5G channels. But currently only 4.9GHz support is present.

Therefore, add the 5G reg_rules in FCC4's definition to support 5GHz
channels.

Change-Id: Ib71c01635f5aef18c4597ee3f699b5b033087112
CRs-Fixed: 2689729
2020-06-08 13:50:27 -07:00
Lincoln Tran
0779b77211 qcacmn: Add regulatory API for phymode change
Add new enum in regulatory to hold all current phymodes.
Add a new API to get max allowed phymode which is not more than the
user provided phymode.

This change simplifies the phymode selection process when starting
or updating the parameters of a vdev.

Change-Id: I12c15e357b80faf2f5272800e55179f02755a263
CRs-fixed: 2658290
2020-06-03 13:33:40 -07:00
Lincoln Tran
f682392d3e qcacmn: Update country to have correct phymode map
The following 3 countries will not support 802.11ax:
1) Belarus
2) Russia
3) Ukraine

This change updates the phymode bitmap for those countries.

Change-Id: I8cd293341d82446cfb5f99eb912a925f4f3398b3
CRs-fixed: 2658290
2020-06-03 13:33:36 -07:00
Ananya Barat
9cd92dce58 qcacmn: Fill the max 5G bandwidth from the regdomains_5g table
In the current implementation the max_5g_bw was hardcoded as 160 MHz
in reg_get_max_5g_bw_from_regdomain, as this information was not
available in regdomains_5g so far.

However, the regdomains_5g table has been updated to make the maximum
5G bandwidth supported by the regdomain available. Hence updating this
information.

Change-Id: I9b9aea9a81b6b0d6f590c266e49a6b4ca3a9e32c
2020-06-01 05:23:29 -07:00
Hariharan Basuthkar
4f9a6b9016 qcacmn: Add max_bw field in struct regdomain
When RD ETSI11 is configued, 5G HT40 channels are getting built for
low band channel frequencies. As per regulatory update #31,
this is not allowed.

To fix this issue, add a new field max_bw that indicates the maximum
supported bandwidth by a regdomain. Add max_bw values for all 2G and
5G regdomains definitions. Also pick bandwidth between reg-domain's
max_bw and country's max_bw.

Change-Id: Ie0e9f9c7d9ae21eea2bc534626ef7a13602577bb
CRs-Fixed: 2682424
2020-05-25 04:25:05 -07:00
Gururaj Pandurangi
dce7e20f02 qcacmn: Fix possible out of bound access
In reg_set_5g_channel_params_for_freq if the input channel
bandwidth is 5MHz then while getting the next lower bandwidth
out of bound access occurs.
Fix out of bound access in getting next lower bandwidth value.

Change-Id: Ice394e68e01a5fb4c8e4098395897a8d5a1d24a9
CRs-Fixed: 2680938
2020-05-21 17:50:37 -07:00
Neha Bisht
466c04dee9 qcacmn: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfile from
wlan_objmgr_psoc_obj.h

Change-Id: Ida8472e6f05a90b3930b5a13a2bf89ea8b3e938f
2020-05-15 10:41:46 -07:00
Hariharan Basuthkar
d9ac920d7d qcacmn: Fetch phybitmap from regulatory
Add an API wlan_reg_get_phybitmap, to retrieve the phybitmap from the
regulatory pdev_priv_obj->phybitmap.

Change-Id: Ie03ab69b2378f7243bbacc15c71007cdf0386ef6
CRs-Fixed: 2675030
2020-05-12 23:37:06 -07:00
Hariharan Basuthkar
b38a8f8122 qcacmn: Update regdb based on database version 31
Update regdb with QCA regulatory database version 31 with following
changes:

1) Map Andorra to ETSI1_WORLD for WIN and DSRC, and ETSI13_WORLD for MCC.
2) Map Armenia to APL4_WORLD for WIN, and ETSI4_WORLD for DSRC and MCC.
3) Enable 40, 80 and 160 MHz BW support for Armenia.
4) Enable 40, 80 and 160 MHz BW support for Bahrain.
5) Add Indoor flag in lower bands for APL15.
6) Map Bolivia to FCC8_WORLD for WIN  and FCC3_WORLD for MCC.
7) Map Brunei to FCC8_WORLD for WIN and FCC3_WORLD for MCC.
8) Map Ecuador to FCC3_FCCA for WIN and MCC.
9) Enable 40, 80 and 160 MHz BW support for Ecuador.
10) Map El Salvador to FCC3_WORLD for WIN and MCC.
11) Enable 40, 80 and 160 MHz BW support for El Salvador.
12) Map Japan to MKK17_MKKC for MCC and DSRC.
13) Map Kuwait to ETSI1_WORLD for WIN and ETSI13_WORLD for MCC and DSRC.
14) Map Sri Lanka to FCC3_ETSIC for WIN, MCC and DSRC.
15) Enable 40, 80 and 160 MHz BW support for Sri Lanka.
16) Map Yemen to ETSI1_WORLD for WIN, MCC and DSRC.
17) Enable 40, 80 and 160 MHz BW support for Yemen.
18) Remove 40/80/160 MHz channels support in ETSI11.

Change-Id: Ieba86cb99f6963432777cd6aaa6ffb6b3e72b657
CRs-Fixed: 2662186
2020-05-12 23:36:58 -07:00
Ananya Barat
4a127a8976 qcacmn: Get max 5G bandwidth from country code or regdomain pair
If the country code is present, from the country code get the country
index in g_all_countries. Then get the maximum 5G bandwidth supported
by the country. Otherwise, from the regdomain pair value, get the max
5G bandwidth that is supported by that regdomain.

One of the applications of the maximum 5Ghz bandwidth is the following:
Build the 80P80 channels only if 160 MHz bandwidth is supported by the
country

Change-Id: I9e09fdc3a9a276c75f3fc709ee041a47ec812516
CRs-Fixed: 2673083
2020-05-12 13:45:23 -07:00
Anirban Sirkhell
d7f7842cbe qcacmn: Fix compilation when HOST_OPCLASS is not defined
Match the type of the first parameter of the function
definition with the type of the first argument of function call.

CRs-Fixed: 2670065
Change-Id: Ifd9bd138caf5b3e0a547bc9a8bd2da38f0f8f675
2020-05-10 04:39:08 -07:00
Hariharan Basuthkar
794de3dacb qcacmn: Find if a range has only 6Ghz channels
The range given/provided by the FW (low_5g, hi_5g), may contain both
5Ghz IEEE channels and 6Ghz IEEE channels.

Add an API wlan_reg_is_range_only6g to check if the input low and
high channel frequencies are only in the 6Ghz frequency range, and also,
place the API changes under a macro CONFIG_6G_FREQ_OVERLAP. First find
out if 5Ghz and/or 6Ghz range are available. Then, by applying the
method of exclusion find out if the range provided by the FW is only a
6G range.

Change-Id: I29675a6520a27257f3d1c7424b7f0c94797244cc
CRs-Fixed: 2676307
2020-05-06 03:10:10 -07:00
Sumedh Baikady
b1e18c841d qcacmn: Export freq to opclass routine symbol
Export wlan_reg_freq_width_to_chan_op_class_auto symbol
to be used in qca_ol module for retrieving opclass.

Change-Id: I44d9c424d66caf168d443f3542361deb9b3de300
2020-04-28 17:52:15 -07:00
Ananya Barat
dcf1fef9b3 qcacmn: Correct the start frequency for 2G channel 14 in japan_op_class
The function reg_freq_width_to_chan_op_class calculates the channel
number and opclass to be filled in the ECSA IE. In this function,
there is a check if (op_class_tbl->start_freq + FREQ_TO_CHAN_SCALE
		     *op_class_tbl->channels[i] == freq)
In case of channel 14 in Japan opclass, since the start_freq =2407,
FREQ_TO_CHAN_SCALE=5 and channels[i] =14, this condition evaluates
to false and chan_num and opclass are not filled.

Fix this by setting the start_freq as 2414 as is done for the
global_op_class table.

Change-Id: I31b3720e4a74a3790275eb3d14b412b0366cbeba
CRs-Fixed: 2673001
2020-04-28 10:31:58 -07:00
Hariharan Basuthkar
529b8588c4 qcacmn: Add an API wlan_reg_update_pdev_wireless_modes
Add an API wlan_reg_update_pdev_wireless_modes to update the wireless
modes in regulatory pdev_priv_obj with the wireless modes given as
input to it.

Change-Id: I2388b26da0d4c485b1b73b3ffb8f4b30767c31ee
CRs-Fixed: 2661579
2020-04-21 14:05:17 -07:00
Amar Singhal
c6d99aa14b qcacmn: Use psoc for 6ghz level support
Whether the firmware supports 6ghz channels, needs to be known
before pdev is created. Therefore move the check for 6ghz wmi
service support to psoc..

Change-Id: Iad7717225c49f6c95988f5ac81c7ee405b7c2c9e
CRs-Fixed: 2658111
2020-04-09 01:40:13 -07:00
Nandha Kishore Easwaran
8a90280e0e qcacmn: Support for IPQ8074 2G PHYB mode 3/3
This mode is supported through hw_mode_id 7. A special mode for
IPQ8074 platform alone to bring up single pdev alone on 2G mode.
FW would advertise the mode 7 support through the WMI service
ready message and this mode will be the default mode for AP-HK10 alone.

Added new APIs in tgt_reg to get pdev_id from phy_id and vice versa.
Fixed all places where pdev_id is used to acces psoc regulatory params
and converted them into use phy_id

Change-Id: I14920627f5e4ddafcc37440fa3281150b65ff04f
CRs-fixed: 2653042
2020-04-08 13:43:46 -07:00
Hariharan Basuthkar
2905d1d38f qcacmn: Add china_op_class table to the regulatory component
As per IEEE 802.11 2016 specification Annex E Table E-5, add a new
operating class table for China.

Change-Id: I60d610d637c64df497c7c363a893b8f7efdc8a6c
CRs-Fixed: 2656789
2020-04-06 23:35:13 -07:00
Hariharan Basuthkar
7165baf6ce qcacmn: Add BW macros and rename wlan_reg_country_opclass_freq_check
Add the macros BW_5_MHZ, BW_10_MHZ, BW_20_MHZ, BW_25_MHZ, BW_40_MHZ
to denote channel width and define them as 5, 10, 20, 25 and 40
respectively.

Also rename the API wlan_reg_country_opclass_freq_check to
wlan_reg_is_freq_in_country_opclass.

Change-Id: I6838bd87a9b8d0754909cea414ada4b09ed01643
CRs-Fixed: 2646416
2020-03-30 01:14:51 -07:00
aloksing
d201c0e789 qcacmn: Add NULL check for regulatory psoc
reg_get_psoc_obj may return NULL.
Add check if regulatory psoc is NULL and return QDF_STATUS_FAILURE.

CR-Fixed:2648152
Change-Id: I9637fa367873cd62fa18d1f5ecd80f6fe454558b
2020-03-26 07:12:59 -07:00
Ashish Kumar Dhanotiya
ec326a7ae8 qcacmn: Address synchronization issue in 11d state machine
Currently whenever host gets an indication for the cc event
list, it starts 11d machine and inside 11d state machine,
it decides that whether host needs to send start 11d scan
command to fw or stop 11d scan command to fw, based on that it
updates the enable_11d_supp variable of regulatory psoc private
object and posts the message to scheduler.
FW expects that host should not send back to back 11d start
scan command, there should be one 11d stop scan command before
next 11d start scan command is sent if already one 11d start
scan command is sent.
Host 11d state machine takes care of the above sequence
of 11d scan command by using enable_11d_supp. 11d state machine
sets enable_11d_supp whenever 11d scan start command needs to
be sent and resets enable_11d_supp whenever 11d scan stop
command needs to be sent and posts the message in the scheduler.
There is a case where if host receives the 11d cc event from FW
it sends the set country command to FW and at the same time if
user command comes to set the country, host again sends the set
country command to FW. FW processes both of these commands and
sends the cc list event to host. when host receives cc events
it starts the 11d machine. For the first cc event which is for
11d country which is processed as user country because of
incorrect logic in reg process master channel list where it is
assumed that at a time only one type of country set command can
be pending and first priority is given to the user country pending,
host resets enable_11d_supp and post the command to scheduler.
When host receives the cc list event for the user country it is
processed as 11d country and inside 11d state machine it sets
enable_11d_supp and posts the command to scheduler.
Now if scheduler schedules these commands it treats both the
commands as start 11d scan commands as enable_11d_supp is set
and sends start 11d scan command back to back.
To avoid above issue, add enable_11d_supp also as part of
the scheduler msg body pointer along with the psoc, in she
scheduler callback use this local variable to decide whether
11d start scan needs to be sent or 11d stop scan needs to be
sent.

Change-Id: I60150da1475251a1c22778a0f924bdfbe1bb1140
CRs-Fixed: 2641803
2020-03-25 22:30:17 -07:00
Priyadarshnee S
28216f27e4 qcacmn: Add HT40 channel 140 and 144 to us_op_class
According to Annex E of 802.11 specification (Table E-1—Operating classes
in the United States) add opclass support for HT40 channel 140 and
144 in us_op_class map. Currently for HT40 channels 140 and 144,
us_op_class map does not have a valid entry and hence opclass is
fetched as 0.

CRs-Fixed: 2626714
Change-Id: I848d6266c829c363f353de9911359349c379126b
2020-03-23 06:03:38 -07:00
Hariharan Basuthkar
cc9fb0cd68 qcacmn: Add frequency range check in reg_get_band_cap_from_op_class
When the operating class 82 is given as an input to the function
reg_get_band_cap_from_op_class, it is not found due to an
incorrect conditional logic that checks the starting frequency of a
band.

To address this problem, add a function
reg_get_band_cap_from_chan_set and call it within the function
reg_get_band_cap_from_op_class, to check if a channel in the channel
set, is within the frequency range of the band.

Change-Id: I7cbd8decf3c19f80e60a3153529b622b144feac9
CRs-Fixed: 2636367
2020-03-19 05:48:10 -07:00
Lincoln Tran
a329901cca qcacmn: Add regulatory API to get country code
Implement function to allow regulatory code to get country code and source

Change-Id: I2713913ba212509e778229b3041363a32ca6049e
CRs-fixed: 2634077
2020-03-14 12:45:29 -07:00
Jianmin Zhu
2ba2d3eda3 qcacmn: Mixed error code and tx power
When channel invalid, error code is treated as
tx power value by the caller.

Change-Id: Ie37c7f04734be46b6237acffe02eed3f31923012
CRs-Fixed: 2636772
2020-03-13 17:29:15 -07:00
Paul Zhang
063ee32509 qcacmn: Initialize num_phy in reg_program_default_cc
When regdb is non offload, it invokes ucfg_reg_program_default_cc
to initialize the default country code. Because the num_phy is not
initialized and the country code source cannot not initialize
properly in function reg_process_master_chan_list, 11d cannot be
triggered.

Solve the problem mentioned above by initializing num_phy in
reg_program_default_cc. Since it is non-offload, initialize
num_phy to 1.

CRs-Fixed: 2584347
Change-Id: Idaed2badc908c74bcbb9312368fed8cbb71ac69c
2020-03-13 15:32:33 -07:00
Abhiram Jogadenu
928035a1a4 qcacmn: Use global opclass for 6GHz channel lookup
For 6G band, only valid opclass_table is the global_op_class
as per the current specification. Therefore, if the band is 6G
set the opclass to global_op_class instead of the default class.

Change-Id: I43d1be8266aa80b11c446d84bc3d027cde8bebea
2020-03-10 03:53:14 -07:00
Paul Zhang
09849da4ce qcacmn: ignore WMI_REG_CHAN_LIST_CC_EVENTID
If reg offload is disabled, then ignore the processing of
WMI_REG_CHAN_LIST_CC_EVENTID in regulatory module.

Change-Id: I5da0cdf2c80357d03199fa367137cc236f4c3307
CRs-Fixed: 2625784
2020-03-07 14:33:48 -08:00