Commit Graph

365 Commits

Author SHA1 Message Date
Abhinav Kumar
abcf99cc9c qcacmn: Update EHT cap IE as per current country code
On set country code, host updates EHT cap IE to FW via
WMI_VDEV_SET_IE_CMDID command. 320 MHz BW capability in
EHT cap IE should be as per new country code.

Change-Id: I3b80dbeee6f35dacc41f15612373ea7f8efc5803
CRs-Fixed: 3670311
2024-01-09 16:49:45 -08:00
Asutosh Mohapatra
69a0ec3acd qcacmn: Refactor set AP power type logic
Currently 'reg_compute_pdev_current_chan_list' is called
twice as shown below, when 'wmi_reg_chan_list_cc_ext_event'
from FW is handled.

LIST_CC_EXT event:
	reg_compute_pdev_current_chan_list() [ 1st call]
	reg_send_scheduler_msg_nb()/reg_send_scheduler_msg_sb()
	    wlan_reg_decide_6g_ap_pwr_type()
	        reg_decide_6g_ap_pwr_type()
	            reg_set_ap_pwr_and_update_chan_list()
		        reg_compute_pdev_current_chan_list() [2nd call]

To solve this, do not call 'wlan_reg_decide_6g_ap_pwr_type'
from north bound or south bound callbacks.

However, the above fix creates another problem because the function
'reg_decide_6g_ap_pwr_type', in addition to calling
'reg_compute_pdev_current_chan_list', also sets the current 6 GHz
power type for the pdev. A proper place to set the 6 GHz
power type is in function 'reg_set_ap_pwr_type',
which currently does not set 6 GHz power type correctly.

Hence remove 'wlan_reg_decide_6g_ap_pwr_type' and
'reg_decide_6g_ap_pwr_type' functions and modify
'reg_set_ap_pwr_type' to set the best 6 GHz power type
based on the 6 GHz regulatory rules.

CRs-Fixed: 3609342
Change-Id: I1bdfd71245552a51fd5123931a7a6dcc16f2a942
2023-11-12 15:23:56 -08:00
Divya R
77df562f6f qcacmn: Add boundary check for channel width
New API, reg_get_next_higher_bandwidth added to
get next higher bandwdith for the given channel width.
Add boundary check for channel width in
API get_next_lower_bandwith.

Change-Id: Icd250d0c518eda9749b25778427b1bffac66ad56
CRs-Fixed: 3636188
2023-10-30 20:21:02 -07:00
Jianmin Zhu
34c894f480 qcacmn: Add API wlan_reg_get_next_lower_bandwidth
Add API wlan_reg_get_next_lower_bandwidth

Change-Id: Iff8f112cc848373ea7b0275b4a8613cd43047166
CRs-Fixed: 3639903
2023-10-16 22:38:06 -07:00
Abhinav Kumar
2d444f83ec qcacmn: Get center freq from chan center freq index
AP sends chan center freq index via Bandwidth Indication OPIE
in channel load request.

Call reg_compute_6g_center_freq_from_cfi API to get corresponding
center freq for 6 GHz and 320 MHz case.

Change-Id: I14bbfe75016e40189388f32fd207d21197bc989b
CRs-Fixed: 3629129
2023-10-08 22:44:44 -07:00
Jyoti Kumari
81a448455b qcacmn: Fix ETSI reg_domain for SRD channels
Currently, only ETSI13 check is present for SRD channels but
ETSI18 and ETSI20 are also added for SRD channels.

Add a check of ETSI18 and ETSI20 to remove SRD channels

Change-Id: I3bd7c9d9d2ff26f6f625fc70f1ca89cb39634dfb
CRs-Fixed: 3614070
2023-09-29 16:30:30 -07:00
Vignesh U
4da1bf7d8c qcacmn: Move uncommon regulatory APIs out of cmndev
The API reg_is_freq_txable() is not used by_REG_CLIENT devices and
should be moved out of converged code.

Move reg_is_freq_txable() and corresponding dispatcher API
wlan_reg_is_freq_txable() to unconverged code.

