Commit Graph

759 Commits

Author SHA1 Message Date
Will Huang
558f8085c4 qcacld-3.0: Add support of request peer stats info(part 2)
qcacld-2.0 to qcacld-3.0 propagation

FW has limitation to support old WMI_REQUEST_STATS_CMDID and
WMI_UPDATE_STATS_EVENTID interface on AP vDev. FW suggest to use new
WMI_REQUEST_PEER_STATS_INFO_CMDID and WMI_PEER_STATS_INFO_EVENTID to
get tx/rx rate.

This checkin is about LIM/SME/SAP layer, provide SME APIs/callbacks
to HDD layer to get SAP's peer station tx/rx related information,
fill these information from wma layer get-peer-stat-info APIs and
peer station's association request frame. It also fixed function
csr_send_assoc_ind_to_upper_layer_cnf_msg when copy information
between different structures and using offset style.

Change-Id: Icb1aaa126663af7eaedd1c4db86ca25c40ce6ee9
CRs-Fixed: 2051628
2017-07-18 05:54:26 -07:00
Selvaraj, Sridhar
57ce4dfde2 qcacld-3.0: Add ini params to avoid roam ping pong
In roaming scenario, to avoid ping pong with bad AP’s around, fw
blacklist certain Ap’s based on timestamps and penalize certain
AP’s of the same channel so they won’t be selected and back and
forth roaming could be avoided. This change adds the following
INI parametres to configure the parametres of this fw feature.

1) groam_disallow_duration    - Amount of time LCA[Last Connected AP]
                                will be disallowed before it can be a
                                roaming candidate again.
2) grssi_channel_penalization - RSSI to be penalized if
                                candidate(s) are found in the same
                                channel as disallowed AP's.
3) groam_num_disallowed_aps   - number of AP's the target should
                                maintain in its LCA list.

Change-Id: I41cb36caf1b42caeb2bf77846bd0279eb43d2018
CRs-Fixed: 2054188
2017-07-18 05:54:24 -07:00
Sreelakshmi Konamki
2972b6e3cb qcacld-3.0: Do not remove addts/delts command in csr_roam_sync_callback
Currently addts and delts commands are removed as part of
csr_roam_sync_callback. After successful roaming add_tspec of
old connection is not processed in SME (entry of addts command is NULL
in smeCmdActiveList). As there is no active add tspec in SME,
VO data is downgraded to BE.

To fix above issue, do not remove addts/delts commands from SME queue and
in PE layer do the error handling for addts to send resp for all
failure cases.

Change-Id: Ibc7364d188c3002dd8067738f6bcc8fee2af2126
CRs-Fixed: 2076713
2017-07-18 05:54:23 -07:00
Houston Hoffman
77bf407f75 qcacld-3.0: free memory in csr_get_snr error path
Free allocated message container when csr_roam_get_session_id_from_bssid
fails.

Change-Id: I088d3866d2c8052ef65ce5a719dd6c478d98e293
CRs-Fixed: 2077460
2017-07-17 21:48:01 -07:00
Zhang Qian
65e2e8d072 qcacld-3.0: Add sap operation mode to MAC global context
SAP operation mode is not updated to MAC global context once
user layer APP updates STA roaming policy. This will make
unsafe channel ignoring ineffective.

Change-Id: I5727e950e2097d55daf6745b4f443b89cc681dc8
CRs-Fixed: 2074237
2017-07-17 17:38:58 -07:00
Vidyullatha Kanchanapally
be0ebb3807 qcacld-3.0: Add handler for new WMI BT event
Add handler for the new WMI BT activity event and propagate the BT
event till HDD. These BT activity events will be used for MBO
enhancements to decide whether to accept the BTM request from
AP or not.

Change-Id: I687819fd28c693964b42bfb24eb9dae1858b10a5
CRs-Fixed: 2023728
2017-07-13 18:03:08 -07:00
Zhu Jianmin
e5594d1410 qcacld-3.0: Fix issue that can't pass Passpoint TC5.2.A
After iwpriv wlan0 reassoc, reassoc resp with status OK, but
csr_roam_state_change doesn't become eCSR_ROAMING_STATE_JOINED,
Keeps JOINING. When disconnect from AP or key timeout, CSR can't
handle eWNI_SME_DISCONNECT_DONE_IND event, no disconnect event
sent to wpa supplicant,  so no reconnect

