Commit Graph

1831 Commits

Author SHA1 Message Date
Vivek
f011832a65 qcacmn: Update blocking command flags atomically
When moving a blocking command from pending to active queue,
we release the lock and call the activation cb.
After the activation cb returns, we update the blocking cmd
waiting flag based on the active cmd node's "is_blocking" param.

If the activation cb is also resulting in removing the command,
then after the cb returns, the active cmd node is returned to the
free pool and our check fails, and we miss to update the blocking
cmd waiting flag, resulting in no further commands moving to the
active queue.

The update to the blocking command should be done atomically,
immediately after it moves to active queue and before releasing
the lock for the activation callback.

Change-Id: Idedccb16ce68bb2166fb3970cd231fe738ec6af2
CRs-Fixed: 2554767
2019-11-19 13:05:08 -08:00
Ashish Kumar Dhanotiya
b5cc4988ce qcacmn: Update regdb based on database version 30
Update regdb with QCA regulatory database version 30 with following
changes:

1. Change APL11 and APL19 RD defs to FCC Radar Patterns.
2. Change 2g reg domain for Argentina to ETSIC
3. Change 5g reg domain for Argentina to APL16 for WIN and
APL17 for MCL and DSRC.
4. Change 2g reg domain for Indonesia to ETSID
5. Change APL2 power to 20.
6. Change Radar detection pattern for APL11 to FCC
7. Change CTL for APL14 to MKK
8. Change Radar detection pattern for APL19 to FCC
9. Add new reg domain APL24
10. Change ETSID power to 20.
11. Add full reg domain APL2_ETSID
12. Add full reg domain APL16_ETSIC
13. Add full reg domain APL17_ETSIC
14. Add full reg domain APL24_ETSIC

Change-Id: I8ce9696caefee89a9ab5606667c1619634e248c5
CRs-Fixed: 2548580
2019-11-18 16:05:37 -08:00
Gurumoorthi Gnanasambandhan
f336902021 qcacmn: Rewrite util_gen_new_bssid functionality
qdf_do_div is not helping  for modulo operation and always returns 0 in
32 bit image resulting in same base BSSID is always returned for all
the VAP's.With 64 bit image no issues are seen.

Change-Id: I50e500f57713ce080447b9a5cb1e615018222adb
CRs-Fixed: 2565183
2019-11-18 14:09:18 -08:00
Jianmin Zhu
69560e37c6 qcacmn: Replace chan list with freq list in struct scan_filter
To support 6G, replace chan id with frequency.
Replace channel_list and pcl_channel_list with
chan_freq_list and pcl_freq_list in struct scan_filter.
Change API scm_get_pcl_weight_of_channel to use freq.

Change-Id: I6e880986fb2dcb1fa7aa4f40d2e3f849e7e3af64
CRs-Fixed: 2561234
2019-11-18 10:33:09 -08:00
Jianmin Zhu
52a2b33099 qcacmn: Set priority for connection with bssid_hint
There is ini to enable the feature: Set highest priority to BSS
for connection which comes as bssid_hint from wpa supplicant,
but it is broken.

Change-Id: I795341bd13f59caafaaadf7086f5efc3d47f913c
CRs-Fixed: 2565161
2019-11-15 23:51:11 -08:00
Arun Kumar Khandavalli
5377f457a1 qcacmn: Introduce new api to disable the vdev serialization queue
MCL presently sends the vdev delete to firmware via serialization,
with a new requirement vdev delete cannot be sent via serialization.
So, disable the serialization for the vdev before sending the vdev
delete to firmware.

Change-Id: Ieffccaf815eff7627d39b0191a7be121e85965fd
CRs-Fixed: 2566113
2019-11-15 16:01:32 -08:00
sumedh baikady
a95ba1312a qcacmn: Add Wmi for FW dynamic control of Muedca param
Add WMI changes for the API he_muedca_mode
to swicth between manual, host and FW dynamic
muedca param selection.

Change-Id: If43b5da483fe082294bda33f8951187ebc7ea3c7
CRs-Fixed: 2554378
2019-11-14 07:47:46 -08:00
Hariharan Basuthkar
853a2cda71 qcacmn: Add an API wlan_reg_chan_opclass_to_freq
Add an API wlan_reg_chan_opclass_to_freq, that takes IEEE Channel
number and opclass as input and gives the channel center frequency
as output.

Change-Id: I09733d9dc27beb8f16037aa8653acededf32b715
CRs-Fixed: 2555042
2019-11-12 10:37:50 -08:00
Himanshu Batra
c3517bbdab qcacmn: Move mlme private APIs to mlme core
Move APIs private to mlme component to mlme core directories

