Commit-Graf

351 Incheckningar

Upphovsman SHA1 Meddelande Datum
sheenam monga
3d7e6fb7c1 qcacmn: Remove unused api to find channel is dsrc or not
Remove unused api reg_is_dsrc_chan and wlan_reg_is_dsrc_chan.

Change-Id: I5f4d8aef6aee2c65fd6d0847fac88c1059e53490
CRs-Fixed: 2903007
2021-03-24 06:44:19 -07:00
Hariharan Basuthkar
906b316eec qcacmn: Export wlan_reg_get_tx_ops
Export wlan_reg_get_tx_ops, to use in modules outside UMAC.

Change-Id: I0028632539567c77aecf5d4369c56cfc25550c46
CRs-Fixed: 2886560
2021-03-18 03:38:32 -07:00
Gururaj Pandurangi
08148f21fa qcacmn: Enable/Disable 6G edge channels ch2 and ch233
Enable lower 6G edge channel ch2 (5935MHz) for APL2 6G regdmn
using a service bit WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP,
which is not enabled by default.
Also, disable upper 6G edge channel (7115MHz) using another
service bit WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP, that
is enabled by default.

Change-Id: Ia7cb7f7d3165375178adbe70adb19b8671496b6d
CRs-Fixed: 2885623
2021-03-12 02:52:25 -08:00
Amruta Kulkarni
7fe3773331 qcacmn: Remove wlan_reg_set_channel_params
- Remove wlan_reg_set_channel_params and the callers
 associated code.
- Clean up part of CONFIG_CHAN_NUM_API functions.

Change-Id: If9583e674752d6f47de8d7d6bc946909509957b5
CRs-Fixed: 2883773
2021-03-11 19:42:48 +05:30
Gururaj Pandurangi
c4377e8d3d qcacmn: Remove the wlan_reg_get_chan_enum instances
As chan num may be same for different bands, getting chan enum
from channel number can provide incorrect results.
Use wlan_reg_get_chan_enum_for_freq API to get chan enum instead
of the wlan_reg_get_chan_enum.

Change-Id: Ibf08bba31e3778cb4857612d2c95813558be5bc9
CRs-Fixed: 2885860
2021-03-11 19:40:22 +05:30
Lincoln Tran
9f2767dd41 qcacmn: Update set country API to return failure
When country has not changed, reg_set_country will drop the request.
Return failure in this case so caller will know if no action is taken.

Change-Id: If6095887c6166edc626eab3bde312cc0aa8490b2
CRs-fixed: 2892356
2021-03-05 01:18:33 -08:00
sheenam monga
fe43d91ba9 qcacmn: Remove unused function wlan_reg_get_channel_state
Remove unused function wlan_reg_get_channel_state

Change-Id: I6f1a0366bae0eff5acbc3dd902f730fd554aee17
CRs-Fixed: 2869902
2021-03-01 09:09:36 -08:00
Jianmin Zhu
0eb2a50ed8 qcacmn: Remove WLAN_REG_IS_24GHZ_CH in wlan_reg_get_bonded_channel_state
Remove WLAN_REG_IS_24GHZ_CH in wlan_reg_get_bonded_channel_state.
Remove definition of following:
WLAN_REG_IS_24GHZ_CH
wlan_reg_is_24ghz_ch
WLAN_REG_IS_5GHZ_CH
wlan_reg_is_5ghz_ch

Change-Id: I7bea616f0bb8e0b98bfe03e9fd66ef24588f59e3
CRs-Fixed: 2883685
2021-03-01 09:09:32 -08:00
Vignesh Mohan
51d711ef4c qcacmn: Introduce an API to fetch the bonded channel pair
Introduce a regulatory core API to fetch the bonded channel
pointer given a frequency and a channel width, using the
static bonded channel arrays for different bandwidths.

Change-Id: I87d91a45c59ba7d9ba6d692bb29822b184b4604b
2021-03-01 05:29:47 -08:00
Lincoln Tran
6118d488dd qcacmn: Expose freq validation API
Create a wrapper for the reg_is_freq_present_in_cur_chan_list API so
other modules can invoke it.

Change-Id: I0e21b15f1e08bb4301329b6b1a3c3c40edc09060
CRs-fixed: 2884768
2021-02-24 23:33:17 -08:00
Linux Build Service Account
92f26e1300 Merge "qcacmn: Add wrapper API for indoor channel check" 2021-02-17 14:39:29 -08:00
Lincoln Tran
a410298d7b qcacmn: Add wrapper API for indoor channel check
Add the wrapper for the reg_is_freq_indoor API so other modules can
invoke it.

