Commit Graph

2822 Commits

Author SHA1 Message Date
Hariharan Basuthkar
d386ccb51a qcacmn: Check the num of reg_rules before setting AP power type
In reg_set_ap_pwr_and_update_chan_list, before setting the AP power type
check the number of reg_rules present for the input AP power type.

Change-Id: I3af82cf8b7ff6ed7525b5284390361a618da4140
CRs-Fixed: 3030223
2021-09-06 13:57:54 -07:00
Kiran Venkatappa
03a407cea5 qcacmn: Add API to get pdev object from hw_link_id
Add API to lookup pdev object based on hw_link_id and return this with
reference held. Caller is responsible for releasing the ref

Change-Id: I6e3e371462c0d2a4b590b4a5de5c098a72577827
CRs-Fixed: 3026072
2021-09-06 03:12:28 -07:00
Hariharan Basuthkar
8fbbf2af16 qcacmn: Fix a compilation error in ucfg_reg_get_partial_afc_req_info
Fix a compilation error in ucfg_reg_get_partial_afc_req_info, when
CONFIG_AFC_SUPPORT is enabled.

Change-Id: I9834170b08bd72ee4201284c22211e3b1e5fc560
CRs-Fixed: 3029969
2021-09-04 23:16:19 -07:00
Lincoln Tran
6deace5e8f qcacmn: Remove locking mechanism when getting link vdevs
Remove the locking mechanism when getting the link vdevs since it is
causing a deadlock.

Change-Id: I360bd1ad609cfe1d0eb3576b66aeeb93495811fa
CRs-fixed: 3025767
2021-09-03 18:17:27 -07:00
Hariharan Basuthkar
94e4707d98 qcacmn: Update 6G ap power type for every FW load
When the host driver is insmod-ed, and first time the pdev object
is created, the AP power mode starts with LPI. When the FW sends the AFC
power values, the Host switches to SP mode.

If 'wifi down and wifi up' happens, all the VAPs are deleted but
pdev object is retained in the memory. Since, during 'wifi down and
wifi up' the FW is reloaded again, the FW starts with LPI always.
However, since pdev object already exists the AP power mode variable
in the regulatory private object has the same old power mode.

To fix the problem described above, update the power mode whenever
the WMI_REG_CHAN_LIST_CC_EXT_EVENT is received from the target.

Change-Id: I7a349e4defcd50cd46117d8ee55bbe8c7c8f7e80
CRs-Fixed: 3028659
2021-09-03 11:03:50 -07:00
Vignesh U
fc7e74f044 qcacmn: Create intersected AFC channel before calling ACS
ACS needs the intersection of SP channel and the channel list in the AFC
response.

Create intersected AFC channel before calling ACS.

Change-Id: I9443edfc4d8b31edf5ae7e040c0743de9a0851b3
CRs-Fixed: 3023930
2021-09-03 03:25:12 -07:00
Vignesh U
a4b1ed87f0 qcacmn: Fix compilation error in reg_get_partial_afc_req_info
The function reg_get_partial_afc_req_info() declaration is different from
its definition prototype.

Change-Id: Idd36e1343dd2af1d5ecaf3b8dcbaf7dc6839d560
CRs-Fixed: 3023862
2021-09-03 03:25:07 -07:00
Hariharan Basuthkar
e1708ea080 qcacmn: Add a condition in reg_compute_chan_to_freq for 6G channel 2
When 6G IEEE channel 2 (5935 MHz) is enabled in the master channel list,
and if the channel 1 (5955 MHz) is the input to the API
reg_compute_chan_to_freq, the API returns 0 as the output channel
frequency.

Since the IEEE number 2 is greater than 1 (but in terms of frequency it
is a lesser value), the break condition in the for-loop gets
satisfied, and since the enum of channel 2 is equal to MIN_6GHZ_CHANNEL,
the API returns 0.

To fix this issue, in reg_chan_band_to_freq, handle 6G channel 2 as a
special case by directly returning its frequency, and also
skip it from the search space of reg_compute_chan_to_freq.

Change-Id: Ief79ee2d93f4d547688e10113a8105a763c767f8
CRs-Fixed: 3013255
2021-09-02 23:58:12 -07:00
Hariharan Basuthkar
b136efc7a5 qcacmn: Intersect AFC and SP regulatory power
While appending one of the 6g_master_channel lists (based on power
type) to the master channel list, if the power type is standard power,
intersect the standard power list with the afc power list and append
the intersected list to the master channel list if the afc power
list is available.