Change-Id: If682933d542cb583feea680656b87524dd28ed1a
CRs-Fixed: 2549547
2019-11-11 13:42:01 -08:00
Vignesh U
4cd49ad814 qcacmn: Intermittent regulatory update for Japan in Win&computing
As a part of the intermittent regulatory update, implement the following
changes,
- The country Japan should map to MKK17_MKKC regulatory domain.
- For regulatory domain MKK17_MKKC, channel 144 should be disabled by
default.

Change-Id: Ic920456fa885d9ed2b8d0419c6a261707eb10b4d
CRs-Fixed: 2560339
2019-11-11 12:10:32 -08:00
Hariharan Basuthkar
b19418e3eb qcacmn: Rectify input given to wlan_reg_get_band_channel_list
In function scm_update_6ghz_channel_list, while calling function
wlan_reg_get_band_channel_list change the second argument to BIT of enum,
instead of the enum itself.

Change-Id: I61dc0bf1e52e458cd26bcb278d88f687f92130e9
CRs-Fixed: 2559519
2019-11-10 06:37:45 -08:00
Amar Singhal
5fbd62d6e3 qcacmn: Add 6ghz support functions
Add API to know whether 6ghz is supported. Also add API to know
whether an operating class is 6ghz operating class.

Change-Id: I75747502c0033e31d119e58a2254b220646bba10
CRs-Fixed: 2556998
2019-11-09 22:08:12 -08:00
Amar Singhal
499d20b63b qcacmn: Re-implement IEEE80211 operating classes
Add starting frequency to each operating class. Further add behavior
limit to each operating class, if any. Behaviour limit is used for
80p80, 40 mhz low primary, etc operating class identification. Also
add 6-ghz operating classes 131-135 to the global operating class.
Also add APIs that are based on frequency instead of channel number.

Change-Id: Ic8756aada6c31ed2164f767ff1ae584b8bf055d2
CRs-Fixed: 2533419
2019-11-09 22:08:08 -08:00
Amar Singhal
cfec8138ad qcacmn: Check 4.9 GHz channel correctly
4.9 GHz channels cannot be checked using channel number since channel
number can conflict with 2.4 GHz and 6 Ghz channels. So use frequency to
check if channel is 4.9 Ghz.

Change-Id: Ie201d2722edbc7f20ee4faa115910d92afaa3414
CRs-Fixed: 2552810
2019-11-09 22:08:03 -08:00
Amar Singhal
ddcd9fbf2e qcacmn: Initialize channel_map at time of regulatory init
A component can register callback with regulatory component before channel
list is available.Therefore initialize channel map at time of regulatory
init. Also, call callback when pdev current channel list
is computed, at time of nol channel update.

Change-Id: I551e0ea3391710538f694c50fa7dc6f795f3196c
CRs-Fixed: 2555403
2019-11-09 22:07:59 -08:00
Sandeep Puligilla
7345e2dd03 qcacmn: Add SCAN 6GHz extension flags
Add 6Ghz scan extension flags to control the
scan on 6Ghz frequency.

Change-Id: I5d7068d0fa4daf68b5373d47143454a7bf540155
CRs-Fixed: 2560593
2019-11-09 19:10:42 -08:00
Sandeep Puligilla
b4b955e93c qcacmn: Add support for 6g scan hint
Add support for 6Ghz short ssid and bssid hint mechanism
as part of scan command.

Change-Id: I53a787d2a1406ffd658dc0765bae1e632b870b36
CRs-Fixed: 2559877
2019-11-09 19:10:34 -08:00
Sandeep Puligilla
aba2b0c42b qcacmn: RNR IE parsing support
Add RNR IE parsing support on scan module.

Change-Id: I7a0685f16a61a45910212b2d8fe5cbc12b5bd92e
CRs-Fixed: 2557271
2019-11-09 19:10:25 -08:00
Abhishek Singh
3c5f8ef089 qcacmn: Fill cfreq0 and cfreq1 in scan entry from HT/VHT/HE IEs
Secondary channels cfreq0 and cfreq1 are not filled in scan entry,
So fill secondary cfreq0 and cfreq1 in scan entry from HT/VHT/HE IEs.

Change-Id: I09ee15a27debe554d8ddbac8e8b3c0315aec2c1a
CRs-Fixed: 2560273
2019-11-08 00:11:11 -08:00
Arun Kumar Khandavalli
95b3c1a9a2 qcacmn: Avoid possible use-after-free in wlan_objmgr_vdev_obj_create
There is use-after-free of vdev object in wlan_objmgr_vdev_obj_create
wherein vdevid is being accessed to log the create failure after the
vdev is freed.