Change-Id: I1031a20d40ebcf30326c14901d413669206a8433
CRs-Fixed: 3568932
2023-08-17 01:39:27 -07:00
Asutosh Mohapatra
b1ca37af64 qcacmn: Keep bonded channels enabled for SET_FCC_CHANNEL 0/2
Currently host disables all 6 GHz channels and keeps only
STA connected channel enabled. If STA bandwidth is greater
than 20 MHz kernel send disconnect as the bonded channels
are disabled.
Similarly for STA + SAP SCC case, if STA bandwidth is
20 MHz and SAP bandwidth is greater than 20 MHz kernel
sends stop_ap as the bonded channels are disabled.

To address above scenarios, for standalone STA case
keep the bonded channels enabled and for STA + SAP
SCC case keep the bonded channels enabled for STA and
SAP.

Change-Id: I1c4f7fea139ca36f5a61cc514eff779801db57ae
CRs-Fixed: 3580015
2023-08-13 23:58:49 -07:00
Manoj Ekbote
b9322f12bd qcacmn: Support for RF path selection
Includes changes:
1. Save frequency values from EXT and EXT2 events to psoc object
- wireless_modes, low/high 2 GHz chan and low/high 5 GHz chan from EXT event
- wireless_modes_ext, similar frequency range fields with _ext from EXT2
event. Frequency range fields with _ext are non-zero when a radio supports
overlapping frequency. Eg.Radio that supports 5 GHz full and 5 GHz high band will
have low/high 5 GHz fields populated with primary band values in EXT event and
low/high 5 GHz fields are populated in EXT2 event with secondary band
values. These values are stored in tgt info for later use.
2. Modify regulatory APIs to get and set the wireless modes in reg
component
3. Retrieve frequency fields from EXT2 event

Change-Id: I49ebcc7ee7b26bd115f37abc8cb5b6fa5a415eda
CRs-Fixed: 3576551
2023-08-11 01:24:54 -07:00
Divya R
50956c4387 qcacmn: Use correct opclass table to populate 6 GHz op class
'wifitool athX setbssidpref' command is used to the
set bssid preference value  for mac address.
'wifitool athX sendbstmreq' command is used to
trigger BTM request frame from the AP to make MCC STA roam from
one AP to another.The preference value from the 'setbssidpref'
command is not reflected in the 'Neighbor report' IE in the
BTM request frame in 5 GHz device. In case of 5 GHz device, 6 GHz op
class are not populated since two global op class structure are
maintained and  6 GHz channels are missing from the list of channels
supported from the old structure (global_operating_class).
This is causing the AP to exclude the preference value
from setbssidpref command.

To fix this, popluate 6 GHz supported op class from new
global_op_class structure instead of old global_operating_class structure.

Change-Id: Id2275c9862518c613773d6ae810d59dea8b854b1
CRs-Fixed: 3549953
2023-07-14 15:41:46 -07:00
Asutosh Mohapatra
6b9152becc qcacmn: Use SP channels for passive scan
Currently host driver doesn't consider SP channels for scan.
So if any country supports only SP power type then STA is not
able to scan and connect to the AP which is operating on
SP channel.

To address this issue enable passive scanning for SP only
channels and add logic to prevent turning up SAP on these
channels.

Change-Id: Ieb14ded41c67e23e066c8a0a5c5e450975d8c4c2
CRs-Fixed: 3529200
2023-07-13 19:23:47 -07:00
Ashish Kumar Dhanotiya
cae18fa1ad qcacmn: Enable 11d on different vdev
Currently host driver enables 11d on different available vdev before it
sends the vdev delete command to the FW. Since 11d is already enabled
on existing vdev, FW, do not enable the 11d on this command on
different vdev.
For example in current issue, when host driver creates vdev0, it
enables 11d on vdev0. Now it creates vdev1. when host drivers tries
to delete vdev0, it sends 11d start command on vdev1 before it sends
vdev delete for vdev0. Since 11d is already enabled on vdev0, fw do
not enable 11d on vdev1. Now host driver deletes vdev0.
Since FW rejects 11d start on vdev1, 11d algorithm does not run
after vdev0 deletion.

To fix this issue, enable 11d on different vdev, once host deletes
the current 11d vdev.

