Commit Graph

1872 Commits

Author SHA1 Message Date
Abhinav Kumar
93463d2d7c qcacld-3.0: Device not roaming if FastRoamingEnabled disabled case
Allow driver to send RSO command irrespective of value of INI
FastRoamingEnabled.
FastRoamEnabled has nothing to do with LFR enable or disable.

Change-Id: Ice5e653b249f988a49d18ed56c9be53d4436bf56
CRs-Fixed: 2385045
2019-03-12 02:58:50 -07:00
Srinivas Girigowda
98234535e0 qcacld-3.0: Converge *_MIN/MAX() to QDF_MIN/MAX()
Converge multiple MIN/MAX() macros across the stack
to QDF_MIN/MAX().

Change-Id: Ibf622b1e365431fa579005ba8bffdd33b7808da8
CRs-Fixed: 2413868
2019-03-12 02:58:39 -07:00
Ashish Kumar Dhanotiya
3651083ee4 qcacld-3.0: Clear PMK cache from driver
Currently PMK cache is not getting cleared inside driver,
which can lead to information disclosure.
To address this issue, clear PMK information from all the
possible places in the driver.

Change-Id: I83758920f414c5287292ebdbebdcc9bf7238103c
CRs-fixed: 2403441
2019-03-11 21:55:05 -07:00
Ashish Kumar Dhanotiya
0213793334 qcacld-3.0: Clear PTK, GTK and IGTK keys on sta disconnection
Currently PTK, GTK and IGTK keys are not getting cleared
on wifi link disconnection from wifi driver memory, which
can lead to information disclosure. Clear PTK, GTK and IGTK
keys from wifi driver memory to avoid any potential information
disclore after wifi is turned off.

Change-Id: I309cd7af8d396167e9ec3ef9c6c443e8c08903d8
CRs-fixed: 2396603
2019-03-11 19:22:55 -07:00
Srinivas Girigowda
d8697d4d00 qcacld-3.0: Replace CSR_SESSION_ID_INVALID with WLAN_UMAC_VDEV_ID_MAX
Replace CSR_SESSION_ID_INVALID with WLAN_UMAC_VDEV_ID_MAX.

Change-Id: I00e0784086805f43c7889e3708dd7026cfe52c4f
CRs-Fixed: 2412781
2019-03-11 15:53:49 -07:00
bings
285b898a04 qcacld-3.0: Call dot11f_unpack_ie_rsn only for RSN IE
In lim_send_mlm_assoc_ind, wpa information may be copied to rsnIEdata.
So before calling dot11f_unpack_ie_rsn for rsnIEdata in the function
csr_roam_chk_lnk_assoc_ind, make sure the element id is RSN IE.

dot11f_unpack_ie_rsn returns failure for rsnIEdata if it contains
WPA information, then WPA connection fails.

Change-Id: I602a47326d452f33ba589a9cc99f59ce443d3162
CRs-Fixed: 2406444
2019-03-11 04:47:41 -07:00
Harprit Chhabada
89780bfc35 qcacld-3.0: Clean up of external range validation for Boolean type
BOOLEAN is native c type so external range validation is not needed.
Cleanup references to cfg_in_range(), cfg_min and cfg_max for
BOOLEAN items

Change-Id: I4a60d1bbd12ad3cce00b33c551b3927b2f01f638
CRs-Fixed: 2359500
2019-03-09 21:14:00 -08:00
Jeff Johnson
46b4f0e2cc qcacld-3.0: Replace typedef tSmeConfigParams
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tSmeConfigParams typedef does
not meet any of those criteria, so replace it (and the "tp" variant)
with a reference to the underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names and
so-called Hungarian notation, so in conjunction rename the underlying
struct to be in compliance.

Change-Id: I926cf67d87398782049bf9acbcd06f806a7cec29
CRs-Fixed: 2412715
2019-03-09 02:28:42 -08:00
Jeff Johnson
13926ec103 qcacld-3.0: Remove rrmConfig from tSmeConfigParams
The rrmConfig struct inside tSmeConfigParams is written by
sme_get_config_param() but is otherwise never accessed. Since
this is unused, remove it.

