Commit Graph

1831 Commits

Author SHA1 Message Date
Tushnim Bhattacharyya
3f953f7193 qcacmn: Reduce log level for stats message
Reduce log level in tgt_mc_cp_stats_process_stats_event,
tgt_mc_cp_stats_update_peer_adv_stats &
tgt_mc_cp_stats_extract_peer_stats from error to debug because
a stats event can be received unsolicited.

Change-Id: I5ad216034eefd8197f80c2a50e8ae0833b149d06
CRs-Fixed: 2471465
2019-06-20 20:15:24 -07:00
gaurank kathpalia
59b6bee259 qcacmn: Allow DBS scan if enabled in ini
Currently the driver checks that DBS for connection
is allowed or not, and on that basis rejects the scan,
but it may happen that FW supports DBS, and DBS for
scan is enabled in the ini, but the DBS for connection
is disabled.
In that case the diver opts for non-dbs scan.

Fix is to allow DBS scan in case of DBS scan enabled in ini.

Change-Id: I080ba4e581a7f77e84a4364237621429bcf91710
CRs-Fixed: 2474580
2019-06-20 11:59:57 -07:00
tinlin
6aa719f513 qcacmn: Correct state in reg_populate_band_channels
Regulatory channel state is mistaken as chan_flags.
Set regulatory channel state to CHANNEL_STATE_DISABLE.

Change-Id: I72dd40bb3a7690e0156f72008ad29d209e93ce29
CRs-Fixed: 2461403
2019-06-17 13:00:57 -07:00
sheenam monga
d897403241 qcacmn: Fix null scan object dereference in ucfg
Currently, ucfg_scan_register_pno_cb and ucfg_scan_get_scan_id
do not do null validation for scan object which can lead to null
pointer dereference. wlan_psoc_get_scan_obj_fl returns null in case
of invalid component id or null psoc and that null scan object is
dereferenced due to missing null validation.

Add null pointer check for scan object in ucfg_scan_register_pno_cb
and ucfg_scan_get_scan_id. Return zero scan id from ucfg_scan_get_scan_id
in case of null scan object.

Change-Id: I1aa1bdee001cace34e22ca11014455a0c7bcc462
CRs-Fixed: 2468518
2019-06-17 13:00:51 -07:00
sandeep puligilla
370e41c760 qcacmn: Create vdev rsp wakelock api in target if
Currently, wakelock apis are in wma. Create vdev resp wakelock apis
in target_if. Plan is to remove it latter from wma.

Change-Id: Ib410ee2404751544db2f291b466ff0d6ff248e8f
CRs-Fixed: 2441245
2019-06-17 11:45:04 -07:00
Ashish Kumar Dhanotiya
034a01be32 qcacmn: Fill valid channels on oem caps user request
Currently when user request comes to populate oem
capabilities, driver is populating all the channels which
includes disabled channels also and the logic to populate
the  channels is incorrect. This is resulting in invalid
channel configuration for user space command.

To avoid above issue, use correct api which returns only valid
channels and valid number of channels and populate the channels
correctly in the output buffer.

Change-Id: Ib239d5d869ca9d010c85f444b83751d2e121625d
CRs-fixed: 2470193
2019-06-14 14:20:58 -07:00
gaurank kathpalia
543c9b4909 qcacmn: Filter the channel list according to acs cfg
Currently the driver checks whether the DFS channel is
in the range of acs channel list given, i.e the start
and end channel, which is not always correct as the channel
range does not imply that all channels in that range are present.

Fix is to explicitly check for the number of channels, and
compare each channel in the acs channel list with the DFS
channel.

Change-Id: Ib17c5e549a2c62652a6333d5d13ca8ff5a7b1674
CRs-Fixed: 2466228
2019-06-14 12:58:24 -07:00
Vivek
140070028c qcacmn: Avoid adding cmd to serialization queue if disabled
Add API to fetch the vdev queue status and avoid enqueueing command
to serialization queue if the vdev queue is found to be disabled