Change-Id: I496f17bd0d1baacdb5e74609c1b5894af4256e12
CRs-Fixed: 3515089
2023-07-12 07:48:55 -07:00
Priyadarshnee Srinivasan
596b68de2e qcacmn: Add APIs to support RCSA and puncturing
Add API utils_dfs_get_radar_bitmap_from_nolie() to fetch the puncture
bitmap from NOL IE. Also, move dfs_convert_wlan_phymode_to_chwidth()
from oss to common code. Also, add a 11BE version of
utils_dfs_convert_wlan_phymode_to_chwidth() API.

CRs-Fixed: 3538818
Change-Id: I258452e122d259c7b16655b760f217073b8e2e9b
2023-07-05 08:36:22 -07:00
Asutosh Mohapatra
17ed1cfc4f qcacmn: Add enhancements to support SET_FCC_CHANNEL 2
Currently in host support is there for SET_FCC_CHANNEL
command for values 0, -1, 1.
Add changes to support SET_FCC_CHANNEL command for value 2.

Change-Id: I151ce33677406670bebc7a8861e34da3e4c5917a
CRs-Fixed: 3537395
2023-07-01 06:51:49 -07:00
Vishal Miskin
210aad0930 qcacmn: User country set based on INI config params
Do not allow userspace to configure regulatory country
when below INIs are set as:
gCountryCodePriority=0
g11dSupportEnabled=1

Change-Id: Iaae8e209fb99802f67d906fcd70d2c7c0a2f8f06
CRs-Fixed: 3499558
2023-06-26 17:22:34 -07:00
Amith A
d4415c7efe qcacmn: Modify EIRP and PSD data types to int from uint
ACS fetches EIRP powers of channels from the regulatory module using API
wlan_reg_get_eirp_pwr. The type returned by this API is unsigned and
hence any negative value is received as very high positive value. This
results in incorrect calculation of puncture bitmap and any other APIs
that use these power values.

To resolve this issue, modify the data type of EIRP and PSD variables
from uint to int in APIs used for calculating the best power mode.

Change-Id: I3af8e8bcda7cb872f8e295a78c579243a5469ab5
CRs-Fixed: 3515926
2023-06-20 06:39:28 -07:00
Jyoti Kumari
df02aa9ab6 qcacmn: Add api to check 6 GHz channels till UNII-5 band
Add api to check 6 GHz channels till UNII-5 band for LL_LT_SAP

Change-Id: If31da65b8a592f66de31bb3b161f11dc8425d8a8
CRs-Fixed: 3523012
2023-06-15 21:24:28 -07:00
Aditya Kodukula
58e80d75bd qcacmn: Fix typographical errors
Fix typographical errors spanned over various files in cmn.

Change-Id: I9fcf3b7f9bb7d7dd406e6576a60aa4eb783c9ceb
CRs-Fixed: 3529628
2023-06-14 22:02:33 -07:00
Asutosh Mohapatra
85480032b3 qcacmn: Find 6 GHz power type for connection channel
Currently host doesn't check if power type is supported
for connection channel while calculating best 6 GHz
power type for connection. This results in calculation
of incorrect power for connection values if 6 GHz power
type is not supported for that particular channel.

To address this issue configure power type for connection
only if that power type is supported for connection
channel.

Change-Id: Iab4f666df9a283a890d9a25ed4a43e244b253fd3
CRs-Fixed: 3502915
2023-06-06 05:39:29 -07:00
Krupali Dhanvijay
6fdf8a4a53 Revert "Revert "qcacmn: Fix low TPC power for vendor DTPC IE""
This reverts Change-Id: I52660d70cfa752114e2fa7e2b3c5f55e93e1a453

Change-Id: I46943765fc47a62c94dddddfbe2522c42e218dc4
CRs-Fixed: 3387238
2023-05-30 16:56:28 -07:00
Asutosh Mohapatra
e3e58e72e3 qcacmn: Don't disable connected 6 GHz channels
Currently host disables 6 GHz band when set_fcc_channel cmd
is received hence existing STA/P2P client 6 GHz connections
get disabled.
Add changes to keep existing STA/P2P client 6 GHz connections
intact and also keep SAP up on 6 GHz if STA+SAP SCC on 6 GHz
channel was present before receiving this command. Disable all
other 6 GHz operations.