Change-Id: I606e765a4abd5cd71cf35a13ac799fdec8e87ffd
CRs-Fixed: 3023853
2021-09-02 14:32:05 -07:00
Hariharan Basuthkar
033605a031 qcacmn: Add a dispatcher API to read the ini AFC config
Add a regulatory dispatcher API to fetch the value of AFC action
from the ini config.

Change-Id: I053262f98991a656d1919817ce37227202a46bc3
CRs-Fixed: 2997899
2021-09-01 21:38:11 -07:00
Hariharan Basuthkar
8c2dd12d3c qcacmn: Fix driver crash observed during AFC request processing
Currently the AFC request buffer is being freed twice in
reg_free_expiry_afc_info and tgt_afc_event_handler.
Make changes to free the AFC req buffer only once.

Change-Id: I6d0f5c783a124da40eae6166132f7d7132cf76e4
2021-09-01 17:13:31 -07:00
Kiran Venkatappa
7aaef9935d qcacmn: Extract hw_link_id and store in target_if pdev context
hw_link_id is unique across psoc to identify pdev in multi-soc ML cases.
Exract hw_link_id from mac_phy_cap and provide APIs in target_if to set
and get this for pdev

Change-Id: I9dcc4c1e4b515e83151ca88f5f026c0dd0b04646
CRs-Fixed: 3023496
2021-09-01 17:13:27 -07:00
Sridhar Selvaraj
bfb04859c6 qcacmn: Reset skip_bssid_copy flag in split profile parsing
While parsing MBSS IE split profiles, bssid copy flag
is not reset in between sub element parsing resulting
in skipping the bssid copy for next non tx profile.

Reset skip_bssid_copy flag for each sub element parsing
so that correct bssid is copied for next non tx profile

CRs-Fixed: 3019298
Change-Id: I429190b21a3ddafdc75a73e8b063f6b6f629492a
2021-09-01 09:03:13 -07:00
Hariharan Basuthkar
258d7f4c16 qcacmn: Implement the 6G AFC power event processing
Add regulatory functions to handle the WMI_AFC_EVENTID. This
includes processing the AFC power information received from the FW,
and constructing the AFC channel list in the regulatory component.

Change-Id: I5da8fc7faae847476f88ff35b20e6444115af7f1
CRs-Fixed: 3023789
2021-08-31 14:44:50 -07:00
Bing Sun
7fcc2ebd13 qcacmn: Fix issue when getting rnr
When getting rnr IE information, instead of getting rnr pointer through
input parameter,  we can just return rnr pointer.

Change-Id: I57f683eb86bb813018a38fa3a6286e9b6e40037f
CRs-Fixed: 3025194
2021-08-31 12:23:26 -07:00
Ashish Kumar Dhanotiya
8082901907 qcacmn: Set default value of mawc_nlo_enabled ini as 0
Set value of mawc_nlo_enabled ini as 0 by default.

Change-Id: I7779072deecc9390f3df929355788ee8d73cb48f
CRs-Fixed: 3024972
2021-08-31 07:54:49 -07:00
Santosh Anbu
bb40ebd9a8 qcacmn: Use vdev list when dispatch sync complete event to MLO
In few of the scenarios, as part of sync complete handling mld_dev_context
lock is been acquired, which causes deadlock as it is already taken before
dispatching the event.

Hence get the vdev list under lock and reference taken and then dispatch
mlo_sync_complete individually.

Change-Id: Id23dba89276ecaadb02cd3a39a66b4fca3f97c7c
CRs-Fixed: 2924329
2021-08-31 01:15:41 -07:00
Santosh Anbu
d445d62fd9 qcacmn: MLO quiet vdev bitmap support for AP
Add change to support indication of quiet vdev for MLO AP context.

Change-Id: I7368e023976c29ae98fef2b86ef6aee0b7621390
CRs-Fixed: 2924329
2021-08-31 01:15:33 -07:00
Utkarsh Bhatnagar
b7ab2f5cd7 qcacmn: Add support for Thermal Stats Events
Add support for extracting Thermal Stats Events
from thermal event TLV for FW event
WMI_THERM_THROT_STATS_EVENTID.

Also, added support for FW Cmd to request for
Thermal Stats: WMI_REQUEST_THERMAL_STATS_CMDID

Change-Id: I2bc80d082bda45e2255371bcb0c31d35d9806525
CRs-Fixed: 3016845
2021-08-27 10:23:50 -07:00
Abhijit Pradhan
bd02b05aa5 qcacmn: Move repetitive function bodies into a single function
The body of the two following functions:
1)reg_get_num_sp_freq_ranges,
2)reg_cp_freq_ranges
have much in common.

Move the common part into a single function in order to optimize code size.