To resolve the issue, Log the error with vdev_id before freeing the
vdev

Change-Id: Ia509f90cd2219f657ecdecbfb26d397daa3beda6
CRs-Fixed: 2559556
2019-11-07 16:48:14 -08:00
Hariharan Basuthkar
6f59c89126 qcacmn: Fix channel conversion APIs in the regulatory component
Update the APIs mentioned below, to handle invalid channel number and
freq value of less than or equal to 0:

1) wlan_reg_chan_band_to_freq
2) wlan_reg_freq_to_chan
3) wlan_reg_chan_to_freq
4) wlan_reg_legacy_chan_to_freq

Change-Id: I122658c974c550ff16bcfe1b664799a609c7ffcf
CRs-Fixed: 2550286
2019-11-07 05:21:36 -08:00
Vignesh U
5ad018742a qcacmn: Filter the single channel scan request if the channel is NOL
A single channel scan request is not validated for NOL and scan start
request is sent directly. This leads to scan violation.

Reject the single channel scan request, if the channel is in NOL by
proceeding to validate the channel before sending scan start.

Change-Id: I128b1bea8de534f08e9d93cb154c2ba5adeba452
CRs-Fixed: 2546693
2019-11-07 03:55:59 -08:00
Sourav Mohapatra
d5dde1b9ae qcacmn: Increase timeout to avoid false assert
Currently, the timeout value LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC is
set at 24 seconds. This is not sufficient for various cases where the
delay caused are genuine (FW and HW delays), thus leading to unwarranted
device assert.

Increase the timeout to 32 seconds to mitigate this.

Change-Id: I799b45b0d5f25a9fcf68f88d385994e31c56e939
CRs-Fixed: 2546641
2019-11-07 01:18:49 -08:00
Rachit Kankane
215263ece0 qcacmn: Update Beacon template
On detecting RADAR, if SAP / Auto GO is operating on DFS channel,
host driver updates Beacon / Probe response template with CSA /
ECSA IE to firmware.

Once the count in CSA IE is reached to 0, host should remove these
IEs from both Beacon / Probe response template and send it to FW.

But with INI gDisableDFSChSwitch=1 (test only), After detecting
RADAR, host driver updates the Beacon and Probe response template
with (E)CSA IEs but doesn't remove these after count reaches to 0.
Updated the code to remove these IEs when INI gDisableDFSChSwitch
is set.

Change-Id: Ie01c80a57191a78d71a8a27f1bead533388a4580
CRs-Fixed: 2555696
2019-11-06 21:36:18 -08:00
bings
5a40049a64 qcacmn: Disable dfs phyerr offload when no sap/go in DFS channel
As FW requires, send WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID when there
is no beaconing session in DFS channel for FW which supports dfs offload.

Change-Id: I73b86328be6eb132de70bd10406495fbaefcab67
CRs-Fixed: 2554083
2019-11-06 14:06:50 -08:00
Vignesh Mohan
42bc1a9d68 qcacmn: Reset dfs_precac_active flag only for the calling pdev
When tgt_dfs_set_precac_state API is called, the dfs_precac_active
boolean is set to false for all pdevs. This results in preCAC
being stopped for all pdevs in DBS_SBS mode when one of the
pdev becomes inactive.

Reset dfs_precac_active flag only for the calling pdev and
set the global boolean 'precac_state_started' to false only
if all the individual pdev flags are inactive.

Change-Id: I73fcacb911a5eb9028b03aa1c86775a66f2a7fc9
CRs-Fixed: 2556734
2019-11-05 17:48:32 -08:00
Subrat Mishra
76b7920e40 qcacmn: Fix memory leak in 6GHz channel update
Fix memory leak in 6GHz channel list update for scan manager.

In scm_update_6ghz_channel_list function dynamic memory allocation
for local variable was not freed. This was cusing memory leak during
module unload.

CRs-Fixed: 2558436
Change-Id: I9535a3621e0fc5916cdf39934fec7c51c1b8e32b
2019-11-05 11:04:16 -08:00
Abhishek Ambure
986f5c97b9 qcacmn: Get phymode from HE phy capability
WLAN phy mode is calculated from HE capability.

Change-Id: I217cf6609f526a761c183395fe67f67adc95c4af
CRs-Fixed: 2550362
2019-11-05 09:27:42 -08:00
Rajeev Kumar Sirasanagandla
89cefa812d qcacmn: For p2p scan skip DFS channels only
In the current implementation, when ini gSkipDfsChannelInP2pSearch
is set then DFS channels are skipped for p2p scan but side-effect is
passive and indoor channels are also skipped. This is because api
wlan_reg_is_dfs_ch() returns true for passive, indoor and DFS channels.