Change-Id: Ia173b20e69506f62e80baf239e889026595ba579
CRs-Fixed: 2412714
2019-03-09 02:28:37 -08:00
Srinivas Girigowda
df90ceacd1 qcacld-3.0: Remove obsolete macros from CDS
Remove obsolete macros from CDS.

Change-Id: Ic17ae603f698568ba8ccb6b4e3f332a475e67a7b
CRs-Fixed: 2395980
2019-03-08 18:53:37 -08:00
Harprit Chhabada
5cedd5898e qcacld-3.0: Correct the logging type in csr_send_join_req_msg
Change the logging type from error to debug to show the
correct intent.

Change-Id: I80fea7afad723ff471aca83158df311cfbff9d50
CRs-Fixed: 2410867
2019-03-08 17:23:57 -08:00
Sandeep Puligilla
d78870293b qcacld-3.0: Refactor scan cfg items
Refactor following scan CFG items
1. CFG_ENABLE_CONNECTED_SCAN
2. CFG_ENABLE_SNR_MONITORING

Change-Id: I936cc949c2682c5552e639cd2b1635e0dd0235e6
CRs-Fixed: 2405703
2019-03-08 07:39:25 -08:00
Jeff Johnson
b07230f434 qcacld-3.0: Refine sys_process_mmh_msg()
There are currently a multitude of issues with sys_process_mmh_msg()
so update both the interface and the implementation to align with good
software engineering practices and the Linux Coding Style.

Change-Id: I76e53772dd72426cc4245756457e2a8140937571
CRs-Fixed: 2411714
2019-03-08 04:36:32 -08:00
Jianmin Zhu
cc6b3d0c43 qcacld-3.0: Change log level from err to debug for LFR3 performance KPI
Log of level err will call printk to print on uart, may make
current thread sleep or delay > 10ms, then wma_roam_synch_event
need longer time to handle, LFR3 roam need longer time.

Change-Id: Ibdd58f74fcf5cf3de8e2b06166c375a2ce634cb5
CRs-Fixed: 2406307
2019-03-07 16:06:15 -08:00
Varun Reddy Yeturu
d6bfcd76e6 qcacld-3.0: Add crypto component support for FILS
Add support in crypto for FILS set key functionality

Change-Id: Ibbb83940c6f2d8545966a0b122f132b55d5770bf
CRs-Fixed: 2407508
2019-03-07 13:03:57 -08:00
Abhinav Kumar
7a048f72e3 qcacld-3.0: Fix Integer overflow while sending beacon report
sme_ese_send_beacon_req_scan_results sends number of bss description
present in beacon report through bcn_report->numBss. For each
iteration driver could send max 4 BSS. In case if driver has to send
beacon report for more than 4 BSS, It sends 4 BSS per iteration. Once
first four results are sent and bcn_report->numBss is not set to 0,
in next iteration bcn_report->numBss++ start from 4 instead of 0.
This Result in sending value more than 4 instead of 4 for next rest
BSS and leads to Integer overflow for bcn_report->numBss.

Driver should memset beacon_rep buffer for each iteration in order to
prevent Integer overflow of bcn_report->numBss. By this driver
could send fresh beacon report (independent of previous beacon report)
in each iteration.

Fix is to memset beacon_rep buffer to zero after sending beacon
report in each iteration in sme_ese_send_beacon_req_scan_results.

Change-Id: I0d07e54ec7f05e8eef388f9958fad597dc49873e
CRs-Fixed: 2408834
2019-03-06 10:59:50 -08:00
Abhinav Kumar
cd737decf2 qcacld-3.0: Allow roam invoke while FASTREASSOC
While handling userspace-directed re-association, driver
checks for flag "supplicant_disabled_roaming" before sending
roam invoke command after connection. Currently, the value of
supplicant_disabled_roaming is getting updated by value comes
through vendor command QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY.
In case if roaming does not get enabled using vendor command
in __wlan_hdd_cfg80211_set_fast_roaming, driver rejects
fast re-association cmd. This leads to roaming failure.