Change-Id: I0e2d4715f78eb797eb93ed90a07028c5b7723211
CRs-Fixed: 3480979
2023-05-26 10:27:34 -07:00
Hariharan Basuthkar
6075201673 qcacmn: Add REG_AFC_CMD_CLEAR_AFC_PAYLOAD to reg_afc_cmd_type
Add a new member REG_AFC_CMD_CLEAR_AFC_PAYLOAD to reg_afc_cmd_type

Change-Id: I5cd27c50731b28a08978af1b437d811f97def503
CRs-Fixed: 3499029
2023-05-19 23:25:52 -07:00
Asutosh Mohapatra
459cea50e2 qcacmn: Find best 6 GHz power type for connection
Find the best 6 GHz power type for connection
according to following regulatory policy:
1) SP power type is selected only if AP advertises
   SP and client supports SP.
2) LPI power type is selected only if AP advertises
   LPI and client supports LPI.
3) VLP power type is selected for the below cases,
   a) AP advertises VLP and client supports VLP
   b) AP advertises SP but client doesn't support
      SP but supports VLP.
   c) AP advertises LPI but client doesn't support
      LPI but supports VLP.

Change-Id: I6e3b9fc4bf7445c58681ef0ea8e45b434851a5b6
CRs-Fixed: 3456182
2023-05-10 09:28:01 -07:00
Jianmin Zhu
c99051300b qcacmn: Fix wlan_reg_extract_puncture_by_bw API arguments num issue
wlan_reg_extract_puncture_by_bw should have 6 arguments.

Change-Id: I42e5b78ea052dcfdd7b5dfded7deb79f8a923c1a
CRs-Fixed: 3490286
2023-05-09 19:28:05 -07:00
Hariharan Basuthkar
b33c5ecbf3 qcacmn: Add support for AFC payload reset for proxy mode
In the AFC Enterprise mode, the AFC response-payload may need to be
reset from host. The payload reset is done by sending
WMI_SERVICE_AFC_RESET_SUPPORT subtype in the WMI_AFC_CMD to the target.

In response, the target sends the WMI_AFC_EVENT_TIMER_EXPIRY event with
WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE (in indoor deployment) or
WMI_EXPIRY_EVENT WMI_AFC_EXPIRY_EVENT_STOP_TX (in outdoor deployment)
event subtype to the host.

Earlier, the WMI_AFC_EVENT_TIMER_EXPIRY event was sent only in
non-enterprise mode. Now, since it can be sent for both enterprise and
non-enterprise mode, we need to take care of 'afc_reg no action",
which is mandatory in case of enterprise mode.

Therefore, implement the following changes:

1) Call trigger_acs_for_afc only if afc_reg_no_action is not set.
2) Send the AFC payload reset event during SWITCH_TO_LPI and STOP_TX
   event, and free the AFC payload received from the target.
3) Add APIs to register a callback to send the AFC payload reset event.

Change-Id: Ib5b3a6f51bbdf2061460fd957ca3c0ba66f23fa9
CRs-Fixed: 3462953
2023-04-29 05:17:33 -07:00
Basamma Yakkanahalli
d07361112b qcacmn: Export wlan_reg_freq_width_to_chan_op_class API
Export the wlan_reg_freq_width_to_chan_op_class() API.
API will be used by Change Id I69106463a587bf0717dbce3067b69bb7272ca976.

Change-Id: I3c751ccd6499bc0de48bdbb6086cf3ec7c8e9b88
CRs-Fixed: 3443845
2023-04-27 05:48:34 -07:00
Prabhu Dass Mahalingam
c113031b68 Revert "qcacmn: Fix low TPC power for vendor DTPC IE"
This reverts Change-Id: If6f1ea737c8b32db449dd340314026fd3693b698