To fix this, use api wlan_reg_chan_has_dfs_attribute() instead of
wlan_reg_is_dfs_ch() for explicitly getting DFS (radar) channels only.

Change-Id: I7aa50991753e057f72ed945e90647123ae51ed87
CRs-Fixed: 2545583
2019-11-05 04:18:01 -08:00
Ashish Kumar Dhanotiya
84ac2013af qcacmn: Add queue.h file
Currently MCL and WIN both have there separate queue.h
files with the same declarations and definitions.
As part of cleanup create single queue.h in common
code and update the usage of existing queue.h to this
newly added queue.h.

Change-Id: Ie381c3553d6361cf7f8c97f14a91ed24e332b51a
CRs-fixed: 2505617
2019-11-05 02:12:54 -08:00
bings
f2f11dbf06 qcacmn: Add REG_BAND_MASK_ALL
Define a bandmask for all the modes

Change-Id: I8ad6fc2676c2306043aa9415eefb2b89d8c49a4d
CRs-Fixed: 2555045
2019-11-05 02:12:49 -08:00
Sandeep Puligilla
377595c534 qcacmn: Default value for 6G scan mode
6G Scan mode for AP platform is different
from non-ap paltform so modified default values
accordingly.

Change-Id: Ifdea76b449998ffa5e33ffedd30564bd8eda8d6a
CRs-Fixed: 2555441
2019-11-02 12:26:04 -07:00
Priyadarshnee S
54e3ffe37f qcacmn: Implement a dispatcher API to retrieve precac chan state
Implement a frequency API based dispatcher function to retrieve
the precac channel state of a given channel frequency.

Change-Id: Iefd70c8b6e60a42f8dc95db5f8a2e8c66ae013ea
CRs-Fixed: 2526372
2019-11-01 16:59:56 -07:00
gaurank kathpalia
d68b2f4f19 qcacmn: Use freq instead of channel number to avoid collision
To avoid IEEE channel number space collision,
use freq in structure dfs_acs_info.

Change-Id: I48813d12819f03495f196e634e9fcb422105f304
CRs-Fixed: 2555897
2019-11-01 08:17:46 -07:00
Priyadarshnee S
6e08d66883 qcacmn: Register DFS callbacks
To avoid "channel number" collision that was introduced after
6Ghz band was added to the driver, frequency based DFS callbacks are
registered with dfs_to_mlme structure.

Change-Id: Id937059329e4df25a49397c1c01251f81afc1fe6
CRs-Fixed: 2526372
2019-10-31 02:44:59 -07:00
Wu Gao
b7d36fd258 qcacmn: Fix compilation issue in dfs
There is no defined variable "dfs_nol_channel" in function
"dfs_mark_leaking_chan_for_freq".

Change-Id: I4258a9d322bfd98dc644678d48ba3146f966b367
CRs-Fixed: 2554628
2019-10-30 16:51:36 -07:00
Priyadarshnee S
6ddbcf0add qcacmn: Invoke DFS frequency APIS from vdev_mgr_start_param_update()
To avoid "channel number" collision that was introduced after
6Ghz band was added to the driver, frequency based DFS APIs are invoked
from vdev_mgr_start_param_update().

CRs-Fixed: 2532623
Change-Id: I35d262d10d00df124116a617de4575d00c35cffb
2019-10-30 16:51:27 -07:00
Sandeep Puligilla
5939199242 qcacmn: Add 6Ghz scan mode CFG item
Add 6ghz scan Mode CFG item and funcitonality
0 - Remove 6GHz channels in the scan request
1 - Allow/Add 6Ghz PSC channels to scan request
2 - Allow/Add all the 6Ghz channels

Change-Id: I2f07c30e599ace4592ae02a88d86876725abbb5f
CRs-Fixed: 2517277
2019-10-29 06:56:10 -07:00
Hariharan Basuthkar
3d4c345f51 qcacmn: Introduce reg_err_rl to avoid print flood
Print floods are observed in the APIs below:

1) reg_get_curr_regdomain
2) reg_is_etsi13_regdmn
3) reg_freq_to_chan

Add a new macro reg_err_rl and assign QDF_TRACE_ERROR_RL. Use reg_err_rl
instead of reg_err, to avoid print flood.