Change-Id: I8e5ec63b117b49a8bdd99d2afdee80b080694a4f
CRs-fixed: 2876035
2021-02-17 14:01:10 -08:00
Linux Build Service Account
754b0aaaa8 Merge "qcacmn: Update regulatory database to version 34" 2021-02-17 09:08:46 -08:00
Gururaj Pandurangi
ae259a4256 qcacmn: Add service bit to support backward compatibility
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.

Change-Id: I727fd5a055e4e400ebc174cfb504d60e3335c3c4
CRs-Fixed: 2872244
2021-02-16 23:52:00 -08:00
Ashish Kumar Dhanotiya
5796dd49e2 qcacmn: Fix disable channel list command
Currently driver is using sap notify api of regulatory to
update channel list for disable channel list command
which is not the correct way as sap notify api is designed
to be used by sap releted operations.

To address above issue write a separate api for
disable channel list command.

Change-Id: I79ded748bd46ec4be431c1ff6ab64c6ac8bf46be
CRs-Fixed: 2875324
2021-02-16 04:46:27 -08:00
Hariharan Basuthkar
cded00d118 qcacmn: Update regulatory database to version 34
1) Map Chile to FCC2_6G (Hex Code 0x05) for 6G, and to FCC14_World for
   2G/5G.
2) Map San Marino to ETSI1 for WIN and DSRC, and to ETSI13_World for MCC.
3) Map UAE to ETSI13_World for WIN and MCC.
4) Add hexcodes for 6G sub domains.

Change-Id: I1627f2e739ad7b862e684673c36de7a823dcb714
CRs-Fixed: 2857528
2021-02-16 03:51:30 -08:00
Vignesh U
908d98d67e qcacmn: 5.9G channels should point to global opclass
Make 5.9G channels point to Global opclass because there is no support for
them in US opclass as per the current 802.11 spec(802.11ax D8).

Change-Id: I7278cb8f2dc8eb27d10f0d7834a13c0afd6fc668
CRs-Fixed: 2869445
2021-02-11 00:24:37 -08:00
Lincoln Tran
b3b38d585a qcacmn: Add logic to decide AP pwr mode when starting
Add logic to decide which power mode the AP should start in

Change-Id: I59b64e6ca26d47e395575ab129f35b97ddcc6737
CRs-fixed: 2863552
2021-02-10 20:27:32 -08:00
Hariharan Basuthkar
b6b3ce1a00 qcacmn: Enable the declaration of FCC15 and FCC16
5.9GHz channels are built on the Pine wideband radio even though
the FW does not advertise the 5.9GHz support through the WMI service
bit.

This is because, the 5G regdomain id FCC16, in the case of a wideband
radio is absent in the host regulatory database. Due to this, within the
function  reg_is_fcc_regdmn, reg_get_curr_regdomain does not
return QDF_STATUS_SUCCESS.

To fix this issue, enable the declarations of FCC15 and FCC16 in the
Host regulatory database.

Change-Id: Ib48ab0167a6fa4bafb912ab28b332613bac42f73
CRs-Fixed: 3506736
2021-02-10 10:11:40 -08:00
Lincoln Tran
2bff9b3709 qcacmn: Append 6g reg rules to main list
Currently, there are separate list for 2g/5g and 6g reg rules. Only one
list is sent north from pdev, so append the corresponding rules to the
existing list in the pdev only.

Change-Id: I28e68f345ae6faad3ac2d929dac3922e9389d53e
CRs-fixed: 2860702
2021-02-02 13:08:26 -08:00
Priyadarshnee
042a498d09 qcacmn: Map Israel country to ETSI17_WORLD
According to regdomain update #33, Israel is mapped to
ETSI17_WORLD for WIN and Linux Android.
Reflect this mapping in "country_code_to_reg_domain"
table.

CRs-Fixed: 2867399
Change-Id: I340916175e2d049a2c8c978d16e35e1894089c24
2021-02-02 07:49:35 -08:00
sheenam monga
3dbaf035c3 qcacmn: Remove unused api reg_chan_to_freq
Usage of api reg_chan_to_freq is replaced
with wlan_reg_legacy_chan_to_freq. So remove
unused api reg_chan_to_freq.