CRs-Fixed: 2073481
Change-Id: I4966bac1998af95973b5247779fa5e83ad14db93
2017-07-13 02:46:35 -07:00
Srinivas Girigowda
74a66d627b qcacld-3.0: Fix clang warnings implicit enum type tAniBool
warning: implicit conversion from enumeration type 'tAniBool'
(aka 'enum eAniBool') to different enumeration type
'eSapBool' [-Wenum-conversion]

Replace tAniBool/eSapBool with bool.

Change-Id: I919488d2accc094049375fffe8b54a5d7dea621e
CRs-Fixed: 2055487
2017-07-13 01:47:55 -07:00
Varun Reddy Yeturu
7b2a657361 qcacld-3.0: Fix clang warnings in SME
Fix implicit conversion from enumeration type 'tSirRetStatus' (aka 'enum
eSirRetStatus') to different enumeration type 'QDF_STATUS'
Fix implicit conversion from enumeration type 'QDF_MODULE_ID' to
different enumeration type 'CDS_MQ_ID'
Fix implicit conversion from enumeration type 'enum eSirResultCodes' to
different enumeration type 'eCsrRoamResult'
Fix implicit conversion from enumeration type 'enum eSirRetStatus' to
different enumeration type 'tSirMacStatusCodes'
Fix implicit conversion from enumeration type 'sme_QosStatusType' to
different enumeration type 'QDF_STATUS'
Fix implicit conversion from enumeration type 'tSirResultCodes' (aka
'enum eSirResultCodes') to different enumeration type 'QDF_STATUS'

Change-Id: I133992192b797619c7bc593fb65e4ca5ca87702b
CRs-Fixed: 2063149
2017-07-12 15:42:49 -07:00
Varun Reddy Yeturu
d97e8f8fd8 qcacld-3.0: Fix clang warnings in P2P
Fix implicit conversion from enumeration type 'tSirResultCodes' (aka
'enum eSirResultCodes') to different enumeration type 'QDF_STATUS'

Change-Id: I693a7cd5213b5dc58395bbeee04292cf4960c36e
CRs-Fixed: 2063149
2017-07-12 15:42:48 -07:00
Varun Reddy Yeturu
66899fe9e7 qcacld-3.0: Fix roam start not being sent to firmware
Fix the restriction of not sending ROAM_START command if the
previously sent command was an UPDATE_CFG command. There is
no such requirement.If the framework sends a BLACK_LIST update
command, then it is sent to firmware even in case of disconnected
state for the sake of PNO. The subsequent connection triggers a
ROAM_START command and it is not sent to the firmware due to
the current restriction

Move the global flag of saving the status of roam start sent to
firmware into the session

If a ROAM STOP is being sent to the firmware directly to WMA, then
update the relevant flags in the session

Change-Id: I6c42bc7d1e10352883edc7e715ea1418835cd142
CRs-Fixed: 2074836
2017-07-11 19:58:03 -07:00
Kapil Gupta
ab7961d7f9 qcacld-3.0: Changes to retain value of snr_monitor_enabled
snr_monitor_enabled in the mac context can be overwritten while
applying sme config again.
Add changes to retain value of snr_monitor_enabled from initial
configuration.

Change-Id: I60522fa27407506522efb45a9c5d3e7a5ac04ef2
CRs-Fixed: 2056870
2017-07-11 07:27:14 -07:00
Srinivas Girigowda
aa6852824a qcacld-3.0: Fix clang warning implicit conversion enum type QDF_STATUS
warning: implicit conversion from enumeration type 'QDF_STATUS' to
different enumeration type 'enum tSirRetStatus' [-Wenum-conversion].

Change-Id: I4627325a927c36f3c4f9bb6d89f04146784d458a
CRs-Fixed: 2055487
2017-07-11 05:47:38 -07:00
Naveen Rawat
d0ca44133d qcacld-3.0: get statistics code path cleanup
HDD always sets periodicity=0 and cache=false so all logic
that exists to support these options can be removed from SME/CSR.

Change-Id: Ica9848badd09d14f50c44998ce830568e2b76024
CRs-Fixed: 2063484
2017-07-10 16:59:07 -07:00
Varun Reddy Yeturu
0d3d9916c4 qcacld-3.0: Cleanup CBMode in SME
Cleanup the variable CBMode as there is no usage of
the variable in the code

Change-Id: I4e63a0f6f1cddd639f324c177b198e4b5c18e9e0
CRs-Fixed: 2063149
2017-07-09 23:41:17 -07:00
Deepak Dhamdhere
612392c937 qcacld-3.0: Add .ini configuration for max number of AMSDU
qcacld-2.0 to qcacld-3.0 propagation

Host driver can send number of max AMSDUs in transmit frames.
Added a call to process_wma_set_command() similar to CLI
command processing for GEN_VDEV_PARAM_AMSDU during device
initialization.
Changed name of the field from isAmsduSupportInAMPDU to max_amsdu_num
in several places. Existing SME and LIM code passes this parameter
to WMA, but it is not used there. It may be useful if AMSDU setting
is changed to per-vdev basis in future.

WCNSS_qcom_cfg.ini changes:
Removed - "gAmsduSupportInAMPDU"
Added - Name = "gMaxAmsduNum", Min = 0, Max = 3, Default = 1

Actual function call to ol_txrx_aggr_cfg() send the parameters to
firmware is commented out because it is not implemented in firmware.

Change-Id: I2dfdd8c8c4a8807596ff28eee192ef66ac425653
CRs-Fixed: 871686
2017-07-08 13:41:35 -07:00
Hanumanth Reddy Pothula
90051789ab qcacld-3.0: Update valid rssi value to upper-layer
For a small window during roaming and new connection, there is a
possibility of firmware to send the invalid rssi value(other than
0-127), leading driver to send the same invalid rssi value to upper-layer.

To mitigate this issue:
1) Either send previous valid rssi value to upper-layer on receiving invalid
   rssi value from the firmware.