Fix is to allow roam invoke command irrespective of flag
"supplicant_disabled_roaming" and send csr_roam_offload_scan
with reason REASON_SUPPLICANT_DISABLED_ROAMING instead of
REASON_DISCONNECTED while processing FASTREASSOC command.

Change-Id: Iee55fff8dd9445a2fb2b96a244f59a763f207dd5
CRs-Fixed: 2408861
2019-03-06 10:59:32 -08:00
Pragaspathi Thilagaraj
1d8e2ab528 qcacld-3.0: Replace typedef bss_description
Host driver code has several instances of struct bss_description
that is type defined to tSirBssDescription, *tpSirBssDescription
This goes against the linux coding style. This change replaces
tpSirBssDescription with struct bss_description *.

Also Linux Coding Style doesn't welcome mixed-case names. So
cleanup some mixed-case variable names as well.

This change should be followed by changes to replace
typedef tSirBssDescription also ultimately.

Change-Id: Ic6fa2d5c7db0d0c1fe4be1096d416295dcb83779
CRs-Fixed: 2409129
2019-03-06 10:59:28 -08:00
Varun Reddy Yeturu
ff4c998846 qcacld-3.0: Fix WEP functionality in converged set key
Fix WEP security mode issues in converged set key

Change-Id: I8b60e19af1cc1ede9a34cb244de4c8859094ddec
CRs-Fixed: 2400861
2019-03-06 06:51:04 -08:00
gaurank kathpalia
a5c5bd5dd3 qcacld-3.0: Remove redundant code of hw dbs capable
Currently the driver has hdd, sme api to set the hw
dbs capability in the mac context which is not used
by any other module, because the dispatcher APIs are
already present.

Remove the hw mode capability variable from the mac
context as it is no longer used.

Change-Id: I7aa53b09cfb93fcd87ba9faf97402c136ef6b7ed
CRs-Fixed: 2409368
2019-03-06 05:06:13 -08:00
Jeff Johnson
459d27338f qcacld-3.0: Rename identifier eBand
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename identifier eBand to be compliant.

Change-Id: If232dac1fb05b64c7643ee0f3adea47a712a192b
CRs-Fixed: 2409886
2019-03-06 00:33:22 -08:00
Jeff Johnson
218f9be3f8 qcacld-3.0: Rename SME variable pPlmReq
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SME local variable pPlmReq to be
compliant.

Change-Id: I89fbf08ccc2b16bfed397ac6afa190cefe34141c
CRs-Fixed: 2409885
2019-03-06 00:33:16 -08:00
Jeff Johnson
ac5170c4a7 qcacld-3.0: Rename proxyARPService
The Linux Coding Style frowns upon mixed-case names so rename
proxyARPService to be compliant.

Change-Id: I8ad21c749caabde80fa21fa6800901c20988cfd2
CRs-Fixed: 2409875
2019-03-06 00:32:22 -08:00
Jeff Johnson
9625945e77 qcacld-3.0: Rename nEmptyScanRefreshPeriod
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename nEmptyScanRefreshPeriod to be compliant.

Change-Id: Iaf3d2ea3dc66c79c7e0e9f5ec42f013efd95f938
CRs-Fixed: 2408523
2019-03-05 03:48:41 -08:00
Abhishek Singh
82bcd76a11 qcacld-3.0: Fix mem leak for rrm channel list
In rrm scan response if IterMeasTimer fails to start the rrm channel list
is not freed. Similarly during rrm close if IterMeasTimer was running the
rrm channel list is not freed.

Free rrm channel list in rrm close and if IterMeasTimer fails to start.