Change-Id: Ic14d5204c68698ef4cfd5953cf511503b211d461
CRs-Fixed: 2853570
2021-01-28 06:19:49 -08:00
Hariharan Basuthkar
a20bb6caa3 qcacmn: Copy 6G super domain code to the pdev_priv_obj
cfg80211tool wifiX getRegdomain does not display the current 6G super
domain code. This is because, when the WMI_REG_CHAN_LIST_CC_EXT_EVENT_ID
is received from the target, the 6G super domain code is not copied to
the pdev_priv_obj. Therefore, copy the 6G super domain code to the
pdev_priv_obj to display the current 6G super domain code.

Change-Id: If2e0bfc69cad3a4c47e73fdb35ad08eecb0cb48d
CRs-Fixed: 2856074
2021-01-21 23:23:59 -08:00
Lincoln Tran
26799738bd qcacmn: Initialize txpower to 0
In the API reg_find_txpower_from_6g_list, if the frequency is not found,
txpower is not touched and could cause undefined behavior. Initialize
it to 0.

Change-Id: Ic65c678144bf88959407ef28ab0d401278fa4738
CRs-fixed: 2855200
2021-01-20 03:03:00 -08:00
Hariharan Basuthkar
a3f2a76372 qcacmn: Update regulatory database to version 33
1) Add a new regdomain ETSI17_World and map it to the country Israel.
2) Remove DFS Requirement in 5.725-.5.850 in the regdomain ETSI12.
3) Add "Indoor" flag to 5.15-.5.25 in the regdomain FCC6.
4) Add 5.9GHz support to RD WORLD_5G_2.

Change-Id: I130610d4c34c4cc622a18dd29e924637b1c0a7d1
CRs-Fixed: 2818230
2021-01-18 01:30:43 -08:00
Lincoln Tran
323288debd qcacmn: Expose WMI command in tgt_if
Expose the API to send WMI_SET_TPC_POWER_CMDID within the target_if
module. Register the callback under tx_ops.

Change-Id: I1d075df717cff997e7ac85884fe587ed298cbb28
CRs-fixed: 2849695
2021-01-15 14:38:44 -08:00
Lincoln Tran
1e157ef978 qcacmn: Rate limit error message
When sorting channels by weight, a lot of the channels can be disabled,
depending on the regulatory domain. Getting the information on disabled
channels can cause excessive error logs. Rate limit these error logs.

Change-Id: Ife70b9578bb5ce61013392d92a5dd4c4e160075d
CRs-fixed: 2852753
2021-01-14 00:27:56 -08:00
Lincoln Tran
ab72865c2b qcacmn: Add API to get 6G power information
Add API to check if channel frequency is PSD power or not.
Add API to get tx power for client and server at different
power levels.
Add API to get EIRP power level from the reg rules.

Change-Id: Ifac29775f4f8a7f58b34abd6d395a0e74b10b7f9
CRs-fixed: 2838079
2021-01-13 02:34:41 -08:00
Lincoln Tran
c8d397e920 qcacmn: Implement chan_list processing for new WMI event
Add functions to handle the new WMI event,
WMI_REG_CHAN_LIST_CC_EXT_EVENTID. This includes processing new
data regarding standard power, low power indoor, and very low
power Clients and APs.

Process the regulatory rules from FW to populate the new 6G
channel lists. Fill in the current channel list with the
correct 6G master channel list. Copy other information from
the event into the regulatory private objects as needed.

Change-Id: I0c2001d809e4f0b292bac866780faa2850b1a8b1
CRs-fixed: 2799403
2021-01-12 20:09:53 -08:00
Lincoln Tran
f52651d080 qcacmn: Add new 6G channels to regulatory
Add new master channel lists for standard power, low power indoor, and
very low power clients and APs. Add new lists for default and
subordinate clients.

There is a total of 9 new channel lists. 3 of the lists are for each of
the AP power levels. The other 6 are for each power level of default
Client and subordinate Client.

Ensure the new channel lists hold both EIRP and PSD information. The
PSD power information will apply mainly to Indoor AP/Client mode.

Change-Id: Icb038329d55e221aa0dded1469de68c45bb4f3f4
CRs-fixed: 2843791
2021-01-12 17:44:39 -08:00
Ashish Kumar Dhanotiya
48dee39efb qcacmn: Rate limit invalid channel number messages
Channel number can be invalid when finding out the enumeration for the
channel. Rate limit the messages for the same.