Change-Id: I52660d70cfa752114e2fa7e2b3c5f55e93e1a453
CRs-Fixed: 3387238
2023-04-26 03:26:07 -07:00
Linux Build Service Account
78a653a54e Merge "qcacmn: Fix low TPC power for vendor DTPC IE" 2023-04-21 09:15:28 -07:00
Jithender Miryala
3a915602b8 qcacmn: Process the negative AFC standard EIRP power values
When we receive a negative EIRP value from AFC APP with UINT, we treat it
as a positive value. See the following reasons why EIRP power value
was changed when we received it as a UINT.

1. In the reg_find_eirp_in_afc_eirp_obj function, the afc 'eirp_power'
(16-bit) value is in units of 0.01, and it is an unsigned integer. For
example, if the negative value is "-1400" then it becomes "64136". With
this value, when we try to get the original EIRP value using division
(eirp_obj->eirp_power / EIRP_PWR_SCALE(100)), it returns "641", but the
expected EIRP value is -14.

2. In the reg_get_sp_eirp function, both the variables 'afc_eirp_pwr'
(8-bit) and 'reg_sp_eirp_pwr'(16-bit) are declared as unsigned integers.
For example, when "-14," is assigned to "afc_eirp_pwr", it becomes "242".
And assuming 'reg_sp_eirp_pwr' is "36", the minimum of the two variables,
using QDF_MIN(afc_eirp_pwr, reg_sp_eirp_pwr), becomes "36", but the
expected minimum is "-14 or 242".

Process the positive or negative EIRP values that are received from AFC
application. Receive it as an int instead of an unint and typecast it to
int when we check for minimum value from afc power and standard power.

Change-Id: I255225e1f68ab897d36f3d4fbd5e5815a862460b
CRs-Fixed: 3398501
2023-04-19 10:36:58 -07:00
Priyadarshnee Srinivasan
37050737b1 qcacmn: Export regulatory APIs
Export wlan_reg_get_freq_range() and wlan_reg_get_freq_range() APIs
to be invoked by other modules.

Change-Id: I2de7acf395011bdcc20100fc5980ab69f2b9fbeb
CRs-Fixed: 3459316
2023-04-18 12:11:54 -07:00
Priyadarshnee Srinivasan
c7200a49ec qcacmn: Make wlan_reg_recompute_current_chan_list common API
wlan_reg_recompute_current_chan_list() is defined for MCC only.
Make this wlan_reg_recompute_current_chan_list() common for both WIN
and MCC.

CRs-Fixed: 3451996
Change-Id: Ifcead79a68d0ed04ac1e4b78063f36b91e4d6fd8
2023-04-05 10:45:04 -07:00
Vignesh U
5dc7fe9a25 qcacmn: Unpack AFC structures
During initial AFC development it was assumed that AFC object would travel
till an application endpoint outside the driver, presumably till an
application of a different machine anything in the internet and therefore,
a packed and well formatted structure was propped for the AFC object.
However, when the AFC object leaves the driver, it is converted to an
object that has NL80211 TLVs to represent it. Therefore, the packed
AFC-request object is no longer a necessity. Moreover, since an unpacked
structure (or structures) is speed/time optimized, modify the packed
structures into unpacked structures.

Change-Id: I08db1911a355b6eebffa0e13def547c98ddf38d3
CRs-Fixed: 3431997
2023-04-03 01:36:23 -07:00
Rachit Kankane
d525bc0165 qcacmn: Support WMI_CSA_IE_RECEIVED_EVENTID
Add support for WMI_CSA_IE_RECEIVED_EVENTID as:

   1. Register the handler
   2. Handler to extract the event

Change-Id: I9f476c7fbc51d9686d05fbdb5f46dec3bcd3c29e
CRs-Fixed: 3431363
2023-03-27 09:22:51 -07:00
Sheenam Monga
9567fe0031 qcacmn: Fix reg_get_min_max_bw_on_cur_chan_list kernel doc
The kernel-doc script identified some documentation issues in
the doc of reg_get_min_max_bw_on_cur_chan_list, so fix those
issues.

Change-Id: I5f720706b8c744f39d4ad6f6dbd6e722c3d53096
CRs-Fixed: 3409405
2023-03-08 12:27:52 -08:00
Divyajyothi Goparaju
54beaf787e qcacmn: Replace callers of reg_set_channel_params_for_freq
Replace all callers of reg_set_channel_params_for_freq
with new api reg_set_chan_params_for_pwrmode

