Commit Graph

1133 Commits

Author SHA1 Message Date
wadesong
d547766258 qcacld-3.0: Refine CSR scan related action sequences
1) In csr_start, CSR module's scan callback function is currently
registered after scan is enabled. This can result in a potential
memory leak of the per-session CSR scan profile's child buffers
when the following events take place in sequence:

    (1) CSR scan is enabled
    (2) Upper layer invokes CSR module for scan requests
        (per-session CSR scan profile's child buffers are
        allocated here)
    (3) Scan finished, but no CSR callback is registered to
        handle it so the previously allocated child buffers
        are leaked
    (4) CSR scan callback function is registered later, but
        it's already too late

Move the CSR scan enabling code to a place after CSR scan
callback is registered to fix the potential memory leakage.

2) CSR scan should be stopped before sessions are closed, and
session init code should not re-enable CSR scan again during
session clean up stage. Or there will be another chance for
the same issue as in 1) to happen again.

3) CSR scan callback function should be deregistered before
a session is closed and cleaned up.

4) Per-session CSR scan profile pointer should be checked
during session clean up and its buffer and child buffers
should be freed to avoid any potential memory leak.

Change-Id: I99101170a58f63b239db620dea01d210e83d9367
CRs-Fixed: 2228321
2018-04-26 04:07:24 -07:00
Jeff Johnson
5d310d2a15 qcacld-3.0: sme: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0f45085f6a98b89a4468849ac00538100d903698
CRs-Fixed: 2229655
2018-04-24 14:48:34 -07:00
Paul Zhang
33fae2710d qcacld-3.0: Config number of TX sw retry per AC
Video/audio wireless application needs to tune parameters
per AC based. Config the number of TX sw retry per AC via
driver INI configuration file. It helps to improve the
video/audio performance in noisy environment.

Change-Id: Icffb5174b265b6453021b0d0a8ad3e12b695847a
CRs-Fixed: 2212954
2018-04-24 04:26:06 -07:00
Paul Zhang
ee09f8eefd qcacld-3.0: Configure the A-MPDU subframe per AC
Video/audio wireless application needs to tune parameters
per AC based. Configure A-MPDU subframe parameter per
AC via driver ini configuration file.

Change-Id: Id63be7aacf6465edee08f7a2f4c8a119f9bd6346
CRs-Fixed: 2212932
2018-04-24 02:30:41 -07:00
Abhinav Kumar
a95af7cbac qcacld-3.0: Add new ini to set min delay btw scan and reason bit-mask
Currently there is no provision to decide delay between two roam
scans in firmware. With these new ini's, driver wants to expose
control to decide delay between roam scans:

Add ini "min_delay_btw_scans" to set minimum duration allowed between
two consecutive roam scans. Fw should not allow roam scan if duration
between two consecutive roam scan is less than min_delay_btw_scan.

Add ini "roam_trigger_reason_bitmask" to set default value of
bit-mask containing roam_trigger_reasons for which
min_delay_btw_scans constraints should be apply.

Change-Id: I2af9d5dc8e6919eeb90251d3d744e3f07705e776
CRs-Fixed: 2221779
2018-04-19 22:06:23 -07:00
Will Huang
9508263669 qcacld-3.0: Unregister CSR scan request handler when csr_stop
Register CSR scan requester when csr_start(), but didn't unregister it
when csr_stop(). It might run out scan requester buffer.

Change-Id: I95472027c927ae0c0bc1869338cffad6bbacf0ff
CRs-Fixed: 2222492
2018-04-19 19:25:47 -07:00
Abhinav Kumar
271f063980 qcacld-3.0: Add new ini to enable/disable FT open feature
Add new ini item "enable_ftopen" to enable/disable FT open
feature. There is no ini currently to disable only FT open.

Change-Id: I18280d9de77857b15698eb233ba4ec71089beb06
CRs-Fixed: 2214766
2018-04-18 18:38:54 -07:00
Abhinav Kumar
a083f21918 qcacld-3.0: Add new ini to set delay Hand-off period
Add new ini item "ho_delay_for_rx" to set delay Hand-off
period. For LFR 3.0 roaming scenario, once roam candidate
is found, firmware waits for minimum this much duration
to receive pending rx frames from current BSS before
switching to new channel for handoff to new AP.

Change-Id: Ided9a81e9402259f5df6b42926b3fa336b6bb4d0
CRs-Fixed: 2221748
2018-04-16 16:56:50 -07:00
Liangwei Dong
8193551a89 qcacld-3.0: Fix get WLM setting failed
Add WLM setting to "csr_get_config_param"
to avoid the setting lost when set back by
csr_change_default_config_param.

