Commit Graph

343 Commits

Author SHA1 Message Date
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
Jianmin Zhu
4e0c4422cf qcacmn: Enable static puncture
Driver receive NL80211_CMD_START_AP to get fixed freq, width and
apply puncture_bitmap from EHT ie, disable punctured 20 MHz sub channels
in regulatory component, and send to F/W by vdev start,  update eht op/he
op/vht op in beacon template.

When start ap, apply puncture to regulatory, set is_static_punctured flag
for all 20 MHz sub channels of current bonded channel in master channel
list of pdev, and disable 20 MHz sub channel in current channel list if
is_static_punctured is set.

When stop ap, remove puncture to regulatory, clear is_static_punctured flag
for all 20 MHz sub channels in master channel list of pdev, and don't
disable 20 MHz sub channel in current channel list if is_static_punctured
is not set.

change-Id: Ia97e7a4fa56a66f343bd648b62216347787ba6d0
CRs-Fixed: 3356755
2022-12-22 10:44:46 -08:00
Amith A
4fc546e9f7 qcacmn: Add APIs to set current client type
For “Subordinate” clients in SP or VLP mode, FW does not send any
regulatory rules as currently no country supports subordinate in SP and
VLP. When the rules are not present, SP/VLP clients are connected to the
root ap in 0dBm tx power, which results in low throughput. Connecting to
the root ap using 0dBm tx power is not the correct behavior. If the rules
for any power mode is not available, clients should not connect in that
mode. Therefore, "Subordinate" clients cannot connect to the SP/VLP APs.

To resolve this issue, the device client type should be changed to
"Default" client type when it is connected to the root AP in SP or VLP
mode. Once it gets disconnected or when the root AP moves to LP mode,
its mode should be reset back to "Subordinate" client type.

Add a variable reg_target_client_type to wlan_regulatory_pdev_priv_obj
structure and in reg_propagate_6g_mas_channel_list, store the client
type received from target in it.

Add API reg_set_cur_6ghz_client_type to set the current client type to a
given value.

Add API reg_set_6ghz_client_type_from_target to set the current client
type to the value received from target.

Change-Id: Ie7d9e8b45cd831018c0058d65880a3659457b499
CRs-Fixed: 3349767
2022-12-04 06:25:56 -08:00
Surya Prakash Sivaraj
b409d8e0a0 qcacmn: Update NO_IR flag of indoor channel dynamically
In current design of sta+sap scc on indoor channels, the NO_IR
flag of all the indoor channels are removed during init.
Then, based on the operations on the SAP interface, the
SAP concurrency will be decided in host driver.

However, some userspace p2p applications, do not query the
pcl list from driver, therefore standalone P2P GO are sometimes
brought up in indoor channels.

To fix this:
1. Upon STA connect: Remove the NO_IR flags only from the
indoor channels to which the STA is connected.
2. Upon STA disconnect: Add the NO_IR flag back to the
disconnected channel.
3. Upon STA roam/csa:
    a) Add the NO_IR to the new channel if it is indoor.
    b) Remove the NO_IR of the previously connected channel
       once the SAP/GO(if present) moves out of the indoor channel.
4. The NO_IR flags should be removed for all the bonded channels
on which the STA is active.
5. In indoor concurrency cases, add logic in the SAP start to
limit the channel width with the STA interface bandwidth. Since,
only the bonded channels are active channels.

Change-Id: I0e200a1ef306909398644aecbfbca27622bb9d48
CRs-Fixed: 3337071
2022-11-26 10:35:42 -08:00
Hariharan Basuthkar
c23792348d qcacmn: Export wlan_reg_get_cur_6g_client_type for using outside UMAC
Export wlan_reg_get_cur_6g_client_type, so that it can be used
by APIs in other modules outside UMAC.

Change-Id: I010c58b85e43603b96a1281318ac59f368635aee
CRs-Fixed: 3343537
2022-11-26 10:35:18 -08:00
Will Huang
ed050b6f1a qcacmn: Populate pdev secondary_cur_chan_list for mobile device SAP
secondary_cur_chan_list channel list is for mobile device SAP, which
by default cannot enable on LPI channels, and cannot enable on SP
channel until AFC server response received.

Populate 6 GHz channels to secondary_cur_chan_list based on 6 GHz
regulatory rules of current country, LPI channel will not be added
in because it is not allowed for mobile SAP. And update 6 GHz SP
channel attributions if received AFC response.