Change-Id: Ifefb8e0a2e9dc2dde5360f90b6c129573dfaddc1
CRs-Fixed: 3144601
2023-03-06 00:19:30 -08:00
Surya Prakash Sivaraj
315a1b3f8b qcacmn: Enable P2P GO operation on indoor channels
Do not mark REGULATORY_CHAN_NO_IR channel flag for
the 5 GHz indoor channels if p2p go support is enabled
on indoor channels.

Change-Id: I7fbae71766260513aa9946446b7e8bf8507df53b
CRs-Fixed: 3411708
2023-02-28 20:01:10 -08:00
Amith A
b9bdf95319 qcacmn: Add dispatcher & core APIs for rate2power update response handler
Add API reg_process_r2p_table_update_response to handle the event received
from target in response to rate2power table update cmd. Make a call to
end_r2p_table_update_wait from this API to end the wait timer triggered
for the update cmd. Add end_r2p_table_update_wait to
wlan_lmac_if_reg_tx_ops. Add a dispatcher
tgt_reg_process_r2p_table_update_response for this API and register it as
a rx_ops.

Add register and unregister APIs of rate2power table update response
handler to wlan_lmac_if_reg_tx_ops. Call the register API in
regulatory_psoc_open and unregister in regulatory_psoc_close. Define
struct r2p_table_update_status_obj and its members to receive the
response of rate2power table update cmd from target.

Change-Id: I6909e37620b94dc7fdcd3c7c0915a3fad8fa1cda
CRs-Fixed: 3405417
2023-02-28 00:43:04 -08:00
Jeff Johnson
69d9fa5a24 qcacmn: Fix umac/regulatory/dispatcher documentation
The kernel-doc script identified some documentation issues in the
umac/regulatory/dispatcher folder, so fix them.

Change-Id: I2d38ec243bba2f48f522e2b80ac097eec0e06a3c
CRs-Fixed: 3402138
2023-02-16 21:31:04 -08:00
Sheenam Monga
7453254a0c qcacmn: Add support to get min and max bw of chan enum
Add support to get min and max band width of provided
channel enum, so that configured bandwidth can be validated
whether it lies in the range of bandwidth or not.

Change-Id: I765b4e8013d021eaca41b37789d1ef3f1d57fa7d
CRs-Fixed: 3402928
2023-02-16 11:11:01 -08:00
Hariharan Basuthkar
8d466ff361 qcacmn: Add an API to enable or disable channels based on opclass
Add an API ucfg_reg_enable_disable_opclass_chans where given the
operating class, disable/enable the channels listed in the input
channel list.

The input channel list and operating class should be of 2 GHz or
5 GHz band.

Change-Id: Ie9dbbadbe28e5b5fdc2ec9c60c284da9c9e2286f
CRs-Fixed: 3301654
2023-02-15 04:53:25 -08:00
Jianmin Zhu
a8fbfe3aae qcacmn: Enable dynamic puncture for DFS radar
1. Enable sub chan DFS type if QCA_DFS_BW_PUNCTURE defined, or all bonded
operation freq will be affected and disabled for nol, puncture can't work,
always need to switch freq.

2. Find nearest puncture pattern for a bitmap.
For example, SAP started with channel width 320 MHz, if only 20 MHz freq
affected by radar, 320 + 20 puncture pattern is invalid, but puncture
pattern 320 + 40 can be used.