Change-Id: Ice9e925ef0e64baa41f867a92a3c3d2902374d74
CRs-Fixed: 3019338
2021-08-27 08:08:53 -07:00
Abhijit Pradhan
575da29354 qcacmn: Find the frequency ranges for AFC request
The regulatory rules contain the frequency ranges that are supported
by the current regulatory domain. Also every radio has a chip range
which indicates the range of frequencies supported by the radio. To
find the list of frequencies for the AFC request, add each regulatory
frequency range that are within the chip range to the AFC list of
frequency ranges. If a regulatory range has a partial overlap with the
chip range add only the overlapping part of the range to the AFC list
of frequency ranges.

Change-Id: Ida3e2217783db82fef2825c6a6603e79ef65951b
CRs-Fixed: 3019336
2021-08-27 08:08:48 -07:00
Shashikala Prabhu
d4c52fb8ef qcacmn: Remove the 'multi_link is null' error print
"scan_entry->ie_list.multi_link is null" print is
flooding the scan component. Hence, remove this print.

Change-Id: I921eea8afc2dba5637c7c02717e2d1fb544ba103
CRs-Fixed: 3023813
2021-08-27 08:08:43 -07:00
Hariharan Basuthkar
0b8e97ac32 qcacmn: Add dispatcher APIs for AFC in the regulatory
1) Add an ucfg dispatcher for reg_afc_start.
2) Add an API wlan_reg_get_afc_req_id, to fetch AFC request id.
3) Add an API wlan_reg_is_afc_expiry_event_received, to check if the AFC
   expiry event is received from the target.

Change-Id: I45841706c500e74632b60546d945cde4d634a5d2
CRs-Fixed: 3011675
2021-08-27 05:44:45 -07:00
Kiran Kumar Lokere
e2ada05cee qcacmn: Config support to use BSSID in probe request RA
User configuration support to use scan request BSSID value
in Probe Request frame RA during the scan.

Change-Id: I40d07e4c3e4814a9c816b3e426dcbb63df7ddf27
CRs-Fixed: 2945679
2021-08-27 01:06:23 -07:00
Will Huang
64d063094f qcacmn: Change beacon drop log to rate limit log
Although beacon drop info is important, but if continually print with
info level it will flood serial log and lead to low performance.
Security mode check is mandatory in 6Ghz band, so it is by default
enabled, so possible to see many beacon drop log because of this check.

Change beacon drop log to rate limit and fix one potential memory
leak in __scm_handle_bcn_probe().

Change-Id: Ic9032b99504d6ff41256d547e2d8fad101301589
CRs-Fixed: 3014786
2021-08-27 01:06:19 -07:00
Liangwei Dong
71ba53089e qcacmn: Add API wlan_reg_get_next_lower_bandwidth
Export regulatory API wlan_reg_get_next_lower_bandwidth to
get next lower bandwidth of given channel bandwidth.

Change-Id: Id86d83c1bf738061d325b23d3f46b77d45eaeca5
CRs-Fixed: 3021976
2021-08-26 20:56:17 -07:00
Lincoln Tran
ce48d77998 qcacmn: Add debug MLO changes
-Add debug logs to MLO manager code.
-Add ml_dev validation checks for ML peer operations.
-Add pointer checks to avoid NULL pointer dereference

Change-Id: I8e9ddf177a999a43e8612f8c6acedd08ffce63d5
CRs-fixed: 2998964
2021-08-25 19:45:02 -07:00
Himanshu Batra
df25501b83 qcacmn: Fill ML info while getting active connect/disconnect request
Fill ML info while getting active connect/disconnect request