Change-Id: I0ec18759dc81910755bda83d09f5106f8dd17937
CRs-Fixed: 2407417
2019-03-04 14:22:25 -08:00
gaurank kathpalia
6c4b50c28d qcacld-3.0: Accept update nss command in disconnected state
Currently if the FW supports the dynamic nss update feature,
the driver rejects the command to change the nss, but
there can be case scenarios where this update is required.

Fix is to accept the command in disconnected state, and
update the vdev specific ini of nss, and also update the
ini, and dynamic configuration in vdev mlme obj, which
is used in dynamic nss update.

Change-Id: I9cfa7f112159148733f06bf479987928f112901f
CRs-Fixed: 2404262
2019-03-04 14:22:21 -08:00
Kiran Kumar Lokere
9df090b79c qcacld-3.0: Fix issue with channel bonding configuration
Set the correct channel bonding parameter with user configured
value to enable/disable the channel bonding mode.

Change-Id: I38ff74fd5a1786a1446f36ca619a929c84f9446a
CRs-Fixed: 2394522
2019-03-04 12:55:33 -08:00
Pragaspathi Thilagaraj
974c27e69c qcacld-3.0: Fix compilation with WLAN_FEATURE_ROAM_OFFLOAD disabled
When LFR3 compile time flag WLAN_FEATURE_ROAM_OFFLOAD is
disabled, compilation of wlan driver fails as btk_key is defined
under WLAN_FEATURE_ROAM_OFFLOAD but sme_add_key_btk tries to
access this value irrespective of the compile time flag.

As the caller of sme_add_key_btk, calls this only if the
function hdd_is_btk_enc_type returns true and this function
hdd_is_btk_enc_type() is conditionally compiled based on
WLAN_FEATURE_ROAM_OFFLOAD, its better to include sme_add_key_btk
only if WLAN_FEATURE_ROAM_OFFLOAD is enabled.

Change-Id: I51315ed3bff8979120b86f75c06362a1c8a5658c
CRs-Fixed: 2408418
2019-03-04 11:18:05 -08:00
Jianmin Zhu
899cbed508 qcacld-3.0: Fix chmap List miss home channel during LFR3
During LFR3, Driver neighbor roam state keeps
eCSR_NEIGHBOR_ROAM_STATE_CONNECTED, don't enter
eCSR_NEIGHBOR_ROAM_STATE_INIT, no chance to call
csr_init_occupied_channels_list, so when candidate AP changes,
can't update in occupied channnels list.

Change-Id: Iadf60a013acbac3770108b4abcdc3d5b404daaf5
CRs-Fixed: 2406298
2019-03-04 07:30:05 -08:00
gaurank kathpalia
f880346d29 qcacld-3.0: Remove unused mcc to scc switch enums
Currently the driver accepts the values of 1,2
for MCC to SCC switch , which does not take effect
as they are not used in the sap switch channel,
thus the same are of no use.

Fix is to cleanup these as they are of no use, and
do not give the desired output too.

Change-Id: I604d83aa59735362828266584220016aac124b1a
CRs-Fixed: 2404563
2019-03-03 05:03:40 -08:00
Pragaspathi Thilagaraj
ea50d7ec8f qcacld-3.0: Update erp seq num only for FILS connection
During roaming, the firmware updates the host driver without
the next erp sequence number. Currently the host driver updates
the erp sequence number in roam info without checking if the
connection is FILS connection. This results in potential NULL
pointer dereference in case of non FILS connection.

Add check to see if session->pCurRoamProfile->fils_con_info is
not NULL before updating the erp sequence number.

Change-Id: I96541528d179b2b895a3f7f581e073e04bce76af
CRs-Fixed: 2405492
2019-03-02 13:31:09 -08:00
Jeff Johnson
57a641a290 qcacld-3.0: Remove transactionId from csr_roamstruct
The transactionId in struct csr_roamstruct is unused, so remove it.