Change-Id: If615b07dceaeb3113592f24355f254c8e70ca8a2
CRs-Fixed: 2470208
2019-06-14 07:41:05 -07:00
Min Liu
b218312e75 qcacmn: Fix interop VHT vendor IE parse error
Currently when parsing interop VHT vendor IE, it will have OOB
read when only VHT cap IE is present.

Try to read VHT op IE only when it is present.

Change-Id: Id1919a0ed1df56ecef54d6cb663c10cbcae5065f
CRs-Fixed: 2453071
2019-06-14 01:49:57 -07:00
Akshay Kosigi
38d66845c8 qcacmn: Add change to remove CONFIG_WIN macro
Add code to remove CONFIG_WIN macro from common UMAC's
DFS module

Change-Id: Iaa1a5d17d202733003c4be943c0995795d8dc86e
CRs-Fixed: 2458658
2019-06-12 20:04:18 -07:00
Santosh Anbu
f7b253f5e2 qcacmn: Fix to release vdev reference on cmd dequeue
Add change to release vdev reference only on successful removal
of active cmd from serialization active queue.

Change-Id: I2e14f7f53dc38388cdd05f029edc9329f9dd86a7
CRs-Fixed: 2463724
2019-06-12 20:04:15 -07:00
Tushnim Bhattacharyya
21169b7e07 qcacmn: Reduce log level for stats message
Reduce log level from error to debug because a stats event can be
received unsolicited.

Change-Id: I11f3800594c6d623e72a214d832caa29666565a8
CRs-Fixed: 2466944
2019-06-11 09:51:00 -07:00
Jeevan Kukkalli
e454174cf6 qcacmn: Set osif priv to NULL when vdev comp object create fails
In the normal execution osif priv is freed when the object manager
is freed. Whenever there is a error w.r.t to creation of vdev,
osifpriv is deleted as part of vdev destroy. When this error
propagated to caller. Caller tries to again free the osif_priv
in the error path.

Hence set osif priv to NULL in error case to prevent any double
free by caller.

Change-Id: Iaa074ad39aa473e99ab2fd7b14194422f19c168d
CRs-Fixed: 2467327
2019-06-09 02:57:10 -07:00
Vignesh U
41808547d0 qcacmn: Fill the missing fields in China Radar Filter
rp_check_delta_peak and rp_sidx_spread fields of struct dfs_pulse
were missing for dfs_china_radars. Fill them with zeros and ignore
the value for China Radar Table alone.

In future, after thorough experimentation the missing fields will
be filled.

Change-Id: I7dfc3756c48269666fee3c474c9ee9a64745d0c0
CRs-Fixed: 2433582
2019-06-05 09:22:56 -07:00
Keyur Parekh
9ea9740948 qcacmn: Change print level to info
Change log level from Error to info to
avoid contineous prints on console

Change-Id: Ibe97993b2b2615b565d78874aaa0a95daec24c03
2019-06-03 19:02:51 -07:00
gaurank kathpalia
5f6876596b qcacmn: Cleanup the scan blacklist path
Currently with the support of Blacklist manager
component, all the blacklist, avoid list, RSSI-REJECT
list is maintained by the BLM, hence the filter logic
of the blacklist APs in the scan component is not
required.

Cleanup the blacklist BSSID APIs, and related functionality

Change-Id: Ic2f282d9ab7d6d30d87d9718a128cbd8446aff4c
CRs-Fixed: 2464191
2019-06-03 15:24:48 -07:00
Vignesh Mohan
5098495e56 qcacmn: Use cfreq to find if en302_502 is applicable
During radar table attach, the function to check if EN302_502
pattern is applicable requires actual center frequency of
the current operating channel as one of the inputs.
The caller of this function uses ieee80211 channel as the
argument in the function call.

Call function with actual center frequency instead of
ieee80211 channel.

Change-Id: I9e562863d73c53e4da046eede3e20d8ad9c8f98c
CRs-Fixed: 2454018
2019-06-03 15:24:45 -07:00
Vignesh Mohan
a3a42b4675 qcacmn: Reinitialise channel bitmap to 0 for every RCSA
When RCSA is enabled, if Repeater AP detects radar, the
subchannels affected by radar are sent in addtoNOL IE to the
rootAP as a bitmap. Reinitialise this bitmap for every RCSA to
avoid misinterpretation in rootAP.