Change-Id: Ifdbfacab64bfcc144ac3f2afb68854f2108e729d
CRs-Fixed: 3022005
2021-08-25 13:07:19 -07:00
Shiva Sankar Gajula
d3b7b11795 qcacmn: Reset mgmt ciphers and key mgmt to 0 by default
The 11r roaming is not happening when PMF disabled STA is trying to
roam from PMF disabled AP to PMF optinally configured(ieee80211w=1)
AP which is due to candidate_list is not found because of mgmt
ciphers mismatch (the PMF disabled mgmt cipher is None(1<<17) and PMF
optional AP's mgmt cipher is CMAC(1<<6)) happening while comparing
security params and is due to mgmt cipher value is reset to None(17)
after STA connected to AP.

So, Added changes to reset the mgmt cipher value to zero. Also, added
changes to reset the keymgmt to 0 instead of None since this is
missing in earlier implementation.

Change-Id: I9f24a215011b4984937e98225bcb3975bc3f685f
2021-08-25 07:25:20 -07:00
Liangwei Dong
116aba71e2 qcacmn: Fix DFS_RANDOM_CH_FLAG_NO_DFS_CH not working
When DFS_RANDOM_CH_FLAG_NO_DFS_CH set, the random channel
selection will pick non-dfs channel. But currently the
MCL API utils_dfs_get_channel_list doesn't populate
the DFS flags "WLAN_CHAN_DFS" for dfs channel.
That causes the dfs_prepare_random_channel_for_freq API
can't identify DFS channel.
Fix by set WLAN_CHAN_DFS for dfs channel

Change-Id: I7ead760ddc77c198a630d12960e775961840796c
CRs-Fixed: 3016746
2021-08-23 19:09:17 -07:00
Vignesh Mohan
10ca017ae0 qcacmn: Check if pdev only supports 6G for DFS check
While checking if the pdev is 5G for DFS APIs, only 11A mode
support is checked which is also present for 6G radios which do not
have DFS. Check if the radio is only 6G in addition to the 11A check,
and if it's only 6G supported, return false.

Change-Id: I80008de610a93eeac326da36da43a747bafad2d9
2021-08-23 13:26:40 -07:00
Edayilliam Jayadev
9ccbe5a0fb qcacmn: Add API to get address of mgmt Rx REO snapshots
Add APIs to get address of management rx-reordering snapshots.

CRs-Fixed: 2963485
Change-Id: Idfe13425ad5f95f1a3d92edfc2d6d41aded5aec9
2021-08-23 13:26:36 -07:00
Vivek
a32acb5027 qcacmn: Send connect/disconnect response for flushed connect/disconnect
Send connect/disconnect response for flushed connect/disconnect

Change-Id: I23df9c249bdcba0530dcee33c2a09534869815b0
CRs-Fixed: 3008838
2021-08-23 00:18:24 -07:00
Hariharan Basuthkar
d2ef66d69a qcacmn: Get AFC mas_chan_list and check if AFC power event is received
Add an API wlan_reg_is_afc_power_event_received, to check if AFC power
event is received.

Add an API wlan_reg_get_6g_afc_mas_chan_list. to get the AFC master
channel list.

Export wlan_reg_get_6g_afc_chan_list so that it can be used by
APIs outside the UMAC module.

Change-Id: I09338a41f38e4db03f00ef2c15e9a0b7805f649e
CRs-Fixed: 2991293
2021-08-21 17:28:20 -07:00
Shiva Krishna Pittala
93c0702c78 qcacmn: Add support for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order
criterion for incoming management frames.
Add target_if and tgt layer support for the same command.

Change-Id: I5daaf4d095774d751d98a27fd77dec9daaa6b16a
CRs-Fixed: 2960488
2021-08-21 15:17:33 -07:00
abhinav kumar
86812026a0 qcacmn: Possible Integer overflow in wifi_pos_oem_rsp_handler
API "target_if_wifi_pos_oem_rsp_ev_handler" is the handler for
the event with WMI_OEM_RESPONSE_EVENTID. Host receives
"rsp->dma_len" from fw. The integer overflow occurs if
"oem_rsp->dma_len" is big enough while calculating the total
length of the Oem Data response buffer.

Fix is to add a sanity check for rsp->dma_len to avoid integer
overflow.

Change-Id: Idfbd358f62534eae0147f03505ced5728877a269
CRs-Fixed: 3001191
2021-08-21 15:17:29 -07:00
Shiva Krishna Pittala
57543be336 qcacmn: Add WMI layer functionality for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order
criterion for incoming management frames. Add WMI layer support for the
same command.

Change-Id: If1498fd4fbccd86e7d54d9eac268868b36523d06
CRs-Fixed: 2960472
2021-08-21 13:06:51 -07:00
Shiva Krishna Pittala
361f45dd82 qcacmn: Add APIs to extract MGMT Rx REO params tlv
When MGMT Rx REO feature is enabled, FW will be sending MGMT Rx REO
parameters TLV as part of WMI_MGMT_RX_EVENTID for the frames that require
reordering. Add APIs to extract the same.

Change-Id: I57b132927cf413384d680b5778bfe6a2e2737adf
CRs-Fixed: 2960471
2021-08-21 13:06:43 -07:00
Rhythm Patwa
c3aaef41d8 qcacmn: Export symbol for use in offload module
Export ucfg_reg_register_afc_req_rx_callback symbol for use
in offload module.

Change-Id: I6cd2e479aadb1c4d50b7341ea361b1fee20a1ba8
2021-08-21 02:07:48 -07:00
Gururaj Pandurangi
5c4ead3c06 qcacmn: Fix byte alignment in struct dfs_nolelem
Fix byte alignment in struct dfs_nolelem by removing
structure packing (qdf_packed).

Change-Id: I83ca71fe019a2482283655b1b8837844a8afb007
CRs-Fixed: 3017791
2021-08-20 19:38:12 -07:00
Hariharan Basuthkar
ea19d1eaca qcacmn: Create afc regulatory structure and variables
Create a new struct afc_regulatory_info to store the parameters
received in the WMI_AFC_EVENTID.

Also add the following members to the wlan_regulatory_pdev_priv_obj:

1) bool is_6g_afc_power_event_received
2) bool is_6g_afc_expiry_event_received
3) struct regulatory_channel afc_chan_list[NUM_6GHZ_CHANNELS]
4) struct regulatory_channel mas_chan_list_6g_afc[NUM_6GHZ_CHANNELS]

