Commit Graph

1456 Commits

Author SHA1 Message Date
gaurank kathpalia
835437cad6 qcacld-3.0: Add legacy pointer in connection manager context
Add legacy pointer in connection manager context to use for RSO
and other connection manager legacy operations.

Change-Id: Ibc665f53d77aebb3f248fedbdffd1cfe86492b25
CRs-Fixed: 2845980
2021-01-07 23:28:49 -08:00
gaurank kathpalia
6b72d4685b qcacld-3.0: Replace CSR API with connection mgr API part 2
Replace the CSR API to get connect info with cnx mgr API.

Change-Id: Id0ffae005fde5bff69fc486c94c3332872bab786
CRs-Fixed: 2848570
2021-01-07 23:28:45 -08:00
Arun Kumar Khandavalli
9363ae40ff qcacld-3.0: Release the vdev reference in pmo
In pmo_core_configure_dynamic_wake_events vdev reference is acquired
and its not released leading to the reference leak, leading to
vdev destroy timeout.

Release the vdev reference to resolve the issue.

Change-Id: Idd3bcb366f211e037ede278c91d6bcefd4165651
CRs-Fixed: 2850076
2021-01-07 19:11:17 -08:00
Vulupala Shashank Reddy
ad8440c1e5 qcacld-3.0: Process Rx data packet for pkt capture mode
Subscribe for Tx data wdi event and process Rx data packets
and post into mon thread for packet capture mode

Change-Id: I1a2930110bebc152db32cb2c1f1bc1120fc29755
CRs-Fixed: 2845597
2021-01-07 16:48:39 -08:00
Vulupala Shashank Reddy
00617e827b qcacld-3.0: Process Tx data packet for pkt capture mode
Subscribe for Tx data wdi event and process Tx data packets
and post into mon thread for packet capture mode

Change-Id: Id4c231ce8f32c45f579289b37cb810581c6ab31b
CRs-Fixed: 2845593
2021-01-07 16:48:34 -08:00
Bapiraju Alla
3e83a3e527 qcacld-3.0: Add an INI param to configure HW assist feature in FW
HW assist is a FW feature and it is enabled by default. But there is
no provision to disable/enable this feature based on requirement.

To address this, add INI param to enable/disable HW assist feature
in FW.

Change-Id: Icdc4a842be4d5c6991a785ee270f61ba87fcfe79
CRs-Fixed: 2841346
2021-01-07 12:30:54 -08:00
Abhishek Singh
d3cbcc0d30 qcacld-3.0: Remove duplicate struct struct wlan_ies
Remove duplicate struct struct wlan_ies and replace with
struct element_info.

Change-Id: I60d34db5845d840679052912182ea09b86988e43
CRs-Fixed: 2848237
2021-01-06 09:11:53 -08:00
gaurank kathpalia
deceac79c3 qcacld-3.0: Replace the CSR API with connection mgr API
Replace the CSR API to get connect info with cnx mgr API.

Change-Id: Ia037016a6eab0fd4ebec6cbbb991ff255b43bb2d
CRs-Fixed: 2847585
2021-01-05 05:01:53 -08:00
Vevek Venkatesan
6cc1576cf0 qcacld-3.0: add sync between suspend and wow resume in runtime pm
In moselle, once wow enabled there is a possibility that wow wake
interrupt can be fired from FW during runtime suspend in progress
in host, this will introduce a race between runtime suspend and
resume, so adding a synchronization between runtime suspend and
wow triggered runtime resume.

Change-Id: I19a4d70f47d5c202d0ba291c3edc8a260690f434
CRs-Fixed: 2845670
2021-01-04 05:08:36 -08:00
sheenam monga
bf3630cf7e qcacld-3.0: Enable periodic time sync between host and fw
Enable periodic time sync between host and fw by setting
gRemoveTimeStampSyncCmd to 0.

Change-Id: I52168ad6d065262c433c801716eec0d7782bf6e8
CRs-Fixed: 2845017
2021-01-03 23:49:35 -08:00
sheenam monga
03d4f89464 qcacld-3.0: Use function qdf_snprint for time stamp conversion
Currently for converting timestamp to string qdf_snprintf
function is used which may not print timestamp correctly.