Change-Id: Ie6cee841f6f05cfdfc5060afd55b83a34730f31f
CRs-Fixed: 2450786
2019-06-03 00:55:03 -07:00
gaurank kathpalia
9f525cbddc qcacmn: Add blacklist manager related files
Add interface API to send reject ap list to FW,
also add the blacklist manager UMAC, and QDF component
for the same.

Change-Id: I826e537683441762043003d71dc2b79ceebebbcb
CRs-Fixed: 2460770
2019-06-02 01:51:48 -07:00
Om Prakash Tripathi
03db80d4e7 qcacmn: Fix deadlock in wlan_pdev_chan_match due to cross locking
wlan_pdev_chan_match used to take current vdev lock on current
iterating vdev and then on vdev for which channel set is triggered.
If two cores happed to try setting channel on two different vdevs,
cross locking may occur. Fix this by releasing one lock and then
acquiring other lock.

Change-Id: Ic1a6ca448c6d535e949102bc5a8a45971c8babd2
CRs-Fixed: 2460054
2019-05-31 07:40:25 -07:00
Vignesh U
94395f626b qcacmn: Add regulatory rx_ops for setting DFS channels availability
Add regulatory rx_ops for setting DFS channels availability to be
called from Offload layer.

Change-Id: I15cec0f119baf5668052618dc3a2552470d1f14f
CRs-Fixed: 2384202
2019-05-30 19:29:42 -07:00
Abhishek Singh
6aa5f2907b qcacmn: Check for in_use flag before using the txrx desc pool
While accessing txrx desc pool, in_use flags is not used and thus
caller may end up using a txrx desc which is not in use. Also
all the params of txrx desc are not reinitialized once in_use flag
is set to false. This can lead invalid pointers used by caller.

So check for in_use flag before using the txrx desc pool, to avoid
use after in_use is set to false and reinitialized all params to
invalid values.

Also In wlan_mgmt_txrx_mgmt_frame_tx driver forcefully get the peer
ref count. It should use wlan_objmgr_peer_try_get_ref api to get
the peer ref, so that after logical delete the frames are not sent
for the peer.

Change-Id: Ie59e622c095750de8eabc49985b114ec6197be00
CRs-Fixed: 2459212
2019-05-29 11:08:15 -07:00
Nirav Shah
05e77685a6 qcacmn: Add API to check vdev is in INIT state or not
Add API to check vdev mlme state is in INIT state
or not.

Change-Id: I86a919331d674f1defd896d5b8ae93a87a0a9376
CRs-Fixed: 2459908
2019-05-28 03:46:52 -07:00
Paul Zhang
5ea0a91a89 qcacmn: Implement api for interop issues ap
Implement the interface to transfer the info between
host driver and firmware about the ap which has interop
issues with the DUT. It is detected by firmware and
forwarded to user sapce for persistent storage. User
space configs these APs to firmware when the DUT
starts up next time.

CRs-Fixed: 2425197
Change-Id: I3857d2a605baa2673af333a7a0412f1690b59769
2019-05-24 16:01:00 -07:00
Abhishek Singh
3b2666f1a5 qcacmn: Cleanup VDEV SM related flags and unused code
Legacy code for VDEV_SM is no more used, thus clean up flags
CMN_VDEV_MLME_SM_ENABLE and CMN_VDEV_MLME_CMPT_ENABLE.

Change-Id: I4f7b1099d4929f6250b1868c53b73d7c235a9c22
CRs-Fixed: 2457270
2019-05-24 06:42:20 -07:00
sheenam monga
d74e1fdc5f qcacmn: Fix bss peer use after free in stats
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.

Use wlan_objmgr_vdev_try_get_bsspeer API for stats to get the BSS
peer which increment the refcount if peer is valid. With this the
peer won't be deleted till the caller release the ref count of the
peer.