Also add APIs to populate power attributions of secondary_cur_chan_list
and decide proper 6 GHz power attributions if 6 GHz channel frequency
and bandwidth being selected.

Change-Id: I6aa0228f18f7e31fc3cdd63a98483d02afb0579a
CRs-Fixed: 3204156
2022-11-22 10:22:28 -08:00
Will Huang
f8f0b97ffa qcacmn: Add APIs to configure target AFC flags
Add common code to configure target AFC flags:
enable_6ghz_sp_pwrmode_supp, afc_disable_timer_check,
afc_disable_request_id_check.

Remove cfg_get set is_afc_reg_noaction code, add it to psoc regulatory
private data.

Add APIs to set and get these AFC configures.

Change-Id: Idf74b245113eee18b071a7fbb92bb151cd535ce8
CRs-Fixed: 3154185
2022-11-17 15:35:45 -08:00
Divyajyothi Goparaju
28aa42540e qcacmn: Replace wlan_reg_set_channel_params_for_freq
Replace all occurrences of
wlan_reg_set_channel_params_for_freq  API with new API
wlan_reg_set_channel_params_for_pwrmode.

Change-Id: Id751558b32f2b61bd356e1ebce3238598fbd16c1
CRs-Fixed: 3144794
2022-11-01 09:18:51 -07:00
Amith A
0f5cd03b90 qcacmn: Modify wlan_reg_get_eirp_pwr to get client EIRP
Modify wlan_reg_get_eirp_pwr and its sub functions to to get client
EIRP.

Change-Id: Icbc33833ac0fef1d150a491e5398b913e18f3fac
CRs-Fixed: 3316710
2022-11-01 03:39:59 -07:00
Amith A
60e23f8e3b qcacmn: Add an API to check if given 6 GHz freq is Tx-able
Add an API to check if the given input 6 GHz frequency is Tx-able
in the given power mode.

Change-Id: I9e94c1c3ec7c4c31d18bde6e88905a9239636f00
CRs-Fixed: 3305006
2022-10-31 23:18:46 -07:00
Priyadarshnee Srinivasan
f5324ff1ce qcacmn: Add best power mode changes for punctured channels
AFC request or response does not consider punctured channels/BW as an
input. Hence the SP EIRP/PSD power for punctured channels cannot be
derived directly from AFC response data.
Add punc_pattern as an input to the APIs reg_get_best_pwr_mode() and
reg_get_eirp_pwr() (and its dispatchers).
Compute SP EIRP for the punctured channels in
reg_get_sp_eirp_for_punc_chans() using the following formula:
MIN_PSD + 10log10 (Non-punctured BW)
Fetch min_psd from the AFC server response data for the input freq
and BW combination.
Use the total BW and puncture pattern to fetch the
non-punctured BW.

CRs-Fixed: 3306932
Change-Id: Id5c4c404a3155474a01a0dacb3bcf289e92e65ac
2022-10-26 01:16:52 -07:00
Priyadarshnee Srinivasan
7ef4c7a634 qcacmn: Add input puncture bitmap to channel search API
Add input_punc_bitmap to struct ch_params.
Add input puncture bitmap to regualtory channel search APIs.

The non-SP channels will be punctured by ACS module so that AP
can come up in highest possible BW in Standard Power mode
with the given primary frequency. These punctured channels are not
validated (whether supported in the given power mode of operation) by
the regulatory.

CRs-Fixed: 3278013
Change-Id: I56b0495be902fd92fc6da26e1007d60f930ba687
2022-10-26 01:16:27 -07:00
Priyadarshnee Srinivasan
571b7fcf35 qcacmn: Add a dispatcher API to fetch bonded chan entry
Add a dispatcher API wlan_reg_get_bonded_chan_entry to fetch
the bonded channel entry given freq, bandwidth and center of 320 MHz
channel.

CRs-Fixed: 3278013
Change-Id: I9449b3b4d72266fd7f2b6a0ea78b661fbfa5c6a9
2022-10-25 22:09:07 -07:00
Priyadarshnee Srinivasan
cdd62624af qcacmn: Add an API to fetch the AFC freq range and psd limits
Add an API to fetch the freq range and PSD limits from AFC server
response

Change-Id: I583dfbd6f58e6293ba2d9df5d49763f236a2698c
CRs-Fixed: 3306932
2022-10-25 18:38:52 -07:00
Hariharan Basuthkar
1773c16687 qcacmn: Add Regulatory support for EIRP preference
Add regulatory support for giving preference to fill EIRP power
in the WMI_VDEV_SET_TPC_CMD_ID.