Use qdf_snprint instead of qdf_snprintf to print correct
timestamp provided by fw.

Change-Id: I803f678dc38afc03131e589a820d129dc38380ce
CRs-Fixed: 2835199
2021-01-03 23:49:30 -08:00
Min Liu
45e0741472 qcacld-3.0: Fix iwpriv command getMaxAssoc
Fix the issue that iwpriv command getMaxAssoc act as setMaxAssoc.

Change-Id: I8fddc0ff724147cb55d53b0ce5a918745b3101d3
CRs-Fixed: 2844640
2021-01-03 21:34:48 -08:00
gaurank kathpalia
dc7cca8a80 qcacld-3.0: Add connection manager Logic for connect resp from LIM
Add connection manager Logic for connect resp from LIM.

Change-Id: Ifea77cd839d5f21f50b03f833fd0daa8a1cd8bdd
CRs-Fixed: 2846957
2020-12-31 20:53:04 -08:00
Ashish Kumar Dhanotiya
f90d452bdb qcacld-3.0: Update qos parameters for connection manager
Currently driver does not update qos related parameters for
connection manager connect complete path, add logic to
update qos related parameters for connection manager connect
complete path.

Change-Id: If7d67448710a8f950d5c78ca961cab7884f58d61
CRs-Fixed: 2846591
2020-12-31 00:50:27 -08:00
Ashish Kumar Dhanotiya
68b0198490 qcacld-3.0: Add functions for assoc completion for connection manager
There are few functions which were missing for association completion
for connection manager functionality, add those missing functions
for association completion handler.

Change-Id: Iaca6599921fa73972553a8bd805b2f39ad580407
CRs-Fixed: 2846083
2020-12-30 16:51:08 -08:00
Abhishek Ambure
aa2bfeb4f7 qcacld-3.0: Handle disconnect rsp via connection mgr
Host add support to handle disconnect response via connection
manager.

Change-Id: I444dc93b0e089b3694bb041a671ec788910d5bcf
CRs-Fixed: 2846115
2020-12-30 11:24:39 -08:00
gaurank kathpalia
f8a769a7b6 qcacld-3.0: Add cnx mgr logic for connect and disconnect ext ind
Add connection manager logic to handle p2p/tdls/policy mgr logics
on connect/disconnect start and complete ext indication. And
add the call to csr to update the legacy structs.

Change-Id: I218a1d193dd62ad041e84078bd2509b82ec11363
CRs-Fixed: 2846663
2020-12-30 11:24:34 -08:00
gaurank kathpalia
af3603f2dc qcacld-3.0: Use the connection manager API to initiate disconnect
Use connection manager API to initiate disconnect from HDD and CSR.

Change-Id: I04c3b0c3cc65d1f21ac3a5047be448c305a2ca6b
CRs-Fixed: 2846108
2020-12-30 05:01:32 -08:00
Ashish Kumar Dhanotiya
ee71cc8bd4 qcacld-3.0: Refactor connect complete code
Refactor connect complete code and move common code
for connection manager and legacy path to a common function
to remove the duplication of the code.

Change-Id: I25e39635005efd9ad19174e9f26d009946912cdb
CRs-Fixed: 2842413
2020-12-28 13:06:46 -08:00
Abhishek Ambure
15885d348c qcacld-3.0: Allow switch to RSO STOP State while roam in progress
Problem scenario:
1) Host gets roam event from FW and RSO state is switched to
   ROAM_IN_PROGRESS.
2) Host gets reassoc response followed by FW down indication.
3) Host processes reassoc response in HDD and sends disassoc to
   FW as FW down indication received.
4) As a part of disassoc host tries to switch RSO state to STOP.
   But as present RSO state is ROAM_IN_PROGRESS and FW is down,
   host fails to send RSO stop command to FW and doesn't switch
   RSO state to STOP.
5) Lim disassoc send fails due to FW is down and host proceeds
   with lim_send_disassoc_cnf and lim_cleanup_rx_path.
6) In lim_cleanup_rx_path() host checks for present RSO state is
   ROAM_IN_PROGRESS and returns without calling lim_del_sta();
7) Thus peer delete and vdev delete is not send to FW and host
   vdev State machine stuck at SP-SUSPEND_DOWN which leads to
   peer and vdev reference leaks.