Change-Id: I27ae8545e28bc2ca1c7004d2d2adcc539dc9a8f9
CRs-Fixed: 3017210
2021-08-20 17:30:49 -07:00
Shiva Krishna Pittala
a52614b732 qcacmn: Add WMI layer functionality for MGMT Rx FW consumed event handler
When MGMT frames are consumed by the FW, FW sends MGMT Rx FW consumed event
to the Host. Add WMI layer functionality for this event handling.

Change-Id: Id95f41a717b88589e861781e1111b17dc90475be
CRs-Fixed: 2959118
2021-08-20 12:57:21 -07:00
Rhythm Patwa
07fc0519ee qcacmn: Add support for AFC response structures
Add AFC response structures to send over AFC response
data over to target.

Change-Id: I80530b56b94acc43b35b414c10d6783cd8dcdd92
2021-08-19 15:22:02 -07:00
abhinav kumar
a368b81e70 qcacmn: From connection manager filter only ESS type of AP
ESS (Extended Service Set) operating mode allows wireless
device to roam anywhere within the area covered by multiple
APs.

IBSS (Independent Basic Service Set) allows wireless device
to connect in peer-to-Peer mode only.

Fix is to allow connection manager module to filter only
those AP(s) which is/are part of ESS network.

Change-Id: I9536557daa624b9e44505efa0e0720e47b645517
CRs-Fixed: 3015220
2021-08-19 11:30:39 -07:00
Krishna Rao
9503c2a865 qcacmn: Rectify format specifier for qdf_size_t in MLO utility
Resolve compilation error seen on some platforms by rectifying print
format specifier for qdf_size_t to "zu" in MLO utility functions.

Change-Id: I68b0696fea1c54578631e731a3cc48ec0eb84c97
CRs-Fixed: 3017056
2021-08-19 07:07:09 -07:00
Shiva Krishna Pittala
3bde57d8de qcacmn: Add rx_ops and TGT layer APIs for MGMT Rx FW consumed event handler
When MGMT frames are consumed by the FW, FW sends MGMT Rx FW consumed event
to the Host. Add rx_ops and TGT layer functions for this event handling.

Change-Id: I50a4b02063bc545d6976944cf331982dc3e853d0
CRs-Fixed: 2959082
2021-08-19 04:59:51 -07:00
Edayilliam Jayadev
ff18a53051 qcacmn: Add API to read mgmt Rx REO snapshots
Add APIs to read management rx-reordering snapshots.

CRs-Fixed: 2955865
Change-Id: I1f36705607b0bae92d422d85223f825ed0b96ef9
2021-08-19 04:59:46 -07:00
Mohammed Ahmed
c775b5586a qcacmn: Fix incorrect layering in scan component
Replace ucfg api call with wlan api calls for internal components.

Change-Id: I0289bf44753d3692468a12fbe7109e348c8e8957
CRs-Fixed: 3011167
2021-08-19 02:14:11 -07:00
Sridhar Selvaraj
c9c8ccb8cb qcacmn: Adding multi vdev set param WMI API
Adding multi vdev set param WMI API support to send
vdev param update for multiple VAPs.

Change-Id: I6f331d4179afa2b331abef9b857365c60c0a64b3
2021-08-17 20:19:00 -07:00
Lin Bai
858a29eec9 qcacmn: Move unsafe info to regulator msg
If two channel avoid event reported by FW back to back, flag
psoc_priv_obj->ch_avoid_ind of 2nd event set by
reg_process_ch_avoid_event may be modified when processing
1st event in reg_call_chan_change_cbks, from
scheduler_thread context.

Copy chan avoid info to message post to scheduler to avoid
such timing issue.

Change-Id: I8fd5e7e8f2d9b2117a5c6a54fd8b64659e10f7d6
CRs-Fixed: 3012331
2021-08-17 18:03:27 -07:00