Change-Id: I539a4a87f55365c701a7149784e92c60fb6c5383
CRs-Fixed: 2223340
2018-04-16 08:48:00 -07:00
CNSS_WLAN Service
7a3658671d Merge "qcacld-3.0: Remove obsolete WOWL messaging" into wlan-cld3.driver.lnx.2.0 2018-04-15 16:58:20 -07:00
Jeff Johnson
9bf3b65da5 qcacld-3.0: Remove obsolete WOWL messaging
The driver contains considerable debris from the obsolete WOWL
messaging, so clean it up.

Change-Id: I432f7fc1567b0aa31a7be758c05f2213340baed0
CRs-Fixed: 2223859
2018-04-15 10:17:50 -07:00
CNSS_WLAN Service
12c237f2ed Merge changes I174a45c1,I0ee93760,I432e85e3,I639d4fb5,I22f41e6b,I1200fa57,I301031a0,I4abd9d26,I4fbd8f9d into wlan-cld3.driver.lnx.2.0
* changes:
  Release 5.2.0.73T
  qcacld-3.0: Compile out WMI non_tlv file from Kbuild
  Release 5.2.0.73S
  qcacld-3.0: Update io smmu mapping to osdev
  Release 5.2.0.73R
  qcacld-3.0: Remove WLAN_AP_STA_CONCURRENCY feature flag
  qcacld-3.0: Kbuild: Define CONFIG_FEATURE_SKB_PRE_ALLOC
  qcacld-3.0: Fix a race btw tx and tx-compl
  Release 5.2.0.73Q
2018-04-15 01:36:21 -07:00
Linux Build Service Account
8ed1641591 Merge "qcacld-3.0: Add support to configure HE LTF" 2018-04-14 21:07:24 -07:00
Tushnim Bhattacharyya
7b5b137807 qcacld-3.0: Remove WLAN_AP_STA_CONCURRENCY feature flag
STA+SAP concurrency is a default feature now. Remove
WLAN_AP_STA_CONCURRENCY feature flag.

Change-Id: I1200fa57b27ded67b0a17aa9e43c88926a822034
CRs-Fixed: 2223507
2018-04-14 07:37:33 -07:00
Kiran Kumar Lokere
a006a3010f qcacld-3.0: Add support to configure HE LTF
Add support for configuring HE LTF.

Change-Id: Ieabe844729c32c47403a7c94864cb689fa7fb8aa
CRs-Fixed: 2201837
2018-04-14 06:14:41 -07:00
Padma, Santhosh Kumar
96086a6d52 qcacld-3.0: Fix use after free in sme_qos_del_ts_req
In sme_qos_del_ts_req, there is a chance that driver can access
del ts req pMsg even after free. In umac_send_mb_message_to_mac
driver frees pMsg if there is some failure. But driver still
tries to access pMsg in sme_qos_del_ts_req even if umac_send_mb_
message_to_mac returns failure.

Access pMsg only if umac_send_mb_message_to_mac returns success
to avoid this use after free issue.

Change-Id: I3638a38746b9cd917e01a7ff6f38430344e6e78d
CRs-Fixed: 2214718
2018-04-13 18:09:55 -07:00
Kabilan Kannan
33fcd68b5b qcacld-3.0: Add magic string for debug enhancement
Add magic string in the driver to automate the
stability analysis.

Change-Id: Id0294dfc46cfb07db61d80faf725bc17ef967de3
CRs-Fixed: 2205177
2018-04-13 18:09:51 -07:00
Wu Gao
94488c28fb qcacld-3.0: Remove not used INI CFG
Cleanup not used INI configures. This is part of FR about WNI and INI
CFG.

Change-Id: I374e870610d79cc0d172ae126bfa70dc6d2db9a9
CRs-Fixed: 2206061
2018-04-13 14:51:19 -07:00
Wu Gao
8800cb17f1 qcacld-3.0: Remove not used WNI CFG
Cleanup not used WNI configures. This is part of FR about WNI and INI
CFG.

Change-Id: Iee92add09366188ccb5a6f2385d07758221f8d67
CRs-Fixed: 2206059
2018-04-13 14:51:12 -07:00
gaurank kathpalia
63311d11a2 qcacld-3.0: Avoid disconnect timeout in try disconnect
If connection is in progress and new connection req is
received from supplicant, hdd tries to disconnect the
current session and post force disassoc command and wait
for it to get completed. If the current ongoing connect
operation fails and this force disassoc is processed as
sme session is in disconnected state it is silently
dropped and thus there is no event sent to the HDD
to stop the wait for disconnect and HDD wait for 5
sec before returning connect failure.