Fix:
Allow switch to RSO stop state while present RSO state is
ROAM_IN_PROGRESS.

Change-Id: I4a838ecd98a7ca377cd557d7a01a93ac53449595
CRs-Fixed: 2844647
2020-12-24 12:30:29 -08:00
Abhishek Ambure
65fc8b763b qcacld-3.0: Add support to handle disconnect ind via CM
Host add support to handle disconnect indication from connection
manager.

Change-Id: I824afebc2ac919e3c85d9abca3cc343160c2a95e
CRs-Fixed: 2842187
2020-12-22 18:47:33 -08:00
sheenam monga
914dae7d9e qcacld-3.0: Use CFG_BTM_ENABLE to forward BTM request frame
Enable 10th bit of CFG_BTM_ENABLE ini to forward BTM request
frame to upper layers when frame contains MBO assoc retry
attribute. when supplicant receives this MBO frame it will
use the frame info for blacklisting the AP so for the next
connection framework will avoid this AP.

Change-Id: I9a675cc01769c38ad5be26ea5fd28ada8dc03546
CRs-Fixed: 2843323
2020-12-22 16:37:00 -08:00
Sachin Ahuja
592a88ad7b qcacld-3.0: Return failure for runtime resume if FW is down
Currently when the FW is down, runtime resume return success
status but does not send the power exit and WOW wake up from
sleep command to FW. So WMI_WOW_SET_ACTION_WAKE_UP_CMDID
command is sent to FW which leads to panic.

To avoid this issue, send the correct error status for runtime
resume if FW is down.

CRs-Fixed: 2830614
Change-Id: Id27d2648427b32d32c15370fbb170fafec9450d2
2020-12-22 14:41:21 -08:00
sheenam monga
24819ec6e9 qcacld-3.0: Update documenation of CFG_BTM_ENABLE
FW considers 9th bit of CFG_BTM_ENABLE for btm query
with candidate list which is not mentioned in ini
documentation.

Change-Id: I4fefdaa464e14c350d885107a28051fa0ad309f0
CRs-Fixed: 2839587
2020-12-22 08:49:03 -08:00
Abhishek Ambure
da2452fdd7 qcacld-3.0: Add lim support for CM disconnect handling
Add support to handle disconnect request via connection manager
in LIM.

Change-Id: I2ead0188368ab75f4862a429d43bf2305ae94abe
CRs-Fixed: 2840792
2020-12-21 23:30:20 -08:00
Zhaoyang Liu
567e4681be qcacld-3.0: fix build error about function redefinition
Fix the compilation error about redefinition of 'ipa_is_ready'.
This API is defined in <linux/ipa.h>. Rename the function name.

Change-Id: I206a221a5df95494e947483f2d133df6e5053220
CRs-Fixed: 2817997
2020-12-21 04:49:45 -08:00
Tushnim Bhattacharyya
2cac8a113b qcacld-3.0: Release resource after TDLS cmd processing
It doesn't free resources in failed cases like getting vdev or tdls
vdev object when handling tdls commands. This causes reference
count of psoc leak or memory leak. Following are the functions,

tdls_set_responder
tdls_notify_sta_connect
tdls_notify_sta_disconnect
tdls_set_operation_mode
tdls_reset_all_peers

Change-Id: I8b5d5fa8a137a1b07f0fa6e4667047db95d7b99e
CRs-Fixed: 2839099
2020-12-18 17:41:09 -08:00
sandhu
bccde19f93 qcacld-3.0: Remove unused IPA related memory in lahaina
Remove IPA related TX completion memory not used in lithium
and helium platforms.

Change-Id: Ibdce6169a1b5b95289fee80a36e2041cf785ad86
CRs-Fixed: 2808513
2020-12-17 23:45:51 -08:00
Saket Jha
6599516554 qcacld-3.0: Request fw stats for monitor mode
Periodically request pdev stats from FW to receive channel noise floor
information after monitor vdev has been brought up, based on the band
currently being sniffed. Use the band information as a secondary parameter
when sending periodic request to fw so a single noise floor value is sent
to host. Pass this noise floor information to dp_pdev to be populated in
radiotap header.