Change-Id: I28b226555bbaf8dd27c41f729a10417ac7a5adea
CRs-Fixed: 2406619
2019-03-01 16:37:08 -08:00
Jeff Johnson
f227cfacc0 qcacld-3.0: Refine csr_send_assoc_ind_to_upper_layer_cnf_msg()
Function csr_send_assoc_ind_to_upper_layer_cnf_msg() currently uses a
combination of direct structure writes and serialized buffer writes to
fill the eWNI_SME_UPPER_LAYER_ASSOC_CNF message. Bring this logic up
to date by removing all serialized buffer writes and exclusively use
direct structure writes. In the process rename all function params and
local variables to be compliant with the coding style.

Change-Id: Ib9a986bcb1928b7d586a820521a72879f780be57
CRs-Fixed: 2406618
2019-03-01 16:37:03 -08:00
Jianmin Zhu
462ab8693f qcacld-3.0: Fix assert when iwpriv wlan0 addTspec
If ACM is off and can't send AddTspec too, we should
be still ok to send uapsd info to AP via reassoc req.

If roam offload is enabled, when csr_reassoc is called, vdev
start cmd is sent during vdev started status, assert will happen.

Fix: call sme_fast_reassoc in sme_qos_request_reassoc to invoke
LFR3 roam if roam offload supported.

Reproduce steps:
1. Change ini: gAddTSWhenACMIsOff=0
2. DUT STA connected AP
3. iwpriv wlan0 addTspec 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Change-Id: Idbd53ff0af36cb3b68c514e399d0033c41c74a78
CRs-Fixed: 2402542
2019-03-01 09:23:53 -08:00
Qun Zhang
ef65562bcd qcacld-3.0: Support firmware state check through cfg80211 vendor cmd
Add the support to allow user space applications through cfg80211
vendor command to check if wlan firmware is alive or not.

Change-Id: I96bb16e01974f7689493577741a36e3832963996
CRs-Fixed: 2399508
2019-03-01 09:23:49 -08:00
Jeff Johnson
b2c3d04b6b qcacld-3.0: Rename pEseBcnReq
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename pEseBcnReq (used by both HDD and SME) to
be compliant.

Change-Id: I377e1c4ff65bafeba403aa87a6542891f03bb2ba
CRs-Fixed: 2405758
2019-02-28 23:19:24 -08:00
Jingxiang Ge
f95dc4df29 qcacld-3.0: Add mutex to protect rssi_disallow_bssid list
rssi_disallow_bssid could be accessed from different thread,
mutex protection is added to avoid node invalid access when
node has been deleted or updated.

Change-Id: I2b19d48f19a3da55030384f26c501aee283801c7
CRs-Fixed: 2405157
2019-02-28 18:35:32 -08:00
Jeff Johnson
51dd84ee35 qcacld-3.0: Remove transactionId from set_context_req
The transactionId in struct set_context_req is unused, so remove it.

Change-Id: I26cbd3928fc24e0ed181cc8886d3ca4482716c32
CRs-Fixed: 2403182
2019-02-28 01:27:12 -08:00
Jeff Johnson
08e3733b9c qcacld-3.0: Remove transactionId from stop_bss_req
The transactionId in struct stop_bss_req is unused, so remove it.

Change-Id: Ied26fea404b031684bb63586597912a1ceefc0f9
CRs-Fixed: 2403180
2019-02-28 01:27:02 -08:00
Jeff Johnson
b5141adae1 qcacld-3.0: Remove transactionId from deauth_req
The transactionId in struct deauth_req is unused, so remove it.

Change-Id: I5e455c1003addf6bc8a3a9cedb0b8def6464513b
CRs-Fixed: 2403179
2019-02-28 01:26:56 -08:00
Jeff Johnson
b3dfc3b017 qcacld-3.0: Remove transactionId from disassoc_req
The transactionId in struct disassoc_req is unused, so remove it.

Change-Id: I63594303967999e6b19e77d7ed614b5316be1874
CRs-Fixed: 2403178
2019-02-28 01:26:51 -08:00
Jeff Johnson
afa022c9cd qcacld-3.0: Rename HDD variable pUserData
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename HDD local variable pUserData to be
compliant.