Fix this by Calling disconnect handler if, disconnect
with force dissoc is called in disconnected state

Change-Id: I3a78308b54fb048fba5a6aed3d8e8b193c371647
CRs-Fixed: 2223313
2018-04-13 12:15:51 -07:00
Arif Hussain
a216f678bf qcacld-3.0: Fix integer Underflow in csr_update_fils_params_rso
Fix integer underflow in csr_update_fils_params_rso as this may
cause buffer overflow.

Change-Id: I25b31f5c0f207be09ac30d5f95911d3866d12d66
CRs-Fixed: 2204872
2018-04-06 20:38:04 -07:00
Ashish Kumar Dhanotiya
69e72bd66a qcacld-3.0: Remove CSR dot11f IE RSN max len
Max len of CSR_DOT11F_IE_RSN is 114 which is les than the
DOT11F_IE_RSN_MAX_LEN (130) which may result in array overflow
while parsing cckm ie.

TO address this replace CSR_DOT11F_IE_RSN_MAX_LEN to with
DOT11F_IE_RSN_MAX_LEN and remove CSR_DOT11F_IE_RSN_MAX_LEN
as it is not getting used anywhere else.

Change-Id: I58f93f37bd17653db2840720ab106c01f10d535e
CRs-Fixed: 2209355
2018-04-06 14:47:05 -07:00
Kiran Kumar Lokere
0e255175b6 qcacld-3.0: Add configuration support for VHT20 MCS9
Add user configuration to enable/disable the MCS9 in VHT20
operation.

Change-Id: I1bf1156dbeb51a7850ef5a5b66295ecc0d007542
CRs-Fixed: 2217038
2018-04-06 14:47:03 -07:00
Srinivas Girigowda
1e0456c9aa qcacld-3.0: Fix function types passed to qdf_trace_register
Fix function types passed to qdf_trace_register.

Change-Id: I6d22c05a866f78113c95bd21c83bb0a28a630385
CRs-Fixed: 2208843
2018-04-04 16:39:55 -07:00
Krunal Soni
5ee9ce4e2e qcacld-3.0: Remove dead code in protocol stack
Remove dead code in protocol stack.

Change-Id: I366705b8cf4cf13c030a6456c21dae94193d0d77
CRs-Fixed: 2216008
2018-03-30 17:00:09 -07:00
Tushnim Bhattacharyya
647f93e8ed qcacld-3.0: Call scheduler_post_msg directly instead of wma_post_ctrl_msg
Call scheduler_post_msg directly instead of wma_post_ctrl_msg.

Change-Id: I01dbe3623bfb9f83cbbf182b92cdb4f6fb98bb65
CRs-Fixed: 2213784
2018-03-30 13:30:38 -07:00
Jeff Johnson
682a7a5558 qcacld-3.0: Remove nBssLimit from struct csr_scanstruct
Remove unused field nBssLimit from struct csr_scanstruct.

Change-Id: I0f1f4b4608acd6332a9b3a2c48fc4bf430d187bd
CRs-Fixed: 2213060
2018-03-29 22:30:22 -07:00
Sandeep Puligilla
2fcc2548c6 qcacld-3.0: Convert eCsrPhyMode to enum wlan_phymode
Add api to convert enum eCsrPhyMode to enum wlan_phymode.

Change-Id: I94596d73940805ba7fbb07b2ea90a9e8dbbf7e03
CRs-Fixed: 2214021
2018-03-29 21:14:37 -07:00
Ashish Kumar Dhanotiya
d39c8b55db qcacld-3.0: Update correct reason code on receiving del sta
On receiving del station command, SAP is not updating the del
station reason code properly in station info.
Update the correct reason code in station info whenever a
del station or deauth station event comes.

Change-Id: I2004dc21f18682dbc7dee488e7b55bfccd0d242a
CRs-Fixed: 2178538
2018-03-29 17:32:02 -07:00
Sandeep Puligilla
f5ccbf66e6 qcacld-3.0: Deprecate enum wmi_dwelltime_adaptive_mode
Deprecate enum wmi_dwelltime_adaptive_mode and use enum
scan_dwelltime_adaptive_mode defined in scan component.

Change-Id: I9c33b852172d9208fb8440c6dc71a12aefd717da
CRs-Fixed: 2213150
2018-03-29 06:57:42 -07:00
Sandeep Puligilla
68908f2d02 qcacld-3.0: Never ageout connected AP scan entry
Connected AP scan entry is aged out if beacon
is not recieved within scan age out time.