Change-Id: Ie6cf178482647547d58d4d9555763332d6598846
CRs-Fixed: 2843978
2021-01-04 18:46:29 -08:00
Hariharan Basuthkar
763cef6b29 qcacmn: Add a boolean is_chan_hop_blocked in struct regulatory_channel
Add a boolean is_chan_hop_blocked in struct regulatory_channel to check
if a channel is blocked for ACS hopping, when the noise detection param
on that particular channel is above the threshold.

Change-Id: Id1c73f1b153d2064eaf3a72a21d14a6f63ad0de4
CRs-Fixed: 2837859
2020-12-19 12:46:02 -08:00
Hariharan Basuthkar
16550e216e qcacmn: Move reg_is_regdb_offloaded to reg_services_common.c
Currently, the function "reg_is_regdb_offloaded" always return false
for WIN as "reg_is_regdb_offloaded" is a "static inline" one-line
function defined in a header file "reg_utils.h". Make it common for
both WIN and MCC by moving it to the "reg_services_common.c" file.

Also, by default, initialize the variable
enable_5dot9_ghz_chan_in_master_mode as true for WIN and false for MCC,
in the function wlan_regulatory_psoc_obj_created_notification as
MCC does not support it by default and WIN does it.

Change-Id: Ica023ec0788e1dd6973fef59e33e6e64c336ba26
CRs-Fixed: 2829674
2020-12-14 05:41:04 -08:00
Lincoln Tran
2eea47c0c9 qcacmn: Update set ch params API to consider passive ch
Currently, reg_set_2g_channel_params_for_freq only considers
enabled channels when filling in the channel params. This
could cause issue when starting vdev in a passive channel.
Update the logic to consider CHANNEL_STATE_DFS as well.

Change-Id: I7a49aaa9a51e09729d7b912a6e3fd62fa240d714
CRs-fixed: 2835565
2020-12-11 13:25:28 -08:00
Vignesh Mohan
674edbabcc qcacmn: Update the max_bw for every reg channel
Update the maximum bandwidth value of the channels in the current
channel list based on the chip's supported modes and the
availability of the adjacent channels.

Also remember the maximum phymode and bandwidth supported by
the device in the regulatory pdev private object.

For determining if a channel is DFS or not, use the flag
REGULATORY_CHAN_RADAR which comes from regulatory rules, instead of
using CHANNEL_STATE_DFS.

Change-Id: I844857ef63af3f7628b37eedfe5098bb88e3e0dc
2020-12-10 08:45:04 -08:00
Hariharan Basuthkar
19b0f038d4 qcacmn: Update Host Regdb to accommodate the new 6G regdomains
Make the following changes to update Host Regdb to accommodate the
new 6G regdomains:

1) Add a macro COMPILE_REGDB_6G, to prevent compilation of
   the new 6G regdomains in the host.
2) Add new 6G super domains, 6G sub domains, and 6G reg rules (add a new
   structure regulatory_rule_ext) and place them under
   COMPILE_REGDB_6G.
3) Add 2 new fields to the
   struct country_code_to_reg_domain - reg_6ghz_super_dmn_id and
   max_bw_6g. If COMPILE_REGDB_6G and CONFIG_BAND_GHZ are defined then,
   reg_6ghz_super_dmn_id and max_bw_6g are part of the
   country_code_to_reg_domain table for a country entry. If
   COMPILE_REGDB_6G or CONFIG_BAND_GHZ, is not defined then they are
   absent.

Change-Id: I72ba7b8f6fb4761205fbde51bbc8570bac531e87
CRs-Fixed: 2794085
2020-12-08 03:21:02 -08:00
Vignesh U
f443e288cc qcacmn: Get and set 6g client and ap parameters
Write disptacher and core functions to set and get the following
6g ap and client power type parameters in regulatory:

1) current 6G AP power type - LPI/SP/VLPI.
2) current 6G client mobility type - Default/Subordinate.
3) RNR Usable.
4) Unspecified AP usable.

Change-Id: I926642d1a3e7d9049772c5c4d2aad7cd472f8bd0
CRs-Fixed: 2825676
2020-12-03 02:40:59 -08:00
Hariharan Basuthkar
ad5cb17aa7 qcacmn: Expand regdomain to include 6Ghz superdomain
The regulatory structure which contains country and regulatory domain,
needs to be expanded to include 6Ghz superdomain.
Make changes in the regulatory component to send the 6G super domain
set by the user, to the target.