2) Or if previous rssi value is not valid, fetch rssi value from beacon frame
   of connected AP from scan cache.

Change-Id: I4443ed06cd80826ff386c2b4a536a2dc1a1e0881
CRs-Fixed: 2042747
2017-07-06 17:50:32 -07:00
Ravi Joshi
b228f09444 qcacld-3.0: Fix cds_mc_thread getting stuck in infinite loop
A null IE in the bss entry was causing a busyloop in the
cds-mc-thread.

Change-Id: Ia8bc11f7ee31b2be48d6f1fd9cfb50bc6e49c0c3
CRs-Fixed: 2043510
2017-07-05 22:12:09 -07:00
Naveen Rawat
81f058cf6a qcacld-3.0: Fix IE length in function sme_get_beacon_frm
Fix IE length in function sme_get_beacon_frm.

Change-Id: Iaec7f14e0e2c9078037fbbb586d9d0ac64b4e0de
CRs-Fixed: 2055891
2017-07-03 19:09:33 -07:00
Naveen Rawat
247a868164 qcacld-3.0: Program num tx chains for 11abg to FW
Program num tx chains for 11abg FW via pdev params. This will
help enhance power save in firmware.

Change-Id: I1f5815f2914f65928f8f3d72e53d409ecf6d1fe7
CRs-Fixed: 2056531
2017-07-03 19:09:32 -07:00
Sreelakshmi Konamki
df43ff8c80 qcacld-3.0: Remove key debug logs
wlan_hdd_cfg80211_set_key_wapi() and sme_roam_set_key() prints
key information in default host logs.

Fix to remove debug logs which prints sensitive key information.

Change-Id: Ib71da962761f9b6b5fd8ba214676b649529bcaa7
CRs-Fixed: 2058305
2017-07-03 15:40:07 -07:00
Sandeep Puligilla
e64099d67f qcacld-3.0: Don't serialize IPA stats request
SME queue is getting overflow due to IPA
stats request which gets posted at every 100ms.

Don't process IPA stats request in cds thread
context instead call wma API in the worker thread
context.