Update mlme information of the connected AP/BSSID
scan entry so that scan age out hanlder will not
age it out even though the last beacon recieved
time is greater than the configured scan age out value.

Change-Id: I14c68c28459080623ca62c0bad9052e38d7fb348
CRs-Fixed: 2202010
2018-03-28 06:26:14 -07:00
Jeff Johnson
60b5fe20cc qcacld-3.0: Remove osScanChannelMask
Remove unused field osScanChannelMask in struct csr_scanstruct.

Change-Id: Id19ae20ec04284f51ebf96645257e70cdd104467
CRs-Fixed: 2213058
2018-03-27 23:38:32 -07:00
Jeff Johnson
5bb67b78e4 qcacld-3.0: Remove obsolete idle scan flags
Remove the following obsolete fields from struct csr_scanstruct:
- fCancelIdleScan
- fRestartIdleScan
- nIdleScanTimeGap

Change-Id: I50fd4d966586487111a55fc378a06783636a7df9
CRs-Fixed: 2212877
2018-03-27 13:52:53 -07:00
Jeff Johnson
4877d76793 qcacld-3.0: Remove current country BSSID & RSSI fields
struct csr_scanstruct contains fields currentCountryBssid and
currentCountryRSSI which are obsolete, so remove them.

Change-Id: I47f40cc687b0e905d3c2db4ad67fa32f70d5181e
CRs-Fixed: 2212972
2018-03-27 13:52:51 -07:00
Jeff Johnson
ab093c3422 qcacld-3.0: Remove Is11dSupportEnabledOriginal
The flag Is11dSupportEnabledOriginal is obsolete, so remove it.

Change-Id: I41626673ab2a9a53cd4607c2c3682530ed1c0051
CRs-Fixed: 2212925
2018-03-27 13:52:48 -07:00
Jeff Johnson
0b9639b4e7 qcacld-3.0: Remove obsolete csr_set_country_code()
Function csr_set_country_code() is obsolete, so remove it.

Change-Id: Ibccc6deaecb00862a2d9640de05106b81c658e69
CRs-Fixed: 2212924
2018-03-27 13:52:45 -07:00
Jeff Johnson
bc5aecd951 qcacld-3.0: Remove eWNI_SME_CHANGE_COUNTRY_CODE message handling
Message eWNI_SME_CHANGE_COUNTRY_CODE is no longer being sent, so
remove it along with the handler for it.

Change-Id: I8fe5e1e8c0c18ab51d496dddd9604c3a4cb2b236
CRs-Fixed: 2212920
2018-03-27 13:52:43 -07:00
Jeff Johnson
0820d32488 qcacld-3.0: Remove obsolete "country change" trace code
TRACE_CODE_SME_RX_HDD_CHANGE_CNTRYCODE is obsolete, so remove it.

Change-Id: I4f86162cd912f69c7b08e3384412eec96367dc40
CRs-Fixed: 2212909
2018-03-27 13:52:40 -07:00
Jeff Johnson
c3b15737e1 qcacld-3.0: Remove obsolete sme_change_country_code()
Function sme_change_country_code() is obsolete, so remove it.

Change-Id: I1d4ce3cb8931982415f5c457d01cd6046208db44
CRs-Fixed: 2212903
2018-03-27 13:52:38 -07:00
Tushnim Bhattacharyya
3b99f4b181 qcacld-3.0: Deprecate enum sir_conn_update_reason
Deprecate enum sir_conn_update_reason & use enum
policy_mgr_conn_update_reason from policy manager component.

Change-Id: Id592d5405235f29a962a2a7d8b679fa4363f556d
CRs-Fixed: 2213000
2018-03-27 07:29:09 -07:00
Vignesh Viswanathan
e25af7882c qcacld-3.0: Send 11k offload disable to FW during RSO Stop
Currently 11k offload command is sent to FW as part of RSO Start and
not explicit 11k offload disable command is sent to the FW. In case of
STA+STA concurrency cases, while 11k offload is enabled for the 2nd
STA after STA 1 is disconnected, the FW asserts because it has 11k
offload enabled for STA 1 and has not deconfigured it yet.

Send 11k offload disable command as part of RSO Stop during disconnect
to the FW so that it deconfigures 11k for the currently enabled STA
and re-configures for the second STA without assertion.