3. Fix build issue when QCA_DFS_BW_PUNCTURE defined as following.
error: incompatible pointer types passing 'qdf_freq_t[16]' (aka
'unsigned int[16]') to parameter of type 'uint16_t *' (aka 'unsigned
short *')

Change-Id: I374ed76c6a13ef5fac1a78073f1b8974b0a9bb30
CRs-Fixed: 3386020
2023-02-07 11:32:35 -08:00
Krupali Dhanvijay
4e3d1d1c75 qcacmn: Fix low TPC power for vendor DTPC IE
Currently low TPC power is configured to firmware if power constraint IE
is not present and only vendor DTPC IE is present. TPC power calculation
is depends on regulatory power, ap power constraint and TPE IE.

To fix this add new check is_power_constraint_abs in reg_tpc_obj.
Whenever local power constraint is from DTPC IE, is_power_constraint_abs
is set to true. And TPC power is calculated with regulatory power,
DTPC IE power and TPE IE power.

Change-Id: If6f1ea737c8b32db449dd340314026fd3693b698
CRs-Fixed: 3387238
2023-02-03 04:47:41 -08:00
Vinod Kumar Myadam
f1664a7c8a qcacmn: Replace reg_get_5g_bonded_channel_for_freq to pwrmode API
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Replace the references of "reg_get_5g_bonded_channel_for_freq"
with "reg_get_5g_bonded_channel_for_pwrmode".

Change-Id: I4c978c7f938b14d79d0eadf4251a86a9165f496e
CRs-Fixed: 3147900
2023-02-03 03:37:43 -08:00
Vinod Kumar Myadam
c50244f2b8 qcacmn: Replace reg_is_chan_supported to use pwrmode API
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Update callers of reg_is_chan_supported with super channel list.
reg_is_chan_supported to use the super channel list API
reg_is_chan_supported_for_pwrmode.

Change-Id: I5d33f7bb0bee6012c28d35e6138f5a03525c33ca
CRs-Fixed: 3357157
2023-01-30 10:37:03 -08:00
Vinod Kumar Myadam
006220cc0d qcacmn: Replace callers to use super channel list API
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Update caller APIs to use super channel list. Removed
wlan_reg_get_bonded_channel_state_for_freq and
wlan_reg_get_5g_bonded_channel_and_state_for_freq to use the
super channel API wlan_reg_get_bonded_channel_state_for_pwrmode
and wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode
respectively

Change-Id: If51bd130892cd712f5a218067a5d321e874e134a
CRs-Fixed: 3357153
2023-01-30 06:27:57 -08:00
Vinod Kumar Myadam
5abb61b966 qcacmn: Update API to use super channel list
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Remove reg_get_5g_bonded_channel_state_for_freq,
wlan_reg_get_5g_bonded_channel_state_for_freq and
reg_update_5g_bonded_channel_state_punc_for_freq APIs to use the
super channel APIs reg_get_5g_bonded_channel_state_for_pwrmode,
wlan_reg_get_5g_bonded_channel_state_for_pwrmode and
reg_update_5g_bonded_channel_state_punc_for_pwrmode.

Change-Id: I895d70d3a07e239500f97b9ab7884d7723de5080
CRs-Fixed: 3144661
2023-01-30 06:27:44 -08:00
Hariharan Basuthkar
3903f58981 qcacmn: Add API to set/unset is_6g_afc_power_event_received flag
Add API reg_set_power_event_received_flag to set
is_6g_afc_power_event_received flag with a given value.

Change-Id: I322c3724f23c611d1a0d65248b777501c742000e
CRs-Fixed: 3260971
2023-01-24 04:48:32 -08:00
Divya R
8d986f372a qcacmn: Add dispatcher for reg_get_num_rules_of_ap_pwr_type
Add dispatcher for function reg_get_num_rules_of_ap_pwr_type
to get the number of rules supported for given power mode

Change-Id: I084cc4e47ed16a71c1a8a7db4a6f046a0007a9d7
CRs-Fixed: 3378907
2023-01-18 11:50:11 -08:00
Asutosh Mohapatra
e4407d89d1 qcacmn: Do not allow connection if STA VLP not supported
If country code for AP and STA are same and if STA does not
support VLP mode for a particular channel and if AP power
type is misconfigured to VLP mode, do not allow connection
to that AP as per regulatory guidelines.

Change-Id: Ie3bb980df25a15c4d9d7e566663e28950414f733
CRs-Fixed: 3362142
2023-01-17 21:06:08 -08:00
Vinod Kumar Myadam
95b9b6dc2f qcacmn: Update API to use super channel list
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Remove wlan_reg_fill_channel_list to use the super channel API
wlan_reg_fill_channel_list_for_pwrmode.

Change-Id: I9645caff236af786b6376608be2aa56a28fe689c
CRs-Fixed: 3357161
2023-01-13 16:38:16 -08:00