Change-Id: Id1ae20a1256ecd7ee43c2e3ebf50a14dc22e6714
CRs-Fixed: 2047462
2017-06-30 15:50:19 -07:00
Naveen Rawat
8029a40b49 qcacld-3.0: Update beacon template from sme update config API
Currently sme_update_ht_config only update csr_session and sends updated
params to FW via VDEV_PARAM command. Same is not reflected in pe_session
and beacon template. Update beacon params in LIM by sending param update
message to LIM.

Change-Id: I1f926b4d2d5467c7702e03ff281879529c89f6f5
CRs-Fixed: 2055347
2017-06-29 19:45:42 -07:00
lifeng
21b7b8bd49 qcacld-3.0: Change ssidHidden variable type as tHiddenssId enum
Change ssidHidden variable type as tHiddenssId enum instead of
original boolean type in tagCsrSSIDInfo structure to backup the
value from hdd (eg: eHIDDEN_SSID_NOT_IN_USE, eHIDDEN_SSID_ZERO_LEN,
eHIDDEN_SSID_ZERO_CONTENTS).

Change-Id: Ibc88c80856984b1b61e2fbe489219b391900dad3
CRs-Fixed: 2065342
2017-06-29 19:45:39 -07:00
Krunal Soni
c3c8b8b34f qcacld-3.0: Add NULL check before passing VDEV object
VDEV object has not been checked against NULL value before passing as
part of message to a next layer

CRs-Fixed: 2063561
Change-Id: I9c7ad08f1e201779cb433044a1525555a2ccaa34
2017-06-29 19:06:00 -07:00
Jeff Johnson
6136fb90e2 qcacld-3.0: Add WMA FIPS infrastructure
As part of the support for the FIPS certification feature add the
WMA infrastructure.

Change-Id: I7e113cee8ba9a08c2efd1141bef84e43d530cdcb
CRs-Fixed: 2065002
2017-06-29 19:05:56 -07:00
Will Huang
03b54ee905 qcacld-3.0: Avoid using pointer without NULL check
Fix static analyze issues which cause is may dereference NULL
pointer, adding NULL pointer check or using already checked pointer.

Change-Id: Ib3a1f5214da839cd2bec4ffee16e0809095fa513
CRs-Fixed: 2058073
2017-06-29 18:25:31 -07:00
Ravi Kumar Bokka
05c14e5c50 qcacld-3.0: Auto Detect SoC Power Collapse Failure changes
Add host support for detecting SOC power collapse failures in FW and
communicating the same to framework.

Change-Id: Icee39c896802c4d7136e0b8ef442a33feeb4799c
CRs-Fixed: 1112979
2017-06-27 22:13:09 -07:00
Deepak Dhamdhere
828f189328 qcacld-3.0: Add support for PMKID modes of PMK caching and OKC
Convert the boolean variables used for tracking okc_enable into
separate bit flags for OKC and PMK caching. Firmware will also
add support for bitwise enablement of OKC and PMK caching in 802.11i
configuration part of RSO command.

CRs-Fixed: 2004963
Change-Id: Ib2fcdc6318adb488eca5cf47b2b59541020e6009
2017-06-26 11:58:01 -07:00
lifeng
66831666b4 qcacld-3.0: Add vendor attr to get rx aggregation statistics
qcacld-2.0 to qcacld-3.0 propagation

By setting the corresponding parameters: reorder timeout and window size
to FW, the host will deliver information about aggregation of the packets
on RX to upper layer.

Change-Id: I404d56d8d9ca3e90f8d1dee28abd80d784924901
CRs-fixed: 1078111
2017-06-23 13:42:16 -07:00
Srinivas Girigowda
af0173e171 qcacld-3.0: Fix compile warnings and reduce log levels
Fix compile warnings and reduce log levels.

Change-Id: Ic4ed8c3f46da2ae1514e2bd6792638b62f7f2397
CRs-Fixed: 2024274
2017-06-22 13:37:56 -07:00
Naveen Rawat
c921c7b2cc qcacld-3.0: Add check for set_ft_ies buffer length
Add check for buffer length in function sme_set_ft_ies.