Change-Id: I488e4985392cb646ffdee914359fa995dbeb025e
CRs-Fixed: 2833458
2020-12-17 19:38:27 -08:00
sheenam monga
a3c734decb qcacld-3.0: Update doc of vdev start resp handler
Update documentation of vdevmgr_vdev_start_rsp_handle
function.

Change-Id: I948e38fd94846500573e93d40577f066d0670f27
CRs-Fixed: 2840561
2020-12-17 15:41:32 -08:00
Bapiraju Alla
19f4eb9bb6 qcacld-3.0: Request stats over qmi only when target suspend is success
Currently, Stats request commands are sent over qmi right from the
target suspend request is sent to FW. This is leading to a crash in
FW since it is trying to access PCI when it is in suspend state.

To address this, send stats request over QMI only after the ack is
received for the target suspend command.

Change-Id: I1b2b6a60c5d8c7ec4375d328e58a66d749794e3f
CRs-Fixed: 2835903
2020-12-17 13:39:50 -08:00
hqu
4b3b2782e7 qcacld-3.0: Add ini to set init chain mode for BTC
Add ini to set init chain mode for BTC, default value should
be set to the same as macro WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED
that means no need to send init chain mode for BTC to firmware
in wma_vdev_pre_start() process.

Change-Id: I3051a7f8a0c708c7df40d1b95b46e0bfa6892f6c
CRs-Fixed: 2837173
2020-12-15 19:43:22 -08:00
Subrat Dash
fec051ecae qcacld-3.0: Add support to enable TWT roles
There are cases where only a few TWT roles may be required
to be enabled. For example TWT Requestor role alone or
TWT Respondor role alone. Also, it could be unicast TWT only
and disable broadcast TWT.

Support broadcast TWT  configuration in requestor and responder
role by adding new INI.
Extend the use of existing requestor and responder INIs to further
enable requestor and responder roles itself.

Change-Id: I3dfa196edfda9cafd01fa56c0bb6ce73e27b4144
CRs-Fixed: 2828718
2020-12-14 09:29:44 -08:00
Chaoli Zhou
58ebf67ea7 qcacld-3.0: HST: Support 2.4G sap with 1x1+2x2 DBS config
In the customer platform, the chain0 for 2.4G is disabled,
it just only support 1x1 2.4G + 2x2 5G for hasting. With
such kind of configuration, 2.4G SAP start failure due to
policy_mgr_is_hw_dbs_required_for_band return false with
following config, which block switching hw mode from single
mac(single mac just only support 5G) to dual mac and then
make start 2.4G SAP failure on single mac configuration

[0]-MAC0: tx_ss:2 rx_ss:2 bw_idx:5 band_cap:2
[0]-MAC1: tx_ss:0 rx_ss:0 bw_idx:0
[0] DBS:0 SBS:0 hw_mode_id:0
[1]-MAC0: tx_ss:2 rx_ss:2 bw_idx:5 band_cap:2
[1]-MAC1: tx_ss:1 rx_ss:1 bw_idx:4
[1] DBS:1 SBS:0 hw_mode_id:1

Change-Id: If9e76fb47743c32c313eacf150146ba8fa60eb2d
CRs-Fixed: 2833620
2020-12-14 05:40:53 -08:00
Wu Gao
f1d9812ccd qcacld-3.0: Release WLAN_TDLS_SB_ID when teardown TDLS connection
It doesn't handle failed case about getting vdev or tdls vdev object
when teardown tdls connection. Which causes reference count of psoc
leak.

Change-Id: Ie4e7966c0a07f378483cd5e6344599645c75ac68
CRs-Fixed: 2836949
2020-12-14 01:43:02 -08:00
Srinivas Dasari
a9a53ee19c qcacld-3.0: Handle NAN+STA reconnect concurrency
Currently, STA reconnect (e.g. reconnect to same BSSID) is handled
as STA+STA as part of NAN concurrency checks. This results in NAN
disable when reconnect is issued.
Check if the current incoming connection is on same vdev as
previous sta connection instance and disable NAN only if it's
different.
Handle NAN+SAP reenable in similar way.
Also, remove the redundant usage of NDI cleanup API
ucfg_nan_check_and_disable_unsupported_ndi in
if_mgr_connect_start.

