نمودار کامیت

455 کامیت‌ها

مولف SHA1 پیام تاریخ
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
gaurank kathpalia
8b761b0a66 qcacmn: Enable/Disable SRD support for vdev
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
2020-08-27 18:37:15 -07:00
Amar Singhal
c846a2e0e3 qcacmn: Update regulatory database to version 32
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
2020-08-24 22:04:04 -07:00
Ashish Kumar Dhanotiya
3b654ef914 qcacmn: Avoid array out of bound access for current channels list
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
2020-08-22 18:12:29 -07:00
Jianmin Zhu
8575b63128 qcacmn: Add API in regulatory to receive channel avoid cmd
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
2020-08-20 23:08:14 -07:00
Amar Singhal
74bb674e39 qcacmn: Use per channel maximum regulatory bandwidth
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
2020-08-19 01:57:57 -07:00
Ashish Kumar Dhanotiya
2d6243e27e qcacmn: Do not update the NOL state of the channels
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
2020-08-05 09:04:11 -07:00
Hariharan Basuthkar
e7e30c3ce1 qcacmn: Add wlan_reg_is_5ghz_op_class and wlan_reg_is_2ghz_op_class
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
2020-08-04 08:02:32 -07:00
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