Change-Id: I7adc56e23316c0ceb193a5bdf8c4c0b5f4fbd20a
CRs-Fixed: 2055659
2017-06-22 13:37:55 -07:00
Selvaraj, Sridhar
0641fabce5 qcacld-3.0: Add INI to configure min rssi for roamable AP in PER Roam
Add INI "gper_min_rssi_threshold_for_roam" to configure the minimum
RSSI required for AP candidate to roam in PER based roaming.

Change-Id: I5549c44d2dffb20e92923d3b62e08b94b7a87c9d
CRs-Fixed: 2048414
2017-06-22 03:58:05 -07:00
Selvaraj, Sridhar
81ab80dfb1 qcacld-3.0: Keep bssDescription at the end of tSirSmeJoinReq struct
Move bssDescription to the end of tSirSmeJoinReq since bssDescription
has ieFields at its end which would be corrupted if we dont keep it
at the end of bssDescription. This results in not detecting the IE's
properly after assoc response processing, not setting wpa_rsn flag
in PEER_ASSOC_CMD to fw. The subsequent LFR3 roam if happens in fw
fails because of this.

Keep bssDescription at the end of tSirSmeJoinReq struct and other
structs where bssDescription is used.

Change-Id: I7096f7da0a475b0c63078f3c77fba240a41dfb00
CRs-Fixed: 2058223
2017-06-21 22:33:33 -07:00
Ajit Pal Singh
64aff0c8a9 qcacld-3.0: Reject connection if channel not ok for DNBS
Reject connection in csr_roam_connect(), if the BSS entry selected
from the driver cached scan results, has a channel which is not OK for
Do_Not_Break_Stream.

Change-Id: Icf725361382bff7dad80138cfc1b51bafa548afa
CRs-Fixed: 2064380
2017-06-21 21:31:34 -07:00
Sandeep Puligilla
994f620e23 qcacld-3.0: Cleanup legacy scan in SAP module
Cleanup legacy scan code in the SAP module.

Change-Id: Ifdb2575727c5c52a2b09c03d8bde43e5fd8fb910
CRs-Fixed: 2063667
2017-06-21 05:56:13 -07:00
Krishna Kumaar Natarajan
b9e1d71b3f qcacld-3.0: Use CDP API in sme_open_session
Use CDP API in sme_open_session() instead of ol_txrx API.
Using ol_txrx API will lead to unexpected behavior.

Change-Id: I7012fd1904c730fb1074c262cb096d0cd8c20362
CRs-Fixed: 2064278
2017-06-21 03:41:53 -07:00
Abhishek Singh
533c9da880 qcacld-3.0: Wait for roam to get stopped during disconnect
In case roaming was in progress when hdd_disconnect was called, avoid
defer disconnect as that will call hdd api in mcthread which waits on
event for about 5 seconds thus blocking everything. Also defer disconnect
makes supplicant and driver state go out of sync. Rather wait in hdd
for roaming to complete and then issue disconnect keeping state simple
and clean

Change-Id: I1b971226187892f32eb493047c13353bb0d1c867
CRs-Fixed: 2042394
2017-06-20 16:17:39 -07:00
Abhishek Singh
154637ac11 qcacld-3.0: Post Set key with high priority to lim
If pe queue contain management frame and set key cmd is sent as low
priority the set key may timeout.

Thus to fix this post set key with high priority to lim,
so that it can be processed in priority.

Change-Id: I31e346da6662ab56f268f94260ed0f169b8f182b
CRs-Fixed: 2056378
2017-06-20 05:05:59 -07:00
Naveen Rawat
5c35ae4ee4 qcacld-3.0: Send ROAM_SCAN_OFFLOAD_STOP to FW directly from HDD
In case user space disconnects, directly send ROAM_SCAN_OFFLOAD_STOP to FW
to avoid delays in queues.

Change-Id: Ia6e458617818da5ad2e956cd30a203652949db21
CRs-Fixed: 2035160
2017-06-20 03:30:37 -07:00
Kiran Kumar Lokere
7855ee8342 qcacld-3.0: Remove QDF assert for non critical errors
Remove the QDF asserts for qos related errors