Change-Id: Ia063a69bb2efdf1d51c6988b8905ceac0f454dab
CRs-Fixed: 2821352
2020-12-13 23:38:12 -08:00
Jianmin Zhu
ac8b95e887 qcacld-3.0: Clear whole operations bitmap when RSO deinit
To avoid roaming enable failed for operations bitmap set/clear mismatch for
SAP+STA or STA+STA concurrency, clear whole operations bitmap when RSO
deinit, then roaming can be enabled again after STA disconnect and
reconnect.

Add log when set/get operations bitmap to help debug.

Change-Id: Ie1f1a213dcdefb393ec3e1e2c6a8a71ab17b226c
CRs-Fixed: 2834199
2020-12-11 18:49:18 -08:00
Abhinav Kumar
0e0e63194e qcacld-3.0: Update mscs action frame as per spec
Currently, Host sends classifier type and classifier
mask part of TCLAS Mask OPIE only with tag length of
2 bytes.

As per spec tag length for TCLAS Mask OPIE should be 18.
Ext Tag: TCLAS Mask
   Ext Tag Number: TCLAS Mask (89)
   Ext Tag length: 18
   Classifier Type: 4
   Classifier Mask: 0x5f
   Reserved:00000000000000000000000000000000

Fix is to add a reserved parameter in TCLAS Mask OPIE
of length 16 bytes and set it to NULL.

Change-Id: I54cd896a4ffad16581c14fc254575bcec8e6f6d7
CRs-Fixed: 2822616
2020-12-10 06:47:03 -08:00
gaurank kathpalia
5028327b50 qcacld-3.0: Overide blacklist and connect to AP
Currently the connection manager queries the
blacklist manager about the action to be taken
and if all the candidates of a certain SSID are
blacklisted then the connection would be rejected.
there are various types of blacklisting, some
can be overided and some have to be strictly
followed.

Fix is to overide the blacklist candidate and
connect to it if no other candidates are suitable
for connection.

Change-Id: Id47fd214130411179d9a53005841786d6d14ce81
CRs-Fixed: 2831535
2020-12-09 21:56:00 -08:00
Deeksha Gupta
2a2bc94351 qcacld-3.0: Don't allow SAP to switch to DFS channel if master mode is disable
Previously, if force SCC is enabled and Standalone SAP starts
on non-DFS channel, it starts with master mode Disable. If it
is switched to DFS channel it will switch without CAC.

As a fix, if SAP is started on non-DFS channel with force SCC,
don't allow it to switch to DFS channel if master mode is disabled.

Change-Id: I1822f67a5480d6c16fa980c9c6b262341af7c2de
CRs-Fixed: 2827237
2020-12-09 13:28:26 -08:00
sheenam monga
dc64913842 qcacld-3.0: CSA count offload to fw in case of AP/P2PGO
Currently, host decrements beacon switch count and sends
channel switch frame every time until count becomes 0 this
may introduce sync issue between fw and host in case fw has
not sent beacons but host decremented switch count due to
timeout and sent new channel switch frame or vdev restart in
case count beacomes 0.

Fix is to offload CSA to fw to avoid any sync issue.

Change-Id: Idb48d419ec4117ff39cb823ca8af75d7a0abc3c0
CRs-Fixed: 2828045
2020-12-08 09:21:26 -08:00
gaurank kathpalia
81465cfdd5 qcacld-3.0: Add logic to create bss peer from connection manager
Add logic to create bss peer from connection manager.

Change-Id: Ia150669b2bbc55ddf722a92617de2a13b7357cb5
CRs-Fixed: 2832727
2020-12-08 05:22:28 -08:00
gaurank kathpalia
94cdcf0ddb qcacld-3.0: Add logic to delete bss peer from connection manager
Add logic to delete bss peer from connection manager.

Change-Id: Ic0f53e87525af670f7a87d84d168276bbcd73efd
CRs-Fixed: 2832733
2020-12-07 14:58:29 -08:00
Abhinav Kumar
482acb4555 qcacld-3.0: Print roam message info in kmsg
The event WMI_ROAM_STATS_EVENTID is received after
every roam, once the roam synch complete is sent by the host.
This event contains details regarding the roam RSSI TH reset.
This helps in debugging/understanding the scenario when roam
failure happens.
Print the info received related to roam RSSI TH reset into kmsg.