Change-Id: I84b96cd74012e33d464d98675158c9cd5eabff4e
CRs-Fixed: 2802131
2020-11-27 04:54:31 -08:00
Hariharan Basuthkar
a6e500d22e qcacmn: Add 5.9GHz channels to global_op_class table
As per table E-4 in Annex E, in the 11ax Draft 8.0, add the 5.9GHz
channels to the global_op_class table in the regulatory component.

Change-Id: I69225e5cae813d470ebaf2768e58672276f6bd2f
CRs-Fixed: 2823487
2020-11-26 00:16:55 -08:00
Lincoln Tran
8652562a87 qcacmn: Add API to check for passive frequency
Add new API to check if frequency is passive or not. The API checks
the channel flag against REGULATORY_CHAN_NO_IR.

Change-Id: I166a7a79517f81c23ff933d2657ef3f4c551c082
CRs-fixed: 2822205
2020-11-20 16:24:50 -08:00
Hariharan Basuthkar
fb1b1fe407 qcacmn: Fix compilation error when CONFIG_BAND_6GHZ is disabled
Add a static inline definition for wlan_reg_is_range_overlap_6g
when CONFIG_BAND_6GHZ is disabled, to fix the compilation error, that
is seen when CONFIG_BAND_6GHZ is disabled.

Change-Id: I26cf77c029d7d27887c242a1c7c300219c125256
CRs-Fixed: 2817943
2020-11-18 12:04:07 -08:00
Gururaj Pandurangi
a30081e58e qcacmn: Add a feature flag for 4.9 GHz channels
Condition 4.9 GHz channels under a macro CONFIG_49GHZ_CHAN
since only WIN uses these channels and not MCC.
This reduces kmalloc memory allocation in regulatory
component.

Change-Id: Ie9241dd68909f68fa70012b664c7bc7cf050c1a5
CRs-Fixed: 2766046
2020-10-30 22:16:14 -07:00
Gururaj Pandurangi
1d687546c2 qcacmn: Rate limit log in reg_get_chan_enum_for_freq
Rate limit log in reg_get_chan_enum_for_freq() API
to prevent excessive logging.

Change-Id: I52248877b5741f1f6a459b3f5240cabafbf1af05
CRs-Fixed: 2798752
2020-10-19 07:07:58 -07:00
Vijay Krishnan
8e4a6046af qcacmn: Check 80p80 mode while building channel
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. Here including condition to check for
80p80 mode.

CRs-Fixed: 2781127
Change-Id: I5f9a5960f4df8170d39fa8d6ea195700db741f51
2020-10-08 12:24:10 -07:00
Vijay Krishnan
dcb1efdcce qcacmn: Remove reg_get_channel_list_with_power
reg_get_channel_list_with_power function is a redundant function as its
counterpart reg_get_channel_list_with_power_for freq have the same
functionality. Also the two functions have almost the same implementation.
Therefore removing the function reg_get_channel_list_with_power.

Also added the assignment of the variable "chan_num" to the function
reg_get_channel_list_with_power_for_freq, as the assignment was missing.

CRs-Fixed: 2738838
Change-Id: Ifd2fd795cacd89989e1755f3b8fd56ccd7d5b84f
2020-09-11 11:50:15 -07:00
Hariharan Basuthkar
9fed3d69fb qcacmn: Do not create a DFS object for a 6G only radio
Do not create a DFS object for a radio if the channel frequency range
advertised by the target is a 6G only range.

Change-Id: Ib672902ec3945d00b53ab6d4460584ca889ae387
CRs-Fixed: 2755652
2020-09-08 00:47:36 -07:00
Sachin Ahuja
d1f2d7a868 qcacmn: Search opclass from global opclass also
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
2020-09-03 15:25:10 -07:00
Hariharan Basuthkar
cad70ccae2 qcacmn: Add an API to get max TxPower for 6G TPE
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
2020-09-01 05:37:31 -07:00
Hariharan Basuthkar
09a17690e8 qcacmn: Modify tx-power in Regdomain FCC15 and FCC16
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
2020-08-31 17:21:29 -07:00
Hariharan Basuthkar
fa89410007 qcacmn: Add dispatcher functions for band overlap APIs
Add dispatcher functions for wlan_reg_is_range_overlap_2g and
wlan_reg_is_range_overlap_5g.

Change-Id: Ib5dc1728227117ea271ef8efa1290e7e5d711757
CRs-Fixed: 2765562
2020-08-29 01:27:10 -07:00