Change-Id: I3690f1309cbc7643ed55d8e903814b06f9d8755f
CRs-Fixed: 2454080
2019-05-23 09:31:06 -07:00
Aakanksha Doda
aeb2e4b2ad qcacmn: Antenna power save when 1x1 client is connected
Enable Green AP when only 1x1 clients are connected.

Change-Id: I5dd180bb56eaba337454dbe1d3a7f8135be9102f
2019-05-21 14:43:18 -07:00
sheenam monga
1273bcec05 qcacmn: Fix bss peer use after free in crypto
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.

Use wlan_objmgr_vdev_try_get_bsspeer API for crypto to get the BSS
peer which increment the refcount if peer is valid. With this the
peer won't be deleted till the caller release the ref count of the
peer.

Change-Id: I5472c80d267a6639acaff2d47dbc09e37963bc93
CRs-Fixed: 2447249
2019-05-21 13:14:32 -07:00
Abhishek Singh
0d4275671b qcacmn: If scan is for single channel don't filter the channel
Scan is rejected if single DFS channel is requested with
gEnableDFSChnlScan set to 0.

Fix is to allow single DFS channel scan and not to filter the
DFS channels.

Change-Id: Ifea85c7c85d3ace6cf08984c8c8e8ef00623303c
CRs-Fixed: 2454535
2019-05-21 13:14:29 -07:00
Akshay Kosigi
a8a1f93112 qcacmn: Add change to deinit vdev timer
Move deinit of vdev timer under CMN_VDEV_MGR_TGT_IF_ENABLE
macro

Change-Id: I1815c93f8690757d8bd3b199eb009620227ee6b1
2019-05-21 06:14:16 -07:00
Abhishek Singh
77f9ba1cc0 qcacmn: Move legacy serialization flush cmds to common api
Move legacy serialization flush cmds to common api

Change-Id: I7a1a46a615c90e112c91efc4aec1461023b6ad5c
CRs-Fixed: 2452518
2019-05-16 14:46:34 -07:00
Jianmin Zhu
787c7cdb43 qcacmn: Free serial cmd before its timer when rmmod
Rmmod process:
wlan_hdd_pld_remove --> hdd_stop_adapter --> hdd_vdev_destroy
--> WLAN_SER_CMD_DEL_STA_SESSION (25) cmd queued --> PLD_FW_DOWN
(will complete wait event as part of qdf_complete_wait_events)
--> hdd_wlan_stop_modules --> cds_disable -->
dispatcher_psoc_disable --> wlan_serialization_psoc_disable -->
wlan_serialization_timer_destroy --> umac_stop --> csr_stop -->
wlan_ser_cancel_non_scan_cmd -> check if timer is present but th
 timer are already destroyed, so assert.

Move wlan_serialization_purge_cmd_list into converged API file to
be shared by MCC and WIN.

Change-Id: Iad557e4a05d682c257be0c39049c52950e5eb530
CRs-Fixed: 2451058
2019-05-16 05:57:33 -07:00
Akshay Kosigi
4a994eff88 qcacmn: Add change to send target if response to HOST
Add code to enable sending target_if vdev response to host,
if FW fails to send response within expiry time.
Move timer free functionality to vdev destroy path so as
to make the system not to go into deadlock

Change-Id: I72bdecf2502a755ffc09414f8b72d230bf9c559f
Crs-Fixed: 2449238
2019-05-14 23:57:56 -07:00
Arun Kumar Khandavalli
52ac4710fa qcacmn: Move osif priv deallocation to vdev destroy
osif priv is allocated as part of the vdev object and freed as part of
the logical vdev deletion. There is a race condition where in a
component
holding the reference to the vdev is trying to do an operation using
the osif priv. But in the other thread osif priv can be freed.
This can lead to null pointer exception.

Hence, move the osif priv deletion to the vdev physical destroy.
Change-Id: Iea3fd87cb272a51c5691ee2e39a590861c1b1637
CRs-Fixed: 2449996
2019-05-14 13:03:20 -07:00
bings
47c737dba8 qcacmn: Add ini to honour NL80211 scan policy flags
Currently dwell time is determined by scan policy flags from kernel.
Sometimes when we suspect the scan result is not full enough, we need
to set dwell time by force through ini.