Change-Id: I8a1bcb8906c809f451f7ab3df3e4c671cef062fd
CRs-Fixed: 2208649
2018-03-27 07:29:06 -07:00
Sravan Kumar Kairam
a0600b8a87 qcacld-3.0: Modify IPA UC offload control cmd
IPA module has been moved to CLD component under the converged
driver model. Remove legacy WMA interface IPA command and use
the new defined API.

Change-Id: Icd9a207f43f8df4dc563d0078d402470683cfd7d
CRs-Fixed: 2177925
2018-03-21 18:57:06 -07:00
Krunal Soni
4b6c946459 qcacld-3.0: Add new diag event to capture connection stats
Add diag event and its structure to log various connection statistics
after the connection has been made.

Change-Id: I3572cd9230d89e2d4154fd43579c258a2e2bdb58
CRs-Fixed: 2208503
2018-03-20 22:35:07 -07:00
Dustin Brown
a2868623a0 qcacld-3.0: Use logging wrappers for HDD logs
Several logs are using QDF_TRACE with QDF_MODULE_ID_HDD directly.
Migrate these calls to the hdd_* logging wrappers instead.

Change-Id: I191014f0fd1ae55db71393655d96407ffa5953cb
CRs-Fixed: 2209514
2018-03-20 20:02:12 -07:00
Abhinav Kumar
49d08a742f qcacld-3.0: Move Channel convert and frame indication logic to lim_utils.c
Move Channel convert and frame indication logic from lim_p2p.c
to lim_utils.c and remove unused timer
pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer.

Change-Id: I71de90d5fb88462e52148a434d43ea80c41cfe36
CRs-Fixed: 2191282
2018-03-20 07:38:17 -07:00
Jeff Johnson
66ee8a92fe qcacld-3.0: Replace typedef tCsrRoamProfile
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 tCsrRoamProfile typedef does
not meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: Ie78bc34c5c39a56058d0daa0240047ec67392ab3
CRs-Fixed: 2207843
2018-03-19 19:57:58 -07:00
Min Liu
5eaf724da1 qcacld-3.0: Update scan list in FW when enable DFS scan
When enable DFS scan via wpa_cli, the related flag in mac context
also need to be updated so that DFS channels will be included in
configurations sent to FW accordingly when DFS scan is enabled.

Change-Id: I6033637364ddbc7e916627e5ab6a94aee825db98
CRs-Fixed: 2201307
2018-03-18 22:50:19 -07:00
Zhu Jianmin
3c83a848cb qcacld-3.0: Fix use after free in roaming disassoc rsp handler
During Rome LFR2 roaming, after pre-auth with new AP finished,
current AP is disassociated. In disassoc rsp handler:
csr_roam_roaming_state_disassoc_rsp_processor,
csr_roam_copy_profile is called after csr_dequeue_command.
In csr_dequeue_command, cmd from active list is removed, cmd from
pending cmd list is moved to active list and executed, if the cmd
is disassoc from wpa supplicant, pSession->pCurRoamProfile is
freed,  use after free happens in csr_roam_copy_profile

call stack when issue happens:

csr_roam_roaming_state_disassoc_rsp_processor
 ->csr_dequeue_command
    ->wlan_serialization_dequeue_cmd
       ->wlan_serialization_move_pending_to_active
          ->wlan_serialization_activate_cmd
             ->sme_ser_handle_active_cmd
                ->csr_roam_process_command
                   ->csr_roam_process_disassoc_deauth
                   -> csr_free_roam_profile
 ->csr_roam_copy_profile

Fixed by calling csr_dequeue_command after csr_roam_copy_profile

Change-Id: I903795e830c153b94a7dc0476a0e8ea5ecf6be2f
CRs-Fixed: 2205645
2018-03-16 05:26:20 -07:00
Jeff Johnson
5cc21cea5b qcacld-3.0: Remove DPU signatures from struct csr_roam_info
In a prior version of the driver DPU signatures were used to
synchronize the Data Plane with the Control Plane. The DPU signatures
were provided to HDD by SME via fields in struct csr_roam_info, and
then HDD provided the fields to the Data Plane. But that mechanism is
no longer used and HDD does not read these fields so remove them along
with the logic that is currently used to fill them.

Change-Id: Ib056c20683e6b4f0d969fcff227476d53e040cc0
CRs-Fixed: 2200995
2018-03-13 07:34:56 -07:00
Naveen Rawat
72475db24a qcacld-3.0: Check for return codes of dot11f_unpack functions
Add checks for return codes of dot11f_unpack functions.

Change-Id: I56149a2a767a9f13009710750a0588c0d658eb56
CRs-Fixed: 2175592
2018-03-12 15:57:33 -07:00