Change-Id: I61b99f291b305c5905d544f0062a12734a5ea368
CRs-Fixed: 2054327
2017-06-19 22:30:31 -07:00
Kiran Kumar Lokere
ef93ee97d7 qcacld-3.0: Remove qdf assert for non critical errors
Remove qdf assert for non critical errors in qos.

Change-Id: I20319bac0bdd268d2d46ce7859fd41e8fdc8f5f5
CRs-Fixed: 2044770
2017-06-19 20:10:44 -07:00
Kiran Kumar Lokere
26d0548b73 qcacld-3.0: Disable MU beamformee in master mode operation
Do not advertise MU beamformee capability in SAP, P2P GO and IBSS
operating modes.

Change-Id: Iee6ecaaddef374c9954c5144107bcce9da48c001
CRs-Fixed: 2048653
2017-06-15 12:56:03 -07:00
Sandeep Puligilla
f587adff92 qcacld-3.0: Serialize IPA stats command in low priority queue
Currently IPA stats command request gets scheduled at every
100ms and posts message to WMA queue which can cause MC
thread to prioritize these request messages over other
messages in pe queue. This can cause delayed processing of
association related messages in pe queue in noisy environement.

To avoid this serialize IPA stats cmd to lower priority SME queue.

Change-Id: I1f8257b869dacd65a61e52e34f001ee24c108c4a
CRs-Fixed: 2040579
2017-06-14 15:53:45 -07:00
lifeng
e9245fcedb qcacld-3.0: Update the supported rates when channel switching
qcacld-2.0 to qcacld-3.0 propagation

Fix the regression issue introduced by
commit 329c3375edfcf5c434ed57fdec5dd27229611d8a.
The supported rates are populated by hostapd per the pre-defined
hw_mode in conf file.
Obviously the supported rates won't update althought cross-band
switching from 2G to 5G, then the sap will reject any sta who
intends to join the bss.

The Fix now is to populate the intersection of rates generated by
hostapd and driver itself.

Change-Id: Ica336398865a8b5e16297e4555dbb7de5e79567e
CRs-fixed: 1109564
2017-06-14 11:56:36 -07:00
Nitesh Shah
f9a09ff89a qcacld-3.0: Send DBS Scan selection policy command to WMI
This change address sending DBS Scan selection policy command
to WMI.

Change-Id: I0117845ac28e3ca8977eefc09b738a79181b4115
CRs-Fixed: 2029280
2017-06-14 08:23:57 -07:00
Naveen Rawat
257386f1ea qcacld-3.0: Add lockless API for csr roam_sycn callback
CSR API for roam_sync callback acquires SME lock for its operation and
have multiple exit points. This creates risk of missing on releasing lock.
This change acquires and releases lock once in csr_roam_synch_callback and
add a lock less API that does logic handling.

Change-Id: Ifab0a8cce4b0746364ddbde44347d497999cc821
CRs-Fixed: 2048614
2017-06-14 02:28:33 -07:00
Arif Hussain
ee6770181e qcacld-3.0: Avoid session and peer with same MAC address
vdev create request with selfMAC address matching to any of the peer MAC
address cause crash in firmware, So before creating new session/peer
make sure that there is no peer/session with same MAC address.

Change-Id: I7be415365ab7112b013b478139deb451863d52d8
CRs-Fixed: 1115373
2017-06-14 00:58:37 -07:00
Selvaraj, Sridhar
64b0a9ce71 qcacld-3.0: Update channel info if not provided in FASTREASSOC command
Currently, driver is rejecting the FASTREASSOC command if the channel
is not provided as part of it (or) channel is given as zero.

Update channel from BSS description of the given BSS and honour
the FASTREASSOC command even if the channel is given zero.

Change-Id: Ie67a75fb7ccf470b95454842b7f46baa9b09d54c
CRs-Fixed: 2046547
2017-06-13 23:31:04 -07:00
Sandeep Puligilla
b0e017c581 qcacld-3.0: Free the csr profile after connection
Free the CSR profile after successful connection.

Change-Id: I710ce0fae904db9d597590ce9860ca38fc5f7a34
CRs-Fixed: 2059336
2017-06-12 15:24:22 -07:00