Change-Id: Iab28306b15d74109519629cb0b815cd110254d56
CRs-Fixed: 3307372
2022-10-22 19:48:42 -07:00
Divyajyothi Goparaju
f3372af250 qcacmn: Replace reg_get_channel_state_for_freq
As part of upgrading legacy code with 6 GHz power APIs,
replace reg_get_channel_state_for_freq api with new api
reg_get_channel_state_for_pwrmode

Change-Id: I3e577148f0ee78f6ec8f96feef42be9ac920467d
CRs-Fixed: 3144822
2022-10-20 12:50:32 -07:00
Gururaj Pandurangi
880d85269f qcacmn: Add reg APIs to update tx power on ctry code change
Add a new regulatory callback registration API and a
regulatory API to update tx power whenever the country code
changes without change in operating channel OR if fcc
constraint is set. This MCC-specific regulatory API is
called from HDD and invokes the TPC calculation logic via a
callback during the above-mentioned cases.

Change-Id: I7d3db83129d169b7e0421c20c061de356f32cfa2
CRs-Fixed: 3311432
2022-10-17 19:59:39 -07:00
Jeff Johnson
bbc6f89c23 qcacmn: umac: regulatory: Fix misspellings
Fix misspellings in umac/regulatory/...

Change-Id: I9ede258627348c877cc824f80caae903fa0b21f2
CRs-Fixed: 3304700
2022-10-10 10:01:48 -07:00
Divyajyothi Goparaju
09546389da qcacmn: Replace wlan_reg_get_channel_state_for_freq
Replace all occurrences of
wlan_reg_get_channel_state_for_freq with
wlan_reg_get_channel_state_for_pwrmode and
use extra parameter as REG_CURRENT_PWR_MODE

Change-Id: Idfd0b095867a5e75e795d6297f998725e62f7300
CRs-Fixed: 3145012
2022-10-06 13:01:30 -07:00
Divyajyothi Goparaju
7da3869958 qcacmn: Replace reg_is_disable_for_freq
As part of upgrading legacy code
with 6 GHz power APIs,
replace reg_is_disable_for_freq,
wlan_reg_is_disable_for_freq and
reg_set_5g_channel_params_for_freq APIs
with reg_is_disable_for_pwrmode,
wlan_reg_is_disable_for_pwrmode and
reg_set_5g_channel_params_for_pwrmode APIs
respectively.

Change-Id: I70089b02fd3698dcd83d5418993f7ca238ad0e0b
CRs-Fixed: 3145785
2022-10-01 11:35:35 -07:00
Vijay Krishnan
056b6ae310 qcacmn: Fix compilation issue of QCA_DFS_BW_PUNCTURE
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3282072
Change-Id: I680670e58bd57d104bc69f2b4e7a56010b7584a5
2022-09-08 07:47:32 -07:00
Vijay Krishnan
ef864278aa qcacmn: Validate the proposed bitmap and enable puncturing
When radar is found in any DFS channel, a radar bitmap is
generated based on the radar infected channels. For example,
if operating channel is 100 HT160 and radar found in 112,
then the generated bitmap is B0000_0010. This proposed bitmap
is compared with the valid puncturing patterns. In this case,
the proposed bitmap is valid puncturing pattern.

In case of a valid puncturing pattern, send the final
bitmap to DFS module and the module updates the DFS channel
puncturing pattern. If an invalid puncturing pattern is
found, return value zero and do not update DFS channel
puncturing pattern.

CRs-Fixed: 3273800
Change-Id: Iee23ac267bfea1b4815a72c2728555f96bed6466
2022-09-08 07:47:25 -07:00
Asutosh Mohapatra
c70f8eec91 qcacmn: Add support to store and use fcc rules sent by firmware
When set_fcc_channel is set, host driver sets tx_power info about
channels 12, 13 to hardcoded values. Now firmware sends information
about channels 12, 13 to host driver and currently there is no
support to extract and store this information and use it to
modify tx_power of channels 12, 13 in host driver.

Add support to store the tx_power of channels 12, 13 received
from firmware and use this to modify tx_power of fcc channels.

Change-Id: Ie7b20a75bb09956a70b7b133ce7ce9beb8db138b
CRs-Fixed: 3270676
2022-09-05 21:33:04 -07:00