While querying for the channel width, the opclass is
extracted from the country opclass. If opclass is not
found then 20Mhz channel width is considered for connection.
This fails the cert test case when AP sends the global
opclass in ECSA
Change is done to search in the global opclass if the
opclass is not found in the country specific opclass.
CRs-Fixed: 2763702
Change-Id: If8c962e1e164cfccda13f19cbf925499c9cc0394
Add an API wlan_reg_get_max_txpower_for_6g_tpe, to get the max tx-power
in PSD or EIRP format, based on the client type as follows:
=======|===============================================
| S No. | Default Client | Subordinate Client|
|=======|===============================================|
| EIRP | reg_get_channel_reg_power | 24 dBm |
| | _for_freq(pdev, freq) | |
|-------------------------------------------------------|
| PSD | (-1) dBm | 5 dBm |
=======================================================
Change-Id: Ic4946cd3e3f2e13469b0d5e2020e3fcda5040c2f
CRs-Fixed: 2765566
The max txpower allowed in reg domain FCC15 (24dBm) and FCC16 (30 dBm)
as per the regulatory update #32 xls is applicable for 320 mhz. For
160 MHz,the powers need to be reduced by 3dbm.
This was missed in the change-id
I1b1bdaceb4fa48973fb33fca17465a25d05ae040, and the power values
applicable for 320MHz were added.
Therefore, modify the max txpower allowed in regdomain FCC15 as 21 dBm
and the max txpower allowed in regdomain FCC16 as 27 dBm.
Change-Id: I5f5fa4ce1ba17deedfd367d7d07ad6c27fe91aa0
CRs-Fixed: 2763480
Currently the driver enables the SRD channels
support for both P2P_GO and SAP if the SRD master
mode is enabled.
Have individual ini values to enable/disable
the SRD channel for each op-mode as required.
The ini etsi13_srd_chan_in_master_mode has the
following config for individual master modes:-
Bit map for enabling the SRD mode in various modes are as follows:-
BIT 0:- Enable/Disable SRD channels for SAP.
BIT 1:- Enable/Disable SRD channels for P2P-GO.
BIT 2:- Enable/Disable SRD channels for NAN.
Change-Id: Ia9ca9d49102405b307a410cbf28e3f8896114cac
CRs-Fixed: 2760002
Regulatory domain changes for regdomain.xls 32.
Add Low power indoor for AP and STA, for 6 ghz.
Modify FCC15 and FCC16 for the same.
Remove FCC17 6ghz definition.
Add world mode for 6 ghz.
Add country Curacao to APL10_WORLD.
Change Antigua/Barbuda to FCC3_WORLD.
Create ETSI16_WORLD reg-domain.
Change-Id: I1b1bdaceb4fa48973fb33fca17465a25d05ae040
CRs-Fixed: 2731336
Currently regulatory computes the current channel list for band
6GHz by default which is not correct as current channel list
size is based on the CONFIG_BAND_6GHZ, if this feature is not
enabled then current channel list array will be accessed out of
bound inside reg modify channel list for band api.
To address above issue, move computation of current channel list
functionality inside CONFIG_BAND_6GHZ feature flag.
Change-Id: I4612c9d3adb027976a4404fb7c92c0e415014b47
CRs-Fixed: 2760541
Enable AUTORFI-3223 LTE coex with remote telematics unit:
When Telematics unit (modem) is not located on the SOC as Wi-Fi chip,
the OEM's system can still get LTE channel info from the modem and
pass it to Wi-Fi driver from an OEM app. This request is to provide an
API from Wi-Fi layer to OEM's app to receive the LTE coex channels,
After wlan driver received this info, channel avoidance algorithm will
run and SAP will adjust Wi-FI channel accordingly.
Add API in regulatory to receive channel avoid cmd from os_if/upper layer.
Change-Id: I0099b2ef69eba30ad0fc9bca448225ab283ed6b7
CRs-Fixed: 2750727
Per channel maximum regulatory bandwidth depends on country
bandwidth settings and the reg-domain bandwidth settings.
Therefore, take channel bandwidth into account in channel
bonding calculations.
Change-Id: I9d206c2fd8c5535eba813ac1da2878592ef5019b
CRs-Fixed: 2729638
Currently driver sets the NOL state of the channels to false
on every regulatory updated, which indicates the channel is
not in NOL. Which may lead to some issues where the channel
is actually in NOL but host treats it as non-NOL channel.
Ideally NOL list should be maintained throughout the driver
lifetime and across the regulatory changes.
To address this issue add a logic to not update the NOL state
of the channels whenever the regulatory update is received.
Change-Id: I7487a24a349f5f6e06a058b4d07799c8e5ac2d40
CRs-Fixed: 2735137
Add APIs wlan_reg_is_5ghz_op_class and wlan_reg_is_2ghz_op_class,
to check if an input opclass is a 5ghz, and 2ghz opclass respectively.
Change-Id: I677b5e927ac9060f65b71eee838073348d06d4b2
CRs-Fixed: 2732373
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
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
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
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
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
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
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
Remove reg_get_curr_band because it has the same functionality
as reg_get_band.
Change-Id: I7fa5abfe6a552cc617cd810b41b152c70b3429b8
CRs-fixed: 2726300
Compute correct channel width for a given frequency by calling
the regulatory channel bonding API.
Change-Id: I3627bc2a4f4c832887447bd6b28abd3432bffa73
CRS-Fixed: 2728810
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Add an API wlan_reg_get_phybitmap, to retrieve the phybitmap from the
regulatory pdev_priv_obj->phybitmap.
Change-Id: Ie03ab69b2378f7243bbacc15c71007cdf0386ef6
CRs-Fixed: 2675030
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
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
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
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
Export wlan_reg_freq_width_to_chan_op_class_auto symbol
to be used in qca_ol module for retrieving opclass.
Change-Id: I44d9c424d66caf168d443f3542361deb9b3de300
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
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
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
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