Add ini to decide whether to honour NL80211 scan policy flags, so that
we can disable dwell time changed by scan policy flag from kernel.

Change-Id: Ia0b9f957a7de901513479522e008e4bcbd6b2c0e
CRs-Fixed: 2428630
2019-05-13 14:41:41 -07:00
phadiman
b68fa39efd qcacmn: Add DFS Radar Event Notifications
Add event notifications to userspace
    1. Radar Detect
    2. CAC Start
    3. CAC Complete
    4. NOL Start
    5. NOL Complete

CRs-Fixed: 2448199
Change-Id: I5deaa53c922fe4e149e7198b287e31d3876d49d4
2019-05-13 13:11:38 -07:00
Santosh Anbu
261451a46c qcacmn: Add API to fetch logically deleted peer list of a vdev
Add API to fetch the logically deleted peer list for a given vdev
and also add change to move peer delete request and response
related stats from pdev to vdev layer

Change-Id: Ibaac286a1e6ca86988b223055c15a6b9ba6cf4b9
CRs-Fixed: 2448111
2019-05-13 03:31:44 -07:00
Srinivas Pitla
011b676abe qcacmn: On CSA complete, MLME can choose to disconnect peers
CSA on DFS channels requires CAC period after RESTART response, stations
can leave during CAC period, but AP would not receive, as it moves to new
channel. Here, MLME can choose to disconnect peers.

This change moves VDEV SM to SUSPEND_RESTART substate from CSA_RESTART
if MLME chooses to disconnect peers.

Change-Id: If4a57545007bbfd0dbc8e5cc498e2741283bcfcc
CRs-Fixed: 2446744
2019-05-10 16:28:48 -07:00
Gurumoorthi Gnanasambandhan
d9ee8fd96b qcacmn: Add option to set high priority scan
For enhanced  repeater independent mode scan request
from wpa_supplicant needs to be set in high priority scan.

Change-Id: I4f95d0e7b2f1d9eb68ed14efd4ee3932ced5af61
CRs-Fixed: 2432916
2019-05-10 16:28:44 -07:00
gaurank kathpalia
c2dac1c92b qcacmn: Add filter logic according to timestamp in scan
Currently the driver does not have any mechanism to filter
out the scan results according to the age.

Add a logic in the scan filter API, to filter out the scan
result according to the age threshold, so that APs which
are older than a particular value are filtered out.

Change-Id: If3f4b372b28a0f75b1d70915df4e3e1a7e518931
CRs-Fixed: 2447988
2019-05-09 04:59:10 -07:00
Vivek
16ad475315 qcacmn: Return on failure of releasing reference of object
The release ref APIs for an object first checks,
if the caller is holding a ref, and if yes, it decrements
the count.

If not, there is an error print and an assert, and if the assert is
disabled, the total ref count is decremented in the code, which could
lead to the object getting destoyed, even when it is being used or
some other component holding its ref.

So, if release ref API for an object is called by a component, which
is not holding the ref, we should return, so its handled correctly
even when assert is disabled.

Change-Id: I90de5c1b2e485e80c4b3138fc0fd99f5509d06a2
CRs-Fixed: 2417616
2019-05-08 04:47:19 -07:00
Visudha Sathurappan
fbd467f5a6 qcacmn: Fix compilation errors when ATH_SUPPORT_DFS is disabled
Fix compilation errors when disabling ATH_SUPPORT_DFS

Change-Id: I229ae5086070badec899b5b95be3ce389a3247ba
2019-05-08 02:51:43 -07:00
Ashish Kumar Dhanotiya
788ab15578 qcacmn: Move peer_extd_stats to peer_mc_cp_stats structure
Currently peer_extd_stats is present in peer_cp_stats structure
which is shared between WIN and MCL and only common features
should be part of this structure as peer_cp_stats is an
abstraction structure for WIN and MCL for cp stats component.
Since peer_extd_stats is MCL specific structure, this should be
moved to peer_mc_cp_stats which is MCL specific feature for
cp stats component.