Change-Id: I5c1da71febd61449bfbff508797c60bb88849122
CRs-Fixed: 2552008
2019-10-28 23:36:57 -07:00
Santosh Anbu
0fdaae998a qcacmn: Handle start event failure
When the start continue callback fails due to any of the error
scenarios such as unable to find the channel, then the vdev SM
is stuck in the connection progress state leading to timeout
at the OSIF.

Graciously handle the start event failure by posting a connection
fail event back to vdev SM.

Change-Id: I0e4a3cf95529a09c88bc7fd4069aec99d4b9d78d
CRs-Fixed: 2552168
2019-10-28 23:36:50 -07:00
Tushnim Bhattacharyya
23990a2d01 qcacmn: Replace channel with frequency in struct unsafe_ch_list
Replace channel ID with frequency in struct unsafe_ch_list.

Change-Id: I0a9426f985edb65387f2613519b487d701cf344d
CRs-Fixed: 2540583
2019-10-28 18:03:02 -07:00
Wu Gao
5988e8b7d2 qcacmn: Remove unnecessary logs in loop
There is unnecessary logs in loop which affect useful log capturing.

Change-Id: I37b2c8123a280e4ec080ac1fb75e43135936fd79
CRs-Fixed: 2552104
2019-10-27 19:27:56 -07:00
Priyadarshnee S
be7b7b2562 qcacmn: Add frequency APIS in UMAC Dispatcher
To avoid "channel number" collision that was introduced after 6Ghz band was
added to the driver, add frequency based APIs to Global UMAC dfs
dispatcher.

CRS-Fixed: 2526372
Change-Id: Ice72aae699f609f9dadd0717852fa848cb392629
2019-10-27 15:19:21 -07:00
Priyadarshnee S
38da66f0dc qcacmn: Add frequency APIS in DFS Core, TGT DFS and DFS Utils
To avoid "channel number" collision with the introduction of
6GHZ frequency band, add frequency-based APIs to DFS Core.
Also, do not remove the old IEEE channel-number-based APIs that are still
referenced.

The DFS APIs of Target-IF layer and DFS UTILS in DFS dispatcher layer are
included as a part of this change as they invoke DFS Core APIs and are
dependent.

CRs-Fixed: 2526372
Change-Id: I7a00ca5796e9c81527438c326c2d41de1147ffee
2019-10-27 15:19:17 -07:00
Ashish Kumar Dhanotiya
758e340721 qcacmn: Move wow wakeup stats from vdev to psoc level stats
Currently wow wake up stats are maintained on vdev level,
since wow wake up stats are system level stats, stats on
the vdev gets reset on vdev destroy.
To resolve above issue store wow wake up stats to psoc level
stats so that stats are present even after vdev start.

Change-Id: I74aea1baa1d9168de3cb9142a24e73654910a48d
CRs-fixed: 2541661
2019-10-26 13:23:25 -07:00
Arun Kumar Khandavalli
d76b54a1c5 qcacmn: Move psoc object to common component
Presently PSOC object is initialized differently between
WIN/MCL. With this implementation the psoc creation and
destroy will be moved to common code.

Change-Id: I7aa8f47f3fe1d88c6c37ab3184a81fbc7dedb789
CRs-Fixed: 2547533
2019-10-26 11:55:31 -07:00
Shashikala Prabhu
a477ec2257 qcacmn: Add API to get SNR value from scan entry
Add snr and avg_snr variables to scan entry and populate these variables
while generating the scan entry.
Add API to read avg_snr value from the scan entry.

Change-Id: Ie19d5ad7c8debb35e9d278ec648bd6217b2f4099
CRs-Fixed: 2532369
2019-10-26 11:55:27 -07:00
Jingxiang Ge
0303830a0f qcacmn: Add 11ax tx_rate_info info
Add 20/40/80 11ax tx_rate_info info which will be
used for 11ax linkspeed display.

Change-Id: Idfc4c7bd4c4775fd258fb088285b9cee240f8e3a
CRs-Fixed: 2548462
2019-10-26 08:12:04 -07:00
Gurumoorthi Gnanasambandhan
f069fccaa6 qcacmn: Rewrite util_gen_new_bssid functionality
__aeabi_uldivmod  error is seen in 32 bit WIN platform.
Rewrite the function to avoid the insmode error.

Change-Id: I93e00222514f2969ac49a3c530c5436a5a542a25
2019-10-25 04:41:30 -07:00
Pavankumar Nandeshwar
0336eb937e qcacmn: Add an API to get peer using mac from vdev
Add an API that iterates through the peer_list of a vdev
and gets peer using peer mac address.

Change-Id: I9b7edd3816a51ee89d68be4cc876155fa1a79049
2019-10-24 21:42:07 -07:00