Change-Id: Ibee9fc6e9220511d6679efb24080c79bcd807ab8
CRs-Fixed: 2826321
2020-12-06 23:49:45 -08:00
Ashish Kumar Dhanotiya
eb23480b4e qcacld-3.0: Update max value of gEnableModulatedDTIM ini
Currently max value of gEnableModulatedDTIM is 5 which is
incorrect as FW supports maximum no. of modulated DTIM as 10.

To address above issue update max value of gEnableModulatedDTIM
ini.

CRs-Fixed: 2830240
Change-Id: I7f1cab6f0cb2b2a60e7cc1bb37a9971c1752a1bb
2020-12-02 12:49:06 -08:00
Ajit Vaishya
b4021c73b5 qcacld-3.0: Advertise Adaptive 11R supported feature to user space
Currently when Adaptive 11R feature is disable via ini
then user space parse Vendor Specific IE and trigger
connection in FT-PSK/EAP based on STA configured key
mgmt, but due to feature disabled via ini it failed
to connect AP and trigger Assoc reject to user space.
To overcome this advertise Adaptive 11R supported feature
bit to user space and based on this feature bit user space
parse, trigger connection in FT-PSK/EAP other wise fallback to
PSK/EAP.

Change-Id: I5d67a0cb77c3f39328467a6313a7a795e6a7a4d8
CRs-Fixed: 2785878
2020-11-30 12:49:20 -08:00
Liangwei Dong
4744fdbb95 qcacld-3.0: Fix SAP moved to unsafe channel
At present when user trigger SAP move to unsafe channel,
driver doesn't reject the request since "strict = false"
and unsafe checking is skipped.
Fix by check SAP channel switch target channel safe or
unsafe with API policy_mgr_is_sap_freq_allowed before
perform channel switch.

Change-Id: I2950fb31346df8705c8fc608fd79e1a44f4d4947
CRs-Fixed: 2826619
2020-11-30 10:49:04 -08:00
Utkarsh Bhatnagar
1b046d2558 qcacld-3.0: Stop SAP if STA is on 6ghz
Stop/Reject SAP connection if STA is/comes up
on a 6ghz freq and SAP is not capable of 6ghz
freq to avoid MCC situation in a non-DBS capable
HW.

Fix is to stop/reject the SAP startup in above
mentioned case.

Change-Id: I451c95929f378cd0790bd5fc647235fc2dd0071a
CRs-Fixed: 2818030
2020-11-30 10:49:00 -08:00
gaurank kathpalia
0047bcc4fe qcacld-3.0: Use correct API for DBS capability
Currently the driver uses the API
policy_mgr_is_dbs_enable to check
whether the DBS is enable or not which
does not check the service capability of
DBS, and thus would return true if ini
and FW HW modes contain DBS. In this case
if STA is on 5ghz and SAP comes on 2.4ghz
then force SCC would not happen as the
driver would consider the HW to be DBS
capable which actually is not, and thus
the overall concurrency would be MCC which
is not favourable.

Fix is to use policy_mgr_is_hw_dbs_capable
API instead of DBS enable API which checks
for the service bit also, so that the driver
forces SAP to STA's channel.

Change-Id: I9319293ecfb54fe3e1ad0eaff15542c671514bf4
CRs-Fixed: 2820377
2020-11-24 22:51:08 -08:00
gaurank kathpalia
9f15b62974 qcacld-3.0: Remove check for DBS HW mode
Currently the driver checks whether hw is
already in DBS in the function
policy_mgr_check_and_set_hw_mode_for_channel_switch
and it does not set hw mode if it is already
in DBS mode. It can happen that SMM is already
requested and is present in serialization and it
would change the HW mode from DBS->SMM and if
driver starts any vdev on 2.4ghz in HST/HSP
which requires the DBS mode for 2.4ghz , the FW
would send a vdev start failure.

Fix is to remove the check of current hw mode and
let DBS be posted to serialization. If hw mode is
already in DBS it would return from serialization
with E_ALREADY but would ensure that HW mode is
always in DBS for a 2.4ghz connection.

Change-Id: Ica660058175cb1edc2931dd2d28ee6cdd9bab2f4
CRs-Fixed: 2823238
2020-11-24 15:03:13 -08:00