Change-Id: I18c30db36d34dd3fb3e4f8ad2d3c553c4648548b
CRs-fixed: 2427126
2019-05-06 00:57:57 -07:00
Pragaspathi Thilagaraj
45a8c1e41f qcacmn: Support adaptive 11R BSS in scan
Adaptive 11r is a feature by which the network supports 11r
even though the bss doesn't advertise 11r. This is done with the
help of advertising vendor specific adaptive 11r IE and MD IE
in the beacon/probe. When vendor specific adaptive 11r
IE (oui 0x00 40 96 type 0x2C) is present in the beacon/probe,
and 1st bit of the IE data is  set to 1, then the BSS supports
adaptive 11r.

The BSS advertises, non-11r akm in RSN IE and user space will
send the 11r akm in the connect start. So the scan module
shouldn't filter out the candidate adaptive 11r supported BSS
with AKM mismatch reason.

Add changes in scan module to parse the Vendor specific adaptive
11r IE and copy it to the scan_entry ie_list. Check if
negotiated akm is non-11r akm, and the filter akm sent from csr
is a 11r akm (which is received from user space), then mark the
bss as matching.

Change-Id: I65f32c67016ad634f1592a7453e77aaf0c5a327c
CRs-Fixed: 2431074
2019-05-02 08:16:11 -07:00
Abhishek Singh
7528ff39ce qcacmn: Add API to get and increment ref count of valid bss peer
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.

Thus add an API to get the BSS peer and increment the refcount if
peer is valid. With this the peer won't be deleted till the caller
release the ref count of the peer.

Change-Id: Ifb3b4de54f3aace359a35a821265c80119df1f50
CRs-Fixed: 2444996
2019-05-01 12:27:09 -07:00
Surya Prakash Raajen
e1a6388dd7 qcacmn: Increase max peer numbers to support 512 client per radio
Currently 1024+ is the number of peers, increase it to be 1536+,
(512*3) as the three radio soc supports 512 clients per radio.

Change-Id: I5f1d69206c536bb706825fbd70736dce21b64161
CRs-Fixed: 2436434
2019-04-29 08:03:05 -07:00
Rajeev Kumar
0b1c7569cb qcacmn: Add dummy implementation of CP stats PMO handler
Add dummy implementation of CP stats PMO handler in case
QCA_SUPPORT_CP_STATS is not defined.

Change-Id: Ibe6fe863b0aa31bfda4431887a4f9dae5e74ae69
CRs-Fixed: 2439858
2019-04-29 04:17:51 -07:00
Bala Venkatesh
2864718af8 qcacmn: Update comments in scm_req_update_concurrency_params
Update the commment sections in function
scm_req_update_concurrency_params and
wlan_util_get_mode_specific_peer_count.

Change-Id: I076beddacb6efa10f78a1d850f9b74886e9cdcdc
CRs-Fixed: 2439552
2019-04-29 01:44:40 -07:00
Abhiram Jogadenu
f404593b7c qcacmn: Increase response timer timeouts
Increase response timer timeout for Vdev delete response and
Vdev stop response as these take longer when KASAN is enabled.
Value is being increased from 2 secs to 3 secs after it passed
wifi up/down, load/unload for a period of ~10hrs.

Change-Id: I1884370bbc214683a238d0028c4fc26bba6c2ccb
CRs-Fixed: 2441815
2019-04-27 04:22:32 -07:00
gaurank kathpalia
5ba222aea6 qcacmn: Modify scan type for RRM scan request
Currently in the case of concurrent sessions running,
the driver updates the active dwell time for the scan
request to the default value, overwriting the already
filled active dwell time which the DUT got from the
AP as part of RRM request, which results in violation
of protocol.

Fix is to not update the concurrency params if the scan
request is of type RRM.

Change-Id: Ifbb4b45fc111851f544fd39187e4113bda5f7348
CRs-Fixed: 2436893
2019-04-27 01:01:53 -07:00