Change-Id: Ia6e960b2666ef2dc958cdc97cef0b525cfa9e58d
CRs-Fixed: 2405754
2019-02-27 11:37:45 -08:00
Pragaspathi Thilagaraj
96259b245f qcacld-3.0: Add support of FT-SAE roaming
Introduce new CSR auth type eCSR_AUTH_TYPE_FT_SAE to support the
akm suite selector 00:0F:AC-09(FT-SAE) and 00:0F:AC(FT-Suite-B).
Based on the sta_ctx authType, rsn auth type and hdd key
management type, set the auth type eCSR_AUTH_TYPE_FT_SAE to the
roam_profile during initial connection.

csr_scan_get_result() pushes the scan filter to scm module.
Translate the legacy eCsrAuthType to wlan_auth_type and push it
to the filter->auth_type.

Change-Id: I3ab91799ac280b85cdd67ad26b0eb7519d3b8b14
CRs-Fixed: 2400679
2019-02-27 09:55:37 -08:00
Min Liu
0daa098737 qcacld-3.0: Handle OWE info update from hostapd
Handle OWE info update from hostapd in the following path:
HDD->SAP->SME->CSR

Change-Id: I7584fb5db036d1643bd7d56076d30a0c75008a98
CRs-Fixed: 2397009
2019-02-27 08:11:47 -08:00
Min Liu
e34708a91d qcacld-3.0: Send update OWE info event
When receiving assoc request from OWE STA, always send update OWE
info event which contains the following information:
- MAC address of STA
- RSN IE in assoc request
- DH IE in assoc request

Change-Id: I7017c5d2730e493db2472ae53d5dfa69553cfe45
CRs-Fixed: 2396925
2019-02-27 08:11:42 -08:00
Jeff Johnson
f6601c3858 qcacld-3.0: Remove transactionId from join_req
The transactionId in struct join_req is unused, so remove it.

Change-Id: I6117190ae0cf486763fd9636a5682553cf5f8970
CRs-Fixed: 2403177
2019-02-27 05:09:59 -08:00
Jeff Johnson
50d3ae6e21 qcacld-3.0: Remove transactionId from start_bss_req
The transactionId in struct start_bss_req is unused, so remove it.

Change-Id: Ifacaf5c25b7eb59df5f0b6d28aa91eb7a39311fa
CRs-Fixed: 2403176
2019-02-27 05:09:54 -08:00
Pragaspathi Thilagaraj
a9ecc6354a qcacld-3.0: Refine pe_roam_synch_callback()
Refine pe_roam_synch_callback() declaration and definition to be
compliant with coding style. Replace lim_print_mac_addr() calls
with %pM format to print the bssid in this function.

Change-Id: I39a91c213d947f542f2a678910d0715098074365
CRs-Fixed: 2404405
2019-02-26 23:33:33 -08:00
Srinivas Girigowda
a02ce98bc3 qcacld-3.0: Replace IEEE80211_ELEMID_* with WLAN_ELEMID_*
Remove the duplicate enumerations in CDS and
use the enums defined in wlan_cmn_ieee80211.h.

Change-Id: I0bf380d0b06d85be8778d985b10246ea2b8aa474
CRs-Fixed: 2395980
2019-02-26 21:18:10 -08:00
Nachiket Kukade
d4d40bcb61 qcacld-3.0: Set 2.4G NSS to 1 for NDI if antenna sharing present
If antenna sharing is supported, target must not include 2x2
rates in HT IE for NAN Datapath related frames. Therefore set
2.4GHz band NSS to 1x1 in NDI vdev NSS config parameters.

Set 2.4GHz NSS to 1x1 for NDI if antenna sharing is supported.

Change-Id: I9950c825b09135e08dbd7c0ecf624fdb575476cd
CRs-Fixed: 2384515
2019-02-26 14:21:24 -08:00