Commit Graph

389 Commits

Author SHA1 Message Date
Srinivas Girigowda
96d68d3eee qcacld-3.0: Remove obsolete struct sSirPsReqData
Remove obsolete struct sSirPsReqData.

Change-Id: I262fcd2e9e5a7258bc516533f1bafe6a54011065
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
9dc32cfb0f qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirLPHBTcpParamStruct
Replace tSirMacAddr with cdf_mac_addr in sSirLPHBTcpParamStruct

Change-Id: I55cbe3c441c2b1540e946e52c815bc5518935964
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
9eddfdaf4c qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirLPHBUdpParamStruct
Replace tSirMacAddr with cdf_mac_addr in sSirLPHBUdpParamStruct

Change-Id: I6439494feb18824cc9054c66ae426646c055f3d4
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
afede1885a qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirRateUpdateInd
Replace tSirMacAddr with cdf_mac_addr in sSirRateUpdateInd.

Change-Id: I28dc76e07721f6472bbc1ec5c107cd12b2123a8f
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
34b634c4d5 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirModifyIE
Replace tSirMacAddr with cdf_mac_addr in sSirModifyIE.

Change-Id: I36783326eb35bd6c9c4987ae0655b0313f398886
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
8b98396253 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirUpdateIE
Replace tSirMacAddr with cdf_mac_addr in sSirUpdateIE.

Change-Id: Id190e74be5063ecd7792380c6f25ba8de1461c51
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
0f09f999bd qcacld-3.0: Find extscan_in_progress irrespective of connected or pno
This is a qcacld-2.0 to qcacld-3.0 propagation.

The problem with the current code is we are finding whether connected or
pno_in_progress or extscan_in_progress in the same for loop and whenever
one of them matches, we break out of loop. It makes sense to keep
connected flag and pno_in_progress inside the for loop because both are
mutually exclusive. But same is not the case with extscan_in_progress,
this flag can be set to true or false irrespective of connected or
pno_in_progress.

Hence the fix is to move finding extscan_in_progress to a separate for loop.

Change-Id: Ie72ff7f7382adaea5626c0808a206d18c2916e0d
CRs-Fixed: 899322
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
a4db76f1f2 qcacld-3.0: Cleanup WOW_NLO_SCAN_COMPLETE_EVENT
This is a qcacld-2.0 to qcacld-3.0 propagation.

Currently WOW_NLO_SCAN_COMPLETE_EVENT is enabled on receiving
PNO match found event, but it is never cleared.
This is causing regular host wake ups with the reason
WOW_REASON_NLO_SCAN_COMPLETE even if pno match is not found in the
next successive iterations.

Fix this by enabling/disabling WOW_NLO_SCAN_COMPLETE_EVENT before suspend
based on the flag pno match is found.

Change-Id: I21d73de0c03e0c09b5a91a521d848e71eaf359e0
CRs-Fixed: 888964
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
e80cea9353 qcacld-3.0: Add support for wakeable NLO_SCAN_COMPLETE_EVENT
This is a qcacld-2.0 to qcacld-3.0 propagation.

With RunTime PM feature enabled, after receiving the PNO matched event
RunTime PM puts the host back in WoW suspend after 500ms (default).
Since WMI_NLO_SCAN_COMPLETE_EVENTID is not a wakeable event, this event
does not wakeup the host hence PNO scan not completed and PNO is broken.

Fix this by making NLO_SCAN_COMPLETE_EVENT a wakeable event.
Host driver configures this WoW event only after PNO match is received.

Change-Id: I81cccc86942fc75bc63235038c50ba6edb0fee8b
CRs-Fixed: 884211
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
f2599dd3c6 qcacld-3.0: WLAN logs cleanup
This is a qcacld-2.0 to qcacld-3.0 propagation.

1. Add log to print ssid, bssid, rssi, channel and country code
   while connecting to an AP.
2. Add log to print disconnect reason when disconnect request is
   received from user space.
3. Cleanup some of the logs moving it to appropriate log level
   which are showing up as ERROR level in bug report.

Change-Id: Id8ea69a14a18565c226f89a8a5e10be46741d76d
CRs-Fixed: 914336
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
ba3091c366 qcacld-3.0: Increase MAX_CFG_INI_ITEMS to 1024
This is a qcacld-2.0 to qcacld-3.0 propagation.

Increase the maximum config ini items from 512 to 1024.

Change-Id: I5c4958d5c743f1e0b03a4f7b41e21ff9787ccd07
CRs-Fixed: 914336
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
117e7fbb09 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sir_ocb_config_channel
Replace tSirMacAddr with cdf_mac_addr in struct sir_ocb_config_channel.

Change-Id: I0f22ba3b3b63f8d56d3285522c0d8d1303e2f89c
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
296105aaad qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sAniDHCPStopInd
Replace tSirMacAddr with cdf_mac_addr in sAniDHCPStopInd.

Change-Id: I56dfa86947e9711c8727d4e3d025f0f03fc39d3c
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
4962a56771 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sAniGetTsmStatsReq
Replace tSirMacAddr with cdf_mac_addr in sAniGetTsmStatsReq.

Change-Id: I1f98fdfdaddf79af848c927d1443dcf6e52bcb54
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
37c133b074 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeMicFailureInd
Replace tSirMacAddr with cdf_mac_addr in sSirSmeMicFailureInd.

Change-Id: I65371e094fc8fb02a400960aca192b5bf7034413
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
c8b79e4170 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeTkipCntrMeasReq
Replace tSirMacAddr with cdf_mac_addr in sSirSmeTkipCntrMeasReq.

Change-Id: I404f7b7976b8d3096e9a8963710a019e8671b1fe
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
a1f8bac49b qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeWmStatusChangeNtf
Replace tSirMacAddr with cdf_mac_addr in sSirSmeWmStatusChangeNtf.

Change-Id: I13de201aa76556db36f256066482104d2ffb34ef
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
40567b94a1 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirResetAPCapsChange
Replace tSirMacAddr with cdf_mac_addr in sSirResetAPCapsChange.

Change-Id: Ife3e49f1902baafaddf5f304dd423451319f2783
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
26ebb19c31 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeApNewCaps
Replace tSirMacAddr with cdf_mac_addr in sSirSmeApNewCaps.

Change-Id: I785b2631e149e44835e2cf53d997673b9c5515c0
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
065e777947 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeNewBssInfo
Replace tSirMacAddr with cdf_mac_addr in sSirSmeNewBssInfo.

Change-Id: I5c27589009ee2f517c8a99ed0909c8cb5620293e
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Srinivas Girigowda
0ee6686841 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sLimMlmOemDataReq
Replace tSirMacAddr with cdf_mac_addr in sLimMlmOemDataReq.

Change-Id: I4589769f9d875347a4a5c10cd755c931b98fa8f7
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Srinivas Girigowda
fd06152abe qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirNewIbssPeerInfo
Replace tSirMacAddr with cdf_mac_addr in sSirNewIbssPeerInfo.

Change-Id: I16cf3439fba77755429627baa26b5f87988cd81e
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Srinivas Girigowda
9721523f8e qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sMaxTxPowerParams
Replace tSirMacAddr with cdf_mac_addr in sMaxTxPowerParams.

Change-Id: Ia9f66cfd3a520019a83d671b7869d49558856698
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Srinivas Girigowda
2c6bf00570 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeScanReq
Replace tSirMacAddr with cdf_mac_addr in sSirSmeScanReq.

Change-Id: I805e32462c89d72bd8a038eaef0379f7b58b33c3
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Srinivas Girigowda
a5bf543104 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirScanOffloadReq
Replace tSirMacAddr with cdf_mac_addr in sSirScanOffloadReq.

Change-Id: Ia42f230491b0500f612c983c5769401249b6d961
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Srinivas Girigowda
450f716e48 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirRemainOnChnReq
Replace tSirMacAddr with cdf_mac_addr in sSirRemainOnChnReq.

Change-Id: I75594fc51ae1a82ef08b3e0b43c2a8733387b9af
CRs-Fixed: 898864
2015-12-02 12:55:28 -08:00
Rajeev Kumar
1a65e5801e qcacld-3.0: Fix agc registers dump logic to avoid fw assert
Propagation from qcacld-2.0 to qcacld-3.0

- Current AGC registers dump logic is not correct and its not
  reading correct target registers
- Add correct AGC register read recipe to read correct AGC data
- Wake up SoC before reading any target register

Change-Id: I38016f91bf3d124e93e304522058e97daa711f4a
CRs-Fixed: 911554
2015-12-02 12:55:28 -08:00
Rajeev Kumar
274034cd12 qcacld-3.0: Do not allow NoA setting in non P2P GO mode
Propagation from qcacld-2.0 to qcacld-3.0

- FW asserts after receiving P2P NOA parameter in non P2P GO mode
- Add P2P GO mode check in set NOA IOCTL and do not allow this command
  in non P2P GO modes

Change-Id: Ie786dcf33fc50eacadb407d74ae5638da68cf0d2
CRs-Fixed: 919889
2015-12-02 12:55:28 -08:00
Chandrasekaran, Manishekar
c841692ae4 qcacld-3.0: Restore service ready extended event
Restore the support for service ready extended
event since the required FW support is in place.
Without the service ready extended event, the
FW mode configuration and scan mode
configuration in the driver would be initialized
to zero i.e., all the dual mac features would
be disabled. Otherwise, the default values of
these two params would be set based on the
default values present in this extended event,
which is set by the FW.

CRs-Fixed: 923182
Change-Id: I31aa6420f3076f61008a809fe134b99f9b0dbc08
2015-12-02 12:55:28 -08:00
Sandeep Puligilla
4f1ae707e7 qcacld-3.0: unlock the sme scan active list
Sme is stuck due to scan active list mutex lock.

Release the sme scan active list lock if the
active list is empty.

Change-Id: Id05c642fe6fad30e40efa18a213158c331b5a502
CRs-Fixed: 943583
2015-12-02 12:55:28 -08:00
Edhar, Mahesh Kumar
5cd1e0eb17 qcacld-3.0: Changes to add supported operating class IE
qcacld-2.0 to qcacld-3.0 propagation

Add supported class IE in beacon and probe response frames.

Change-Id: Ife4cb1b3db0119a9472cad0f861887c487b147d3
CRs-Fixed: 941466
2015-12-02 12:55:28 -08:00
Edhar, Mahesh Kumar
695468e069 qcacld-3.0: Protect dfs_radar_found global variable using lock
qcacld-2.0 to qcacld-3.0 propagation

dfs_radar_found variable will be accessed in different context
so protect the same with mutex lock and synchronize the channel
switch triggered by application and dfs module.

Change-Id: I724d22cde9a77c187a17dffef13a9b4c9b2c27da
CRs-Fixed: 809527
2015-12-02 12:55:27 -08:00
Edhar, Mahesh Kumar
df2ec12f48 qcacld-3.0: Properly handle channel switch through ioctl
qcacld-2.0 to qcacld-3.0 propagation.

1)Validate channel switch w.r.t concurrency rules set and switch
  channel only if there is no channel interference.
2)Disable channel bonding in 2.4Ghz on switching channel to 2.4Ghz band
  to avoid violating OBSS feature.

Change-Id: I81992b2c2876a32eba52010e72c4300608067e58
CRs-Fixed: 809527
2015-12-02 12:55:27 -08:00
DARAM SUDHA
6d0ea36ace qcacld-3.0: debug check for l_rx_defrag_waitlist_remove(2)
qcacld-2.0 to qcacld-3.0 propagation

Add extra check for tqe->next!= NULL, to assert in only error scenario

Change-Id: I12e8ca5d5133ee0480d9c7c7c208854630272c89
CRs-Fixed: 839312
2015-12-02 12:55:27 -08:00
Leo Chang
376398b24d qcacld-3.0: optimize data path memory allocation
When allocate HTT descriptor, instead of allocating
large single chunk of memory, allocate small sized multiple
chunk of memory. Then not need to allocate order 5 memory.
Will have less chance to have memory alloc fail problem.
HTT descriptor. Frag descriptor. OL descriptor. TSO descriptor

Change-Id: Ib9d4a3f10adbc0656e1418cf3a67429322bb7164
CRs-fixed: 845666
2015-12-02 12:55:27 -08:00
Leo Chang
0cda893fd6 qcacld-3.0: qcacld-2.0: replace semaphore to completion
qcacld-2.0 to qcacld-3.0 propagation

HTC RX event wait semaphore waiting event infinte.
Infinte waiting will hang device and cannot getting out from
system hang. To collect FW RAM dump and make correct panic,
semaphore should be replaced with time limitted compeletion

Change-Id: Idabfc7916676c9e986e953b50108653a5b394278
CRs-fixed: 924387
2015-12-02 12:55:27 -08:00
Satish Singh
884eaee246 Release 5.0.0.146
Release 5.0.0.146

Change-Id: Iaf2bfeee2b5ca2b66165808d9a69ecd2472a09cd
CRs-Fixed: 688141
2015-11-25 17:28:47 -08:00
Sachin Ahuja
a557a00a74 qcacld-3.0: Increase the rate array for extended rate set.
qcacld-2.0 to qcacld-3.0 propagation

Currently while populating ext rate set, local rate array
has size as 8.But max 12 ext rates can be copied in this
local rate array.If it is greater than 8, then it leads
to crash.
To resolve this issue, increase the local rate array from
8 to 12.

Change-Id: I2097cc4feb7fa669a970de5463130bb4bbf6401c
CRs-Fixed: 903816
2015-11-25 17:26:48 -08:00
Sachin Ahuja
bef8c10a92 qcacld-3.0: Avoid sending positive RSSI value to framework.
qcacld-2.0 to qcacld-3.0 propagation

Currently if STA is very near to connected AP, it sends the
positive value of RSSI to framework. Framework checks this RSSI
and if positive(greater than 0) then it consider RSSI as -127dbm
which may lead to disconnection.
So changes are done to avoid sending the positive RSSI value
greater than 0.

Change-Id: Ib417f48345e3f78dba54d68969fa15d294f313b9
CRs-Fixed: 842243
2015-11-25 17:26:48 -08:00
Sushant Kaushik
90ed9e3bb9 qcacld-3.0: Allow addTspec in 11b mode.
qcacld-2.0 to qcacld-3.0 propagation

Currently if sta is connected to an AP
which only supports 11b, lim doesn't send
addTspec request to that AP. Specs doesn't
restrict Tspec in 11b. As a part of fix,
allow addTspec in 11b.

CRs-Fixed: 847755
Change-Id: I57c2d5139f9861140ab3bbe8314a1a3fe3e80e19
2015-11-25 17:26:48 -08:00
Orhan K AKYILDIZ
c409461034 cld-3.0: Remove warnings issued by static analysis
Some of these are very remote scenarios (like HIF not being
initialized at the time of the calls, which could then
dereference a NULL pointer). There are a few cases of looping
beyond boundaries.

The scope of this update is limited to NAPI related code.

Change-Id: I60229406d5ab514d5465ef2569324d3d4eb430d4
CRs-Fixed: 938253
2015-11-25 17:26:48 -08:00
Chandrasekaran, Manishekar
96c9096523 qcacld-3.0: Fix channel width assignment to improper enum value
Fix the channel width of type 'enum hw_mode_bandwidth' getting
wrongly assigned to enum of type 'tSirWifiChannelWidth'. The
tag values of each of these enums are different.

CRs-Fixed: 942090
Change-Id: Ic3610e6fcb7c89f0aeed829b83869169f4596ce8
2015-11-25 17:26:48 -08:00
mukul sharma
72c8b22a2d qcacld-3.0: Add support for 11w offload feature
This change Adds 11w offload feature, This change includes:

1. SA Query time out Kickout reason handling
2. Add a new service bit map for 11w offload and cache it to pMAc
3. Error logging in following unexpected case
   a) Unprotected deauth / diasssoc from peer AP,
   b) reception of SA query action frame in SAP / STA vde mode
4. Configure sta sa query related parameters as a part of
   sta vdev attach
5. Trim mmie for pmf bcast/mcast mgmt frames

Change-Id: If119e9a79185552e163834f7c6c3a14288fe2761
CRs-Fixed: 931630
2015-11-25 17:26:48 -08:00
Sanjay Devnani
a64b512a9e qcacld-3.0: Check if unload is in progress during suspend
If unload in progress, abort suspend. causes null pointer ref otherwise

Change-Id: I7028b6f0efc9da62352b561e9def90ff9bffd5e6
CRs-Fixed: 878755
2015-11-25 17:26:47 -08:00
Sreelakshmi Konamki
6bd8a2e02b qcacld-3.0: Remove redundant code in __wlan_hdd_cfg80211_connect()
qcacld-2.0 to qcacld-3.0 propagation

Make changes to invoke wlan_hdd_cfg80211_connect_start() one time instead
of two instances of invoking the same function using local variables.

Change-Id: I2aba87645296414f340c89b6bd2f556b05f05115
CRs-Fixed: 898565
2015-11-25 17:26:47 -08:00
Hanumantha Reddy Pothula
2db50edd69 qcacld-3.0: wlan: Cleanup North-Bound load/unload logs
qcacld-2.0 to qcacld-3.0 propagation

If IOCTLs or CFG callbacks are issued continuously during driver
load/unload or during SSR, observing stability issues because of
excessive logging.
Hence move log level to INFO from ERROR in wlan_hdd_validate_context
function and don't print return status in its caller functions.

Change-Id: I8fd9b25e0c774e1e12b01128eb86783c9dec2ab7
CRs-Fixed: 800631
2015-11-25 17:26:47 -08:00
Sreelakshmi Konamki
75deb33157 qcacld-3.0: Add DS param IE in probe req frame
qcacld-2.0 to qcacld-3.0 propagation

Currently DS param IE is not present in probe req frames.
Set bit11 in scan_ctrl_flags to add DS param IE in probe req.

Change-Id: I57f79bd6dc5bd452987cb7d09cafa425ea2bbff4
CRs-Fixed: 905421
2015-11-25 17:26:47 -08:00
Sreelakshmi Konamki
6744cffe00 qcacld-3.0: Add MTRACE logs for missing cfg80211_ops callbacks
qcacld-2.0 to qcacld-3.0 propagation

Currently, MTRACE logs are not captured for few cfg80211_ops callbacks
and SME functions. Add missing MTRACE logs in cfg80211_ops callbacks
before calling SME function and also in few SME functions.

Change-Id: Iced4b80de60f9640cad0342afac57f9a17c2a3e2
CRs-Fixed: 859961
2015-11-25 17:26:47 -08:00
Sreelakshmi Konamki
6f3a865a2b qcacld-3.0: wlan: Remove redundant validation of pAdapter
qcacld-2.0 to qcacld-3.0 propagation

Validation of pAdapter done in starting of hdd_smeRoamCallback().
Remove redundant pAdapter validation under flag eCSR_ROAM_SESSION_OPENED.

Change-Id: I1619bc929e484a60a930779a2acae071a710453a
CRs-Fixed: 898391
2015-11-25 17:26:47 -08:00
Sreelakshmi Konamki
32eadb109e qcacld-3.0: wlan: Deregister all the peers from TL during IBSS leave
qcacld-2.0 to qcacld-3.0 propagation

If user change the BSSID/SSID and restart the IBSS network, during
IBSS leave the driver deletes only the 1st peer and all other
entries are not deleted. Now when the IBSS restarts and try to
register a sta with the staID which is already present in the
stale entries, the registeration fails and thus the BSSID values
in TL are not updated for all these stale peers. Due to this the
data to these peers uses the old BSSID.
This change take care of Deregistering all the active IBSS peers
during IBSS leave.

Change-Id: Id1ce0ffd880b8c2c8afd46414a59ba7bb87d5b6f
CRs-Fixed: 841565
2015-11-25 17:26:47 -08:00
Sreelakshmi Konamki
945541391b qcacld-3.0: remove misprint in ol_txrx_peer_find_add_id()
qcacld-2.0 to qcacld-3.0 propagation

During create peer, 'delete peer' print is coming from
ol_txrx_peer_find_add_id(). Peer deletion is not happened when
ol_txrx_peer_find_add_id() calls ol_txrx_peer_unref_delete().
Actual peer deletion is happening in ol_rx_peer_unmap_handler().
So, remove 'delete peer' print in ol_txrx_peer_find_add_id().

Change-Id: If37a573f6ff734743c3901b96c7134c81b35e4c7
CRs-Fixed: 902463
2015-11-25 17:26:47 -08:00
Nirav Shah
3650780ece qcacld-3.0: Do not lock to free all packets to avoid watchdog bark
Propagation from qcacld-2.0 to qcacld-3.0

Do not take single lock to free all TLSHIM packets
to avoid watchdog bark during driver unload.

CRs-Fixed: 934555
Change-Id: Iebfb449bd8174bc27207d33073c84a8f11d6e490
2015-11-25 17:26:47 -08:00
Hanumantha Reddy Pothula
616dfbe6fc qcacld-3.0: Update MCS index appropriately
qcacld-2.0 to qcacld-3.0 propagation

When AP is configured with MCS index less than 4(43Mbps) then Host
reports invalid MCS Index to upper-layer, leading to display invalid
link speed on GUI.
Updating MCS index with valid value and thereby updating correct MCS
index to upper-layer

Change-Id: Ibd1503be3825c879b7fa52bdfb6ff07423c39023
CRs-Fixed: 855022
2015-11-25 17:26:46 -08:00
Hanumantha Reddy Pothula
5090805f15 qcacld-3.0: Return NULL if zero is passed as argument to allocate memory
qcacld-2.0 to qcacld-3.0 propagation

While allocating memory if zero is passed as argument then kernel will
return address ZERO_SIZE_PTR(0x10) leading to pass NULL check, which is
usually done after every memory allocation. Hence when zero is passed to
allocate memory then return NULL without calling kmalloc.
While initializing neighbor roam data structure, don't allocate memory
if neighbor roam channel list is empty.

Change-Id: I50bdb99a0cd8ccbc2d764b8ac21f66bba8a8fdc4
CRs-Fixed: 815664
2015-11-25 17:26:46 -08:00
Hanumantha Reddy Pothula
3b8c0a5ba8 qcacld-3.0: Check priviledge permission for SET_CHANNEL_RANGE
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing SET_CHANNEL_RANGE IOCTL,
making sure user task has right permission to process the command.

Change-Id: I48bcd55bee45203667bcc679db4ad96aa9e04b7c
CRs-Fixed: 930555
2015-11-25 17:26:46 -08:00
Govind Singh
e55e699ade qcacld-3.0: Fix static code analysis errors
qcacld-2.0 to qcacld-3.0 propagation

Updated the wma, htt modules to address the
issues reported by static code analysis.

CRs-Fixed: 933728
Change-Id: I3437f7d9a12475f4a854412d9f34f48ed7553848
2015-11-25 17:26:46 -08:00
Govind Singh
f139e83f8e qcacld-3.0: clean up of ERROR logs
qcacld-2.0 to qcacld-3.0 propagation

Misleading error logs are removed
as part of this fix

CRs-Fixed: 929840
Change-Id: Ifdc10b79359863a4f3c2009403ee5f6c7ab18110
2015-11-25 17:26:46 -08:00
Xun Luo
a858a47ead qcacld-3.0: clear WMI work queue before bus context destruction
qcacld-2.0 to qcacld-3.0 propagation

All WMI work queue should be cleared and processing stopped before
bus context destruction. This change enforces this rule.

Change-Id: I2e12f3f08424f718ec66fe257060ce13de17ee4e
CRs-Fixed: 840422
2015-11-25 17:26:46 -08:00
Houston Hoffman
4c9607b607 qcacld-3.0: Bypass hif_completion_thread in fw event
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.

Change-Id: I73b8518d87645d827814cd1345eb68370de30d1f
CRs-Fixed: 941358
2015-11-25 17:26:46 -08:00
Houston Hoffman
bada641804 qcacld-3.0: Bypass hif_completion_thread in send
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.

Change-Id: I19660327ebb4a3cbb9908ce562ab6c72a6282e95
CRs-Fixed: 941358
2015-11-25 17:26:46 -08:00
Himanshu Agarwal
94045e429d qcacld-3.0: Fix static code analysis errors
Propagation from qcacld-2.0 to qcacld-3.0

Updated the wma, pe module to address the issues reported by static code
analysis.

Change-Id: I8666adf161225014108c189cbcffced9450ae0c4
CRs-Fixed: 889019
2015-11-25 17:26:46 -08:00
Karthick S
7a17a71bb0 qcacld-3.0: Free protection_fields_reset_timer
qcacld-2.0 to qcacld-3.0 propagation

Free protection_fields_reset_timer in the beginning of peDeleteSession
function to avoid the null defreference caused due to the race condition
between peDeleteSession and pe_reset_protection_callback.

Change-Id: I1b83977bb3683d6dd87ec94a992ac51f39cd97db
CRs-Fixed: 815796
2015-11-25 17:26:46 -08:00
Karthick S
cbb555aa3f qcacld-3.0: Stop HIF service before HTC cleanup
HIFStart is called from HTCWaitTarget in the vos_open function. If
vos_open fails later, the HIFStop is not called to cleanup what is done
in the HIFStart. This change fixes this issue.

qcacld-2.0 to qcacld-3.0 propagation

Git-commit:98808985fb6037c6f33af396aae38224f91c8b4d

Change-Id: Id30f41d953e4582db57a98fff14e3f68447239f1
CRs-Fixed: 831608
2015-11-25 17:26:46 -08:00
Mukul Sharma
f8511dcee4 qcacld-3.0: Avoid SSR injection when driver load is in progress
Propagation qcacld-2.0 to qcacld-3.0

Host avoid SSR injection ioctl using hdd->isLoadInProgress,
But ol_target_failure handler checks for the
cds_set_load_unload_in_progress. As these two flags are not
set back to back so there is possible time window in which
SSR ioctl is allowed but ol target failure handling is not
allowed.

Change-Id: Ib97d3693f82f6ca94fa048a8120786065e99087a
CRs-Fixed: 913741
2015-11-25 17:26:46 -08:00
Karthick S
571df0e4e9 qcacld-3.0: Add NULL sanity check for HTC_HANDLE
qcacld-2.0 to qcacld-3.0 propagation

System crash happened due to accessing NULL pointer in HTCSendPkt.
so added null sanity check to prevent this scenario.

Change-Id: I4c07840eb176847c4a66efc42cd810213e1369b0
CRs-Fixed: 838998
2015-11-25 17:26:45 -08:00
Karthick S
c40696df00 qcacld-3.0: set proc_dir to NULL
qcacld-2.0 to qcacld-3.0 propagation

In athdiag_procfs_remove, set proc_dir to NULL after removing the
directory. This is to avoid trying to remove the directory which is
already removed.

Change-Id: I01526f4b59ccc991d157c1028d4df5904338f182
CRs-Fixed: 868965
2015-11-25 17:26:45 -08:00
Mukul Sharma
156278d9b8 qcacld-3.0: prevent double free of ft pre auth response
Propagation qcacld-2.0 to qcacld-3.0

while processing ft pre auth response, if memory allocation fails
then host is not setting psavedFTPreAuthRsp to null. Later sme is
freeing same memory as freeing pMsg->bodyptr. Hence on next
disconnect, sme_FtReset try to free psavedFTPreAuthRsp which is
already free.
As a part of this fix, host ensure to set psavedFTPreAuthRsp
Null in all cases.

Change-Id: I144786cd4206bf273d2ffa63889af109cd2744dd
CRs-Fixed: 916416
2015-11-25 17:26:45 -08:00
Abhishek Singh
1bdb157ba5 qcacld-3.0: Implement ECSA Action Frame
qcacld-2.0 to qcacld-3.0 propagation

Implement:
1. Send & receive logic of ECSA action frame from P2P-CLI/GO
2. Trigger channel change on P2P GO side once ECSA action frame
   is received by,
  i) Adding CSA & ESCA IE in beacon template and updating FW to
     send it out .
  ii) Notifying supplicant of channel change for P2P GO.

This change include HDD changes

CRs-fixed: 895240
Change-Id: Iea66ddbbb8946443d5e701e3c14b2f33c6bb6bf8
2015-11-25 17:26:45 -08:00
Abhishek Singh
518323d9c0 qcacld-3.0: Implement ECSA Action Frame
qcacld-2.0 to qcacld-3.0 propagation.

Implement:
1. Send & receive logic of ECSA action frame from P2P-CLI/GO
2. Trigger channel change on P2P GO side once ECSA action frame
   is received by,
  i) Adding CSA & ESCA IE in beacon template and updating
     FW to send it out
  ii) Notifying supplicant of channel change for P2P GO.

This change include UMAC changes.

CRs-fixed: 895240
Change-Id: Ie6c9154fb44ec75c699e37aaba660c637869c099
2015-11-25 17:26:45 -08:00
Naveen Rawat
cf7d2d56b0 qcacld-3.0: Allow dwell time for PNO scan control through config.ini
This is qcacld-2.0 to qcacld-3.0 propagation

Currently dwell time for PNO scan is passed as 0 to FW irrespective of
values set in config.ini. This patch allows active/passive dwell time
for PNO scan to be controlled by config.ini param.

Change-Id: I5562ed7e176af04ac8f38aa5af97257b9244cdc1
CRs-Fixed: 922054
2015-11-25 17:26:45 -08:00
Naveen Rawat
318fce978c qcacld-3.0: Allocate for cfg int and str buffer dynamically
This is pass 2 of cfg mechanism enahancement. With this patch cfg int
and cfg str buffer are allocated dynamically so no need to maintain
CFG_STA_IBUF_MAX_SIZE and CFG_STA_SBUF_MAX_SIZE manually.

Change-Id: I0f8cb942e93236546aad9963c9451e0399a251ac
CRs-Fixed: 914157
2015-11-25 17:26:45 -08:00
Naveen Rawat
b4d37620f3 qcacld: Fix layering violation in __wlan_hdd_cfg80211_ocb_start_timing_advert()
This is qcacld-2.0 to qcacld-3.0 propagation

HDD directly calls in to MAC layer function with mac context as one
of the parameters which is a software layering violation.
Fix the issue by introducing a SME api which accepts hal handle as
one of the parameters instead of mac context and call the SME function
from HDD,  which calls the MAC api with correct function parameters.

Change-Id: Iaac4ad7b67b0cb0f7b8b0d08e32904833afad707
CRs-Fixed: 913015
2015-11-25 17:26:45 -08:00
Naveen Rawat
e702e9b12b qcacld-3.0: HT20 Protection Mode
HT_PURE mode indicates either only HT20 STAs are connected
to a HT20 only SAP or HT20/40 STAs are connected to HT20/40
SAP. Otherwise its HT20 protection mode. This patch fixes code
to work accroding to this condition correctly.

Change-Id: Ib431209f5dfc8800d0932752a282c954f0228503
CRs-Fixed: 866447
2015-11-25 17:26:45 -08:00
Naveen Rawat
9e4872aa79 qcacld-3.0: Fix for hidden SSID iwpriv command.
This is qcacld-2.0 to qcacld-3.0 propagation

In lim function to process hidden SSID, current code was treating
SME sessionID as PE sessionID and hence find session entry for that
was failing. This patch fixes this by using correct "find pe session"
API, that finds PE session by using SME session ID.

Change-Id: I72286cd54a41ae9c01bd916bb0156dd3131eb71c
CRs-Fixed: 934870
2015-11-25 17:26:44 -08:00
Satish Singh
7137db3b56 Release 5.0.0.145
Release 5.0.0.145

Change-Id: Ie54534d6ea7b031527ab261ac97025d6728714cd
CRs-Fixed: 688141
2015-11-23 13:09:11 -08:00
Chandrasekaran, Manishekar
49d21a4c88 qcacld-3.0: Reset global saved command to avoid double free
Reset the global saved scan command to avoid double free.
In sme_process_set_hw_mode_resp(), after freeing the local
saved_cmd pointer, the global mac->sme.saved_scan_cmd is
not reset to NULL. This ends up in double free in
csr_scan_complete()->csr_handle_nxt_cmd() where we are
still holding a stale pointer.

CRs-Fixed: 941130
Change-Id: Ibb93b8d8e601936c7996518f21646e2c140cbd20
2015-11-23 13:09:11 -08:00
Ratnam Rachuri
12553c61f6 qcacld-3.0: make non-interruptable wait for Tlshim Rx shutdown
qcacld-2.0 to qcacld-3.0 propagation

replace wait_for_completion_interruptible with wait_for_completion
to do Tlshim Rx shutdown with non-interruptible call.

Change-Id: I09a70fd2818db42401ba2ca91a75244c1f07557e
CRs-Fixed: 820482
2015-11-23 13:09:11 -08:00
Ratnam Rachuri
f47dfdffca qcacld-3.0: Code refactoring in SAP start
qcacld-2.0 to qcacld-3.0 propagation

This fix removes redundant cdf_mem_zero and cdf_mem_copy

Change-Id: I757a2e14358403b7950868fd81d8e58ab3f829df
CRs-Fixed: 796971
2015-11-23 13:09:11 -08:00
Ratnam Rachuri
3c5dd4131d qcacld-3.0: Reduce log level from pr_err to pr_info
qcacld-2.0 to qcacld-3.0 propagation

Reduce log level from pr_err to pr_info to avoid excessive logging
in wlan_queue_logmsg_for_app fn.

Change-Id: I10b728d9fc0c46ca4b4a38a6b060f25cad124207
CRs-Fixed: 840477
2015-11-23 13:09:11 -08:00
Peng Xu
45486ea83e qcacld-3.0: Fix second P2P-GO interface fail to startup issue
For P2P GO + GO concurrency cases, the second P2P GO interface failed
to startup due to the incorrect checkings in the driver code for GO
interface. This fixes the condition checking logic.

Change-Id: I1a8a1b3dd4eed9dd8c824241d7b1759751e53a18
CRs-fixed: 938850
2015-11-23 13:09:11 -08:00
Bhargav Shah
480a90f597 qcacld: Add support to enable/disable logging for all missing modules.
qcacld-2.0 -> qcacld-3.0 propagation

Add support to enable and disable logging for all missing modules
from INI.

Change-Id: I1677a2db48193b1130e0fc07e8bdfc42823d3567
CRs-Fixed: 855168
2015-11-23 13:09:11 -08:00
Bhargav Shah
1efa55ca9d wlan: Fix for redundant TDLS log during scan_done callback
qcacld-2.0 to qcacld-3.0 propagation

In wlan_hdd_tdls_check_bmps(), NULL check for pHddTdlsCtx will be
TRUE if TDLS support is not enabled. This leads to redundant logs,
as this is called for every scan_done callback.
Call wlan_hdd_tdls_scan_done_callback() only when TDLS support is
enabled.

Change-Id: Ice6f8fb1dc64f0669c19a9b5f5ce3d23c8cdc11c
CRs-Fixed: 672099
2015-11-23 13:09:11 -08:00
Yun Park
4cab6ee4be qcacld-3.0: Fix WDI pipe enable failure due to double invoke
qcacld-2.0 to qcacld-3.0 propagation

Fix an issue which enables WDI pipes even when RM resource request
failed,  which will cause to invoke WDI pipe enable twice when RM_
RESOURCE_GRANTED notification arrives later.
Also fixed a possible discrapancy between connected client stat count
and actual  number of connected clients.

Change-Id: Ibb86ef6ada398fcc669e3a894daadc09e6096b0f
CRs-fixed: 927581
2015-11-23 13:09:11 -08:00
Yun Park
f7dc8cd956 qcacld-3.0:IPA-uC: Check IPA pipes are up before disable it when SSR deinit
qcacld-2.0 to qcacld-3.0 propagation

When SSR happens, IPA WDI pipes may not be enabled yet,
so need to check if it up before disable it.

Change-Id: I5ff643fcf9804dc0933105079f0653884f7d63dc
CRs-Fixed: 938605
2015-11-23 13:09:10 -08:00
Yun Park
4d8b60a777 qcacld-3.0: IPA uC: Return EPERM for RM CONS REQ only during unloading
qcacld-2.0 to qcacld-3.0 propagation

Change to return -EINPROGRESS if WLAN unable to grant IPA CONS resource
due to IPA resource loading is in progress.
Return -EPERM only if WLAN unable to grant IPA CONS resource due to
IPA resource unloading is in progress.

Change-Id: Iea4d804d3f81b086e723230fb8eddc7d9561d7d1
CRs-Fixed: 926880
2015-11-23 13:09:10 -08:00
Govind Singh
a471e5e2ad qcacld-3.0: Add FW Profiling support
Add Profiling stats support in HOST driver to
have CPU based profiling for critical data
path functions in FW.

Change-Id: Ib6d4f0b220f622cf304536c8e538d4dc34c6434b
CRs-Fixed: 921950
2015-11-23 13:09:10 -08:00
Govind Singh
b7ab577111 qcacld-3.0: IPv6 packets classification support
Enable classification of IPv6 frames based on the
traffic class field in the IPv6 header.

Change-Id: I4114cb972f61b75da35a225c07f7628d748a744c
CRs-Fixed: 921955
2015-11-23 13:09:10 -08:00
Houston Hoffman
e22977fdc0 qcacld-3.0: Record log timestamp type
Log timestamp can come from Qtimer or the system timer.
Record the source in a global variable that will be dumped
with the logs.

Change-Id: Ib168cfdc874426e48b12aac89f00d81ffe9e7fa6
CRs-Fixed: 940773
2015-11-23 13:09:10 -08:00
Houston Hoffman
04507d3cf4 qcacld-3.0: Route logging through CDF_TRACE
AR_print and cdf_print macros were not logging to the driver log.

Change-Id: I11bc86f6c8ee91866c8e27903eaa15966111ce62
CRs-Fixed: 940770
2015-11-23 13:09:10 -08:00
DARAM SUDHA
c653bbac92 qcacld-3.0: debug check for l_rx_defrag_waitlist_remove
qcacld-2.0 to qcacld-3.0 propagation

while wlan disconnection is happening, in the process of peer-cleanup
check for tqu->prev to be non-null before calling TAILQ_REMOVE.

Change-Id: I5841dfe80b954bdfac5147f5e3e3661cc85ba4b1
CRs-Fixed: 836447
2015-11-23 13:09:10 -08:00
DARAM SUDHA
ecf4211368 qcacld-3.0: Set tfm to NULL to avoid freeing in crypto_free_cipher
qcacld-2.0 to qcacld-3.0 propagation

tfm is invalid when alloc fails. Set tfm to NULL to avoid freeing
the crypto transform in crypto_free_cipher()->crypto_destroy_tfm.

Change-Id: I3261377f3a7b6ab5740d4144be9e84a1a3a07e42
CRs-Fixed: 809085
2015-11-23 13:09:10 -08:00
DARAM SUDHA
647ef12880 qcacld-3.0: apply vos_assert in vostimer APIs, in uninitialized case
qcacld-2.0 to qcacld-3.0 propagation

As a debug enhancement, call vos_assert in vos timer APIs, when
API fails because of unintialization.

Change-Id: Ib7d4c7995a60b23413eead4603b38ff89ff48715
CRs-Fixed: 810282
2015-11-23 13:09:09 -08:00
DARAM SUDHA
7e7e91b832 qcacld-3.0: Print signature on kernel logs when user triggers SSR by iwpriv
qcacld-2.0 to qcacld-3.0 propagation

Currently driver logs are routed as messages to CNSS_DIAG so the
Kernel does not print them into the Kernel log. Add a debug print
to display in kernel log when ever the SSR is triggered using iwpriv.

In dog-food testing, this print would help to separate out the
user-triggered SSR scenarios.

Change-Id: I58f247a26e802bced0c226ee92052ca0d69e1554
CRs-Fixed: 844938
2015-11-23 13:09:09 -08:00
DARAM SUDHA
5d5fb80950 qcacld-3.0: Reduce the log level for debug print in softap_xmit
qcacld-2.0 to qcacld-3.0 propagation

Reduce the error log level for LOGP in Progress in
hdd_softap_hard_start_xmit to avoid WD bark

Change-Id: I1be5db2eb9b59f22f735f9c21eeac9a81bb246f5
CRs-Fixed: 824309
2015-11-23 13:09:09 -08:00
DARAM SUDHA
f6c3f9705e qcacld-3.0: Add debug code to rootcause command timeout issue.
qcacld-2.0 to qcacld-3.0 propagation

when EXIT_BMPS is pending in activeList, it causes crash
with excess logging for RoamPending list. In this scenario
gTraceTbl has lost SME details due to other MTRACE commands.
Because of which, the issue is not rootcaused.

Add below changes to rootcause if the issue appears again:
1. print only first 5 commands from roamPendingList
2. Bug_on if the commandlist is full
3. Add MTRACE for PMC commands

CRs-Fixed: 833261
Change-Id: Id5bb399c4a8c8e84ddfa121a66881e3ecb901b05
2015-11-23 13:09:09 -08:00
Satish Singh
b1e0e4b2c7 Release 5.0.0.144
Release 5.0.0.144

Change-Id: I1e50bb41f68810fd11d60b82877a1d7c1745505e
CRs-Fixed: 688141
2015-11-23 13:09:09 -08:00
Krishna Kumaar Natarajan
4340c68785 qcacld-3.0: Remove Radio measurement related cfg entries
qcacld-2.0 to qcacld-3.0 propagation

Remove cfg entries related to radio measurement(RM).

We have support to enable/disable RM capability through INI config.
We also had entry in cfg static table(cfg.dat). This change set
will remove entries related to RM.

Change-Id: Ic56cc34628cd1c0fb10512069ef6dc5f0eebb887
CRs-Fixed: 924420
2015-11-23 13:09:09 -08:00
Krishna Kumaar Natarajan
d26e9e77d8 qcacld-3.0: Set RM capability independent of AP's capability
qcacld-2.0 to qcacld-3.0 propagation

Remove check for AP's capability information to set station's
radio measurement(RM) capability in Capability Information element.

Change-Id: I6047d4dec19e7cd32d6733e4da773875bbbb31aa
CRs-Fixed: 924420
2015-11-23 13:09:09 -08:00
Krishna Kumaar Natarajan
f599c6e7d3 qcacld-3.0: Support to configure RM enabled capability IE
qcacld-2.0 to qcacld-3.0 propagation

Add support to configure RM enabled capbility information element
through INI.

Using the introduced INI config option(rm_capability), we can set
or unset any bit in the IE. Default value for the config parameter
is set based on rrmInitialize routine.

Change-Id: Ia2a4352760db77ab71dad4757eb603d7539ffefa
CRs-Fixed: 918667
2015-11-23 13:09:09 -08:00
Varun Reddy Yeturu
bee4f78cbe qcacld-3.0: Report roaming events to diag module
In case of LFR3.0, report the critical roaming events
such as receiving the roam synch indication from firmware,
sending the roam synch complete to the firmware, sending
Hand Over failure event to the firmware to the DIAG modules
for better debug capabilities.

CRs-Fixed: 938002
Change-Id: Icfb4972d59dc3b734ed5af37d70834fea470d741
2015-11-23 13:09:08 -08:00
Sanjay Devnani
cdab59ec76 qcacld-3.0: enable srri/drri on ddr
The SRRI/DRRI can be read from DDR instead of doing an
actual hardware read. This mechanism is compiled out by
default.

Change-Id: I8fc6c8817b5958f3d00b47ccd3dba36b354097e8
CRs-Fixed: 932344
2015-11-23 13:09:08 -08:00
Sanjay Devnani
19879578da qcacld-3.0: Enable all 12 Copy Engines
Facilitates faster data transfers. This provides a basis
to start using the other 4 CEs for additional services.
Only adding structure elements to enable these CEs not
really using them yet.

Change-Id: I4be07413de409195ccc717765c75806a1470941e
CRs-Fixed: 938752
2015-11-23 13:09:08 -08:00
Sanjay Devnani
64d8f8fcf5 qcacld-3.0: Remove redundancy in svc to ce map
Map was replicated at 2 places.
Deleting the second one to use only one.

Change-Id: Ie3a6f0882cbaf2988f8e456b989d3fed9d631de0
CRs-Fixed: 936404
2015-11-23 13:09:08 -08:00
Mahesh Kumar Kalikot Veetil
221dc67394 qcacld-2.0: Fix intra-BSS forwarding
qcacld-2.0 to qcacld-3.0 propagation

When INTRA_BSS_FWD_OFFLOAD is enabled, FW will send all Rx packets to
IPA uC, which needs to be forwarded to other interfaces. IPA driver will
send back non-IP, broadcast and multicast packets to WLAN host driver
in exception pipe with fw_desc field set by FW as:
   - FW_RX_DESC_FORWARD_M bit: Forward the packet to TX
   - FW_RX_DESC_DISCARD_M bit: Do not send the packet to network stack,
     which will be set of for intrabss unicast.

Change-Id: Ie2826c8c7b578e3684133a2554ed086e721f67ae
CRs-Fixed: 895662
2015-11-23 13:09:08 -08:00
Varun Reddy Yeturu
ec932147b0 qcacld-3.0: Change the range of values for Early Stop Scan feature
Change the range of values for early stop scan feature
configuration items as per firmware expectations.

CRs-Fixed: 939185
Change-Id: I7d893cd1ed44a71bffaab22121f052288b14b640
2015-11-23 13:09:08 -08:00
Yun Park
e59b3915fa qcacld-3.0: Change event_lock for HDD IPA resources with ipa_lock
qcacld-2.0 to qcacld-3.0 propagation

HDD IPA event_lock was originally introduced to protect IPA resources
between HDD_IPA events, but this also used to protect HDD IPA internal
struct now. So, this could cause an unexpected deadlock by guarding
too wide resources.
This change is to separate a lock for IPA resources.

Change-Id: Ie9b676e5d4775e54bddf141b841e0f0daeb22731
CRs-fixed: 934723
2015-11-23 13:09:07 -08:00
Yun Park
f97eab34db qcacld-3.0: Change cdf_trace_hex_dump to use hex_dump_to_buffer
qcacld-2.0 to qcacld-3.0 propagation

Change cdf_trace_hex_dump to use hex_dump_to_buffer.
This will print one line even if buffer size is less than 16 bytes.

Change-Id: I2dec78048d52f96d494c9e0ce133c4c18f48e954
CRs-fixed: 933157
2015-11-23 13:09:07 -08:00
Tushnim Bhattacharyya
206bcac761 qcacld-3.0: wma_update_intf_hw_mode_params to call tx & rx ss macros correctly
The Tx & Rx SS macros aren't called with correct parameter in
wma_update_intf_hw_mode_params. Fix the calls to get the Tx & Rx SS values
correctly.

Change-Id: I4df4db549d4bb0c7d00a521de55165bfccf16a65
CRs-fixed: 935341
2015-11-23 13:09:07 -08:00
Naveen Rawat
83102eff80 qcacld-3.0: Fix for CCKM fast roaming failure.
This is qcacld-2.0 to qcacld-3.0 propagation

Due to cleanup in function limSendReassocReqWithFTIEsMgmtFrame()
assocReqLen was not being set to zero when the corresponding buffer
was NULL. This caused memory copy in buffers being passed between
PE and SME and HDD to be improper. HDD when reading the buffer
wrongly read it from wrong offset and hence RSN IEs being passed to
supplicant are all zeros. This patch fixes this by setting
assocReqLen = 0 when AssocReq buff is NULL

Change-Id: I0edaff93fcdbb2d5ae80478a76f07cb4dee8aceb
CRs-Fixed: 929797
2015-11-23 13:09:07 -08:00
Prashanth Bhatta
9dddcb2745 qcacld-3.0: htc: Fix race while processing HTC control messages
HTC control messages ready and connect service indications use
CtrlResponseBuffer for processing the HTC messages. Flag
CtrlResponseProcessing is used to protect this buffer from
overwriting before processing. Current implementation has race
condition as setting the flag happens on waiting thread context
instead of receive thread context so this could lead to
overwriting the CtrlResponseBuffer if waiting thread doesn't get
chance to run because of may be another RX interrupt.
Also to catch this kind of issues, add CDF_BUG so that it is
easier to triage the cause for the malformed packet which is not
expected.

CRs-fixed: 881504
Change-Id: Ia279e08c761a3432cf01d4dc129f7b5439d04680
2015-11-23 13:09:07 -08:00
Prashanth Bhatta
bfc2529556 qcacld-3.0: Fix compilation issue for ROAM_OFFLOAD feature
Fix compilation issue when ROAM_OFFLOAD is not enabled. There are
issues with ROAM_OFFLOAD feature conditional compilation.

Change-Id: I068245885ab9f054b4c03307a9ecc0066bc88ebe
CRs-fixed: 784982
2015-11-23 13:09:07 -08:00
Dhanashri Atre
8d97817435 qcacld-3.0: LRO - Fix LRO disable crash
- Fix a crash seen due to memory being freed twice
- Deregister the LRO flush callback during LRO disable

CRs-Fixed: 933123
Change-Id: I18edadc620da04b9a571da6e1b143c099c308d90
2015-11-23 13:09:07 -08:00
Dhanashri Atre
98815d2b8e qcacld-3.0: Remove excessive logging in the OL tx path
This change is to address a watchdog bite that is seen when
a peer corresponding to the transmit frame is not found in
the OL TXRX transmit path. The change is to log the error
using a CDF trace warning message.

Change-Id: I8792da5539c75a3041c3c85f5a7e29714b721502
CRs-Fixed: 936374
2015-11-23 13:09:06 -08:00
Krunal Soni
b2f1304e77 qcacld-3.0: Fix PMF configuration for LFR2 and LFR3 roaming
This commit will fix the incorrect pmf config param for STA DUT
in-case of LFR2/3 roaming scenario.

Change-Id: Ic0d6d4632cfeaa0589b435a6710f3c2380cf5883
CRs-Fixed: 935947
2015-11-23 13:09:06 -08:00
Krunal Soni
3b7f733ea6 qcacld-3.0: Fix to honor try again later value only if conn is pmf
qcacld-2.0 to qcacld-3.0 propagation

Current driver is honoring association response with try again later
as reason code without connection being PMF. Driver has been designed
to handle try again later reason only for PMF connection. For non-pmf
case it should report as failure to upper layer just like any other
failures.

To fix this situation, honor try again later reason code only if the
connection is PMF.

Change-Id: I4b37d072bc92e003fcfe62ffe8f93f7c185eb6c7
CRs-Fixed: 919203
2015-11-23 13:09:06 -08:00
Jeff Johnson
edeff23d4f qcacld-3.0: Avoid NULL skb dereference during softap TX
Change "qcacld-3.0: Record data in DP Trace" introduced skb tracing
functionity to the driver.  In hdd_softap_hard_start_xmit() logic was
added to trace the skb contents, including logic to trace the skb
contents when an skb was dropped.  However some of the code paths to
this "drop_pkt" tracing have a NULL skb.  Therefore we must bypass the
dropped skb content tracing when the skb is NULL.

Change-Id: I485c92647355a0f7f420f40640b697a1d3eb5fb0
CRs-Fixed: 938254
2015-11-23 13:09:06 -08:00
Krishna Kumaar Natarajan
052c6e6b30 qcacld-3.0: Fix layering violation in hdd_update_tgt_services
Fix layering violation in hdd_update_tgt_services by not accessing
pMac structure directly from HDD.

New SME API - sme_update_tgt_services() introducted to configure the
parameters in pMAC structure.

Change-Id: I7310e51001c5e17ed63730d7a86445548aa3d246
CRs-Fixed: 915267
2015-11-23 13:09:06 -08:00
Krishna Kumaar Natarajan
9f42170273 qcacld-3.0: Fix inappropriate use of linux-specific code
Fix inappropriate use of Linux-specific workqueue code and
data structures in WMA.

WMA is supposed to be os-agnostic code but it currently has
Linux-specific data declarations and code for ack_cmp_work.
This change set will convert the existing code to os-agnostic
representation.

Change-Id: I3260fa3b4b482c10272ac94ab10e14e40b8950f9
CRs-Fixed: 924421
2015-11-23 13:09:06 -08:00
Krishna Kumaar Natarajan
ea08e502e5 qcacld-3.0: Fix the incorrect usage of node in wma_cleanup_hold_req
Fix the usage of list node which was deleted before the usage in
wma_cleanup_hold_req function.

Change-Id: I8ee243fda511de71083ce7e631a21497f4f153c1
CRs-Fixed: 937267
2015-11-23 13:09:06 -08:00
Krishna Kumaar Natarajan
a5c53bd6c0 qcacld-3.0: Fix the usage of struct list_head for vdev_resp_queue
Fix the usage of linux-specific structures and functions by
replacing them with OS-abstracted types for vdev_resp_queue.

Change-Id: If2d4a9a1dffd59ec1db4b4aa572dfa453bfd0167
CRs-Fixed: 931094
2015-11-23 13:09:05 -08:00
Yue Ma
38f7a1f730 qcacld-3.0: Reduce PM QOS latency tolerance time to minimum
qcacld-2.0 to qcacld-3.0 propagation

In order to improve driver load time, reduce PM QOS latency tolerance
time to minimum to avoid CPU enters aggressive PS during loading driver.

Change-Id: Ibacf933d379f37063d900d444de20493b94ebd90
CRs-fixed: 935267
2015-11-23 13:09:05 -08:00
Chandrasekaran, Manishekar
907c2af8d6 qcacld-3.0: Fix misspelled entry in the enum wifi_logging_ring_id
This is qcacld-2.0 to qcacld-3.0 propagation

Fix the misspelled entry RIND_ID_DRIVER_DEBUG to
RING_ID_DRIVER_DEBUG in the enum wifi_logging_ring_id

CRs-Fixed: 938286
Change-Id: I0d33128c6d11ecc9ff3d403931bfd6bfdbbb2b4a
2015-11-23 13:09:05 -08:00
Chandrasekaran, Manishekar
430ee2ec1f qcacld-3.0: Avoid waiting for SME messages while holding SME global lock
Avoid waiting for SME response messages while holding the SME global
lock. Currently a wait for 500ms happens in cds_handle_conc_multiport
after the holding the SME global lock. Because of this, the set hw mode
response posted by LIM is not processed by SME as SME would be waiting
for the lock.

Change-Id: Ib7890cb7124f5879316f46b1bf9f0ad3fb225665
CRs-Fixed: 939026
2015-11-23 13:09:05 -08:00
Chandrasekaran, Manishekar
eceb811625 qcacld-3.0: Add CDS APIs to manipulate connection update event
Add CDS connection manager APIs to manipulate the connection
update event. These APIs can be used to initialize, reset,
set and wait for connection update event.

Change-Id: I5689711d4bdc0e39b2456573158943ebda9cbc2a
CRs-Fixed: 939026
2015-11-23 13:09:05 -08:00
Chandrasekaran, Manishekar
0d814c7b3e qcacld-3.0: Move cds_get_bin.c to concurrency management files
cds_get_bin.h and cds_get_bin.c were derived from qcacld-2.0
vos_get_bin.h and vos_get_bin.c.  These files got their names
since at one time they housed the wrappers used to retrieve
binary files nv.bin, cfg.dat, and firmware.  But over time the
functionality to actually retrieve binary files (get_bin) has
been removed, and almost all that is left is concurrency
management functions.  So, moving the .[ch] functionality to
the right files.

CRs-Fixed: 932777
Change-Id: I4a26c304cc6b6224d0839c365e4006fd32270961
2015-11-23 13:09:04 -08:00
Chandrasekaran, Manishekar
22a7e1efe8 qcacld-3.0: Fix namespace collision in DFS module
Fix namespace collision of the DFS module
with userspace.

Change-Id: I4ca582e9cb5713238cbae3060005375682fc8806
CRs-Fixed: 935515
2015-11-23 13:09:04 -08:00
Mohit Khanna
ee9e80f8d4 qcacld-3.0: Increase default tx_queue_len for WLAN netdevice
qcacld-2.0 to qcacld-3.0 propagation

An increase in tx_queue_len of netdev to 3000 is giving us better TCP
TX performance. Hence, increasing its value from its default (1000).
This gives us about 30 - 40 Mbps of boost.

Change-Id: I68f26ac0f4a040b0bbf10dd571dae8e5316f16b3
CRs-Fixed: 927673
2015-11-23 13:09:03 -08:00
Mohit Khanna
e71e2264cd qcald-3.0: tweak sys params during high tx bandwidth case
qcacld-2.0 to qcacld-3.0 propagation

In hdd_cnss_request_bus_bandwidth function, the overall bus bandwidth
and rx bandwidth requirements are being determined based on tx and
rx packets. This change detects tx bandwidth required (high or low)
and sends WLAN_SVC_WLAN_TP_TX_IND indication to cnss-daemon which can
tweak system parameters depending upon TX bandwidth needed.

Change-Id: I3eec2e3f95fa32b191d905209a38cb6d48837c33
CRs-Fixed: 918529
2015-11-23 13:09:03 -08:00
Satish Singh
585b65d9bc Release 5.0.0.143
Release 5.0.0.143

Change-Id: I404e40080c263ce09755299a40ab3642d894cfcf
CRs-Fixed: 688141
2015-11-23 13:09:03 -08:00
Srinivas Dasari
6946a796b9 qcacld-3.0: LLStats- Don't wait for peerstats if there is no peer
qcacld-2.0 to qcacld-3.0 propagation

Firmware indicates the number of peers connected as part of iface
stats. If there are no peers connected, don't wait for the
peerstats and indicate the stats to host.

Change-Id: I32d04a5711adb5f924d120ee61064a178e753549
CRs-Fixed: 847743
2015-11-23 13:09:03 -08:00
Dhanashri Atre
9c898e7c00 qcacld-3.0: Replace panic with BUG_ON
qcacld-2.0 to qcacld-3.0 propagation

Register values are captured in the crash dump with BUG_ON.

Change-Id: I33500aea0769879d63b2e684dc898ba0e3b0b5a2
CRs-Fixed: 813402
2015-11-23 13:09:03 -08:00
Dhanashri Atre
cf475d2465 qcacld-3.0: Unmap HTT Receive Buffers
qcacld-2.0 to qcacld-3.0 propagation

In the HTT hash de-init function, the network buffers (skb) need to
 be unmapped before they are freed.

Change-Id: I879de6671d788f1ab99f7645ab424d56eafdbfd1
CRs-Fixed: 815265
2015-11-23 13:09:02 -08:00
Tushnim Bhattacharyya
bda664359b qcacld-3.0: dump the 3 port connection topology with new logs
The existing log for dumping concurrency information doesn't consider
DBS & also doesn't cover for various new combinations added newly.
Update logic for dumping DBS info & cover the new concurrency cases.

Change-Id: Id898bdc2c8aabfa70c99e6193c52f2723ded5c65
CRs-fixed: 935453
2015-11-23 13:09:02 -08:00
Tushnim Bhattacharyya
23168e484b qcacld-3.0: Remove wma_update_intf_hw_mode_params from vdev start rsp
The Tx & Rx SS & mac id update already been done by
wma_vdev_start_resp_handler. So, no need to update again by calling
wma_update_intf_hw_mode_params.

Change-Id: Ib9804bf0d30c75d95b14925a902fe167fa681be0
CRs-fixed: 935341
2015-11-23 13:09:02 -08:00
Bhargav Shah
f4fd97d004 qcacld-3.0: Variable over written in hdd_set_app_type2_parser.
qcacld-2.0 to qcacld-3.0 propagation

Currently in hdd_set_app_type2_parser, sscanf writes 4 bytes of data in
tcp_src_port and tcp_dst_port variable. The original size of variable
is 2 byte.

Update code to write appropriate size of data in variable.

Change-Id: Ifdbfa06da6cb7d0bfef4f4e105a6911950f1d6ad
CRs-Fixed: 859493
2015-11-23 13:09:02 -08:00
Chandrasekaran, Manishekar
78b98265b1 qcacld-3.0: Issue connect immediately if system is in required hw mode
Issue the connect command immediately when the system is already
in the required hw mode. Currently the connect command is issued
immediately only when the concurrent connection update succeeds,
i.e., only when a set hw mode succeeds. But, when the driver is
already in the required hw mode, the return value would not be
success and the connect command is not getting issued immediately.
Fixed this by checking the return value which indicates that the
driver is already in the required hw mode, and issuing the
connect command immediately.

Change-Id: I1ef2adf4d92953f47d36bdae41a9d7d8d559a203
CRs-Fixed: 936268
2015-11-23 13:09:02 -08:00
Leo Chang
e3e4944153 qcacld-3.0: ipa hw pipe force shutdown
qcacld-2.0 to qcacld-3.0 propagation

When the driver is in SoftAP mode when it is unloaded,
and if many clients are connected,
sometimes not all clients can gracefully disconnect.
In this case the IPA HW pipes are not cleaned up properly,
and subsequent pipe setup will usually fail.
To avoid a bad pipe configuration, before unloading driver,
check the pipe status and if the pipes are not closed properly,
shutdown the pipes forcefully.

Change-Id: Icc0543567423cc4b625140280be13ef733d7d67d
CRs-fixed: 886229
2015-11-23 13:09:02 -08:00
Rajeev Kumar
3ddf1c639f qcacld-3.0: Add length sanity check in iw_set_keepalive_params
Propagation from qcacld-2.0 to qcacld-3.0

Add length sanity check in iw_set_keepalive_params to avoid
stack over flow.

Change-Id: If59794d1b5f8efad2fe54844fab0e7cea9b1b983
CRs-Fixed: 932466
2015-11-23 13:09:02 -08:00
Jeff Johnson
56951330f8 qcacld-3.0: Avoid buffer overflow during extscan bucket fill
This is a qcacld-2.0 to qcacld-3.0 propagation.

Function hdd_extscan_start_fill_bucket_channel_spec() is used to
transfer EXTSCAN bucket parameters from a netlink message to an
internal representation.  A code analysis tool identified a potential
buffer overflow of the per-bucket channel list in this function.  In
reality this is a false positive since there is other logic which
limits the total number of channels across all buckets, and this logic
will prevent overflow of the channel list for a single bucket since
they use the same limit.

However this presents a code maintenance issue since a potential
overflow could be introduced in the future if a change is made to
allow the total number of channels across all buckets to exceed the
number of channels allowed in a single bucket.

To protect against this possibility, as well as make the code analysis
tool happy, add an additional check to make sure the per-bucket
channel list does not overflow.

Change-Id: Ifdf2de918d8b2c5a907e833e7bc42315b607e5a5
CRs-Fixed: 922047
2015-11-23 13:09:02 -08:00
Deepak Dhamdhere
29b3b2fd0c qcacld-3.0: modifications to SETDFSSCANMODE command
This is qcacld-2.0 to qcacld-3.0 propagation
When SETDFSSCANMODE is set to 0, it should now avoid DFS channels
altogether. Original implementation avoided DFS channel in roaming.
Now host code will first disable DFS channels and then follow
the original path.
Modifications to wlan_hdd_cfg80211_disable_dfs_chan_scan()
    - Keep validation of vendor command from NL.
    - Moved the DFS channel manipulation code to
      wlan_hdd_disable_dfs_chan_scan()
Call wlan_hdd_disable_dfs_chan_scan() in SETDFSSCANMODE processing.

CRs-Fixed: 778613
Change-Id: Ia2c00a6eb8d50e7962224375562a5b6417ba8bb2
2015-11-23 13:09:01 -08:00
Varun Reddy Yeturu
f6db67a9a1 qcacld-3.0: Increase the Wait for key timer value
qcacld-2.0 to qcacld-3.0 propagation

The wait for key timer value in the driver should
be greater than that of supplicant.
Hence increasing it to 15 seconds.

CRs-Fixed: 919403
Change-Id: I5d6e8d445ab9dcef73b923595f41564e0a6e3c6e
2015-11-23 13:09:01 -08:00
Varun Reddy Yeturu
062dc74d0d qcacld-3.0: Enable HI_RSSI feature only when connected to 2.4GHz AP
qcacld-2.0 to qcacld-3.0 propagation

1) Enable the feature only when connected to 2.4 GHz AP.
2) Modify the default values to reduce the scans and not impact power

CRs-Fixed: 817919
Change-Id: Idaff886cec558a06cf9341e47a8ce17b348ad72b
2015-11-23 13:09:01 -08:00
Varun Reddy Yeturu
5841476e50 qcacld-3.0: Enable HI_RSSI feature
qcacld-2.0 to qcacld-3.0 propagation

Enable the HI_RSSI feature from the code
instead of WCNSS_qcom_cfg.ini.

CRs-Fixed: 822475
Change-Id: Ic48e49e7042c06b1f0b2bf09d2d7ccae2d7cd9ad
2015-11-23 13:09:01 -08:00
Varun Reddy Yeturu
08efa3ad75 qcacld-3.0: In FTM mode stopping the MAC is not needed
qcacld-2.0 to qcacld-3.0 propagation

The MAC is not started upon FTM start.
Similarly stopping is not needed during FTM stop.

CRs-Fixed: 917306
Change-Id: I72ee4a58c88b54c1dad1b82f749274e0c2e8a9ce
2015-11-23 13:09:01 -08:00
Varun Reddy Yeturu
35b51a271f qcacld-3.0: Avoid PMKID and send correct MIC for CCKM+RSN scenario
qcacld-2.0 to qcacld-3.0 propagation

In the current design, PMKID is sent in RSN IE in reassoc req for
CCKM roaming.When AP receives CCKM IE and PMKID, it gets confused
and rejects the reassociation.So in case of CCKM+RSN, don't send
PMKID.
Also, in reassoc request, MIC was going 0 in CCKMIE.This MIC is
calculated by calling platform driver API.When this API returns
SUCCESS then result is copied in MIC buffer but if this API
returns EINPROGRESS/EBUSY, then driver wait for the event and once
the event is completed it does not copy the result in MIC buffer.
So changes are done to copy this result in MIC buffer in case of
BUSY/INPROGRESS status.

Change-Id: Ide74db250aa5c129fa223582be830c15f34cfb16
CRs-Fixed: 763969
2015-11-23 13:09:01 -08:00
Varun Reddy Yeturu
61ce89cfd8 qcacld-3.0: Cleanup logging
qcacld-2.0 to qcacld-3.0 propagation

Some of the logs are misleading to believe that there are
some memory related issue which infact is not. Cleanup the
logs to convey the exact message that has to be conveyed for
those scenarios

CRs-Fixed: 907715
Change-Id: Iaab688eb9b8b19705b3d87c4efe1c7ef29ccf613
2015-11-23 13:09:01 -08:00
Mukul Sharma
06adf26974 qcacld-3.0: Prevent null data access
qcacld-2.0 to qcacld-3.0 propagation

In DFS mode, scan req completed through work item
which is async method and may lead to null
pointer access during driver unload.
So as part of fix null check are put in place
to avoid null data access.

Change-Id: I1f2255c1ad6e3e881626a32384b9badde1b255fc
CRs-Fixed: 894741
2015-11-23 13:09:00 -08:00
Mukul Sharma
bfd19ba1ee qcacld-3.0: Handle excessive logging during sta select queue
qcacld-2.0 to qcacld-3.0 propagation

As a part of unload hdd is stopping the netdev queue.
But still N/W layer 3 is calling the select queue netdev
ops, where error print appears excessively.
As a part of this fix sta select queue netdev ops need
to validate Hdd context to take care of SSR and load
/ unload cases.

Change-Id: I087f50ac9e59c3e181bde54f2041f9dda3177266
CRs-Fixed: 857429
2015-11-23 13:09:00 -08:00
Satish Singh
abf552f8a3 Release 5.0.0.142
Release 5.0.0.142

Change-Id: Ia33b8a91e1cbbba1b620c838e55fcf1b7f464dde
CRs-Fixed: 688141
2015-11-23 13:08:12 -08:00
Satish Singh
a2ae5c115c Revert "qcacld-3.0: Enable gEnableTxSUBeamformer by default"
This reverts commit bff91464a2c38ed4ed0d3aa537d24372a6dd984a.

Change-Id: I84c07c9b2214a2d59cf35d9f0ee2deb5e838caf8
2015-11-23 13:08:12 -08:00
Satish Singh
6774ed099c Revert "qcacld-3.0: HT20 Protection Mode"
This reverts commit e85300d7533a347dd7e45919293285038db00a82.

Change-Id: Ief91957c0ba7ee1c2efc155f2335d73c37f73c6c
2015-11-23 13:08:11 -08:00
Satish Singh
f69bdced74 Release 5.0.0.141
Release 5.0.0.141

Change-Id: I210e5344c902caf66eb4debde39c17441d1e521d
CRs-Fixed: 688141
2015-11-23 13:08:11 -08:00
Edhar, Mahesh Kumar
394c3543c5 qcacld-3.0: Avoid calling memory allocation function for allocation size 0
qcacld-2.0 to qcacld-3.0 propagation

Currently we are calling memory allocation function to allocate memory for
FT ies even though FT ies length is 0.
Due to above behavior we are seeing unnecessary memory allocation failure
error prints.
Change made to check for FT ies length before calling memory allocation
function.

Change-Id: I3f9ddee1d66f51088526f6d370c83697178be925
CRs-Fixed: 930118
2015-11-23 13:08:11 -08:00
Edhar, Mahesh Kumar
4f660677dc qcacld-3.0: Properly update specturum channel list
qcacld-2.0 to qcacld-3.0 propagation

Currently for ACS,one to one correspondence between channel
number and index of Sap specturum structure is desired.

But the correspondence is broken in case of channel in NOL list
or if the DFS channels are not allowed.

In case of channel in NOL list or if DFS channel not allowed,
channel number is incremented but index of structure doesn't change.

As a part of fix, made sure that one to one correspondence is
maintained.

Change-Id: I05cbe92e2657d96e271b402b9fdbe41a32c7080d
CRs-Fixed: 922865
2015-11-23 13:08:11 -08:00
Edhar, Mahesh Kumar
d028db72ad qcacld-3.0: Change to address memory leak
qcacld-2.0 to qcacld-3.0 propagation

As per the current implementation during join timer start failure scenario,
pMlmJoinReq assigned to NULL with out freeing the memory resulting in
memory leak.

change made to release the memory in failure scenario.

Change-Id: I3f37f45129baec76671caff09790bfb70bf01208
CRs-Fixed: 930553
2015-11-23 13:08:11 -08:00
Govind Singh
c5ce2905e5 qcacld-3.0: Free rx_buff_list in htt_detach
qcacld-2.0 to qcacld-3.0 propagation

rx_buff_list is not getting freed in
htt_detach and causing memory leak.
Change-Id: Ia9d6660674c5b4570d337cb66995fc2449145d59
CRs-Fixed: 918223
2015-11-23 13:08:11 -08:00
Govind Singh
d79e134de3 qcacld-3.0: debug info for full reorder offload
qcacld-2.0 to qcacld-3.0 propagation

Log last 1K physical addresses and corresponding virtual addresses of the
Rx buffers.

Change-Id: I2bb4502fdd92b362199b579ec3cceaa691d4691f
CRs-Fixed: 864569
2015-11-23 13:08:11 -08:00
Govind Singh
edc5cda7af qcacld-3.0: Fix STA state handling in case of WEP
qcacld-2.0 to qcacld-3.0 propagation

Handle STA State in hdd_RoamSetKeyCompleteHandler for WEP case.
In WEP case Key are set in following order.
1)Group key
2)Unicast Key
In WEP case STA was moved to AUTHENTICATED prior to
setting the unicast key and it was resulting in sending
few un-encrypted packet. Now STA state will be moved to
AUTHENTICATED after we set the unicast and group
key in WEP case.

Change-Id: I7471bc76b10be31c4a2dbb52286c7f808fa27306
CRs-Fixed: 906555
2015-11-23 13:08:10 -08:00
Naveen Rawat
bace351fef qcacld-3.0: Allow minimum value for dwell time for Ext Scan to be 0
This is qcacld-2.0 to qcacld-3.0 propagation

Currently min time for dwell time for ext scan is non-zero while it
is zero for all other type of scan. This patch makes min value for
dwell time for ext scan as zero and consistent with other scans.

Change-Id: I7b6f3681c56918af7cdc381d25d6b625a5bdbda3
CRs-Fixed: 923458
2015-11-23 13:08:10 -08:00
Naveen Rawat
8928da9791 qcacld-3.0: Do not advertise 80MHz/160MHz capabilities in 40/20MHz
This is qcacld-2.0 to qcacld-3.0 propagation

Do not advertise the short GI capability for 80MHz and 160MHz
if the  operating channel width is 20MHz or 40MHz.

Change-Id: I93f0b2e94e27b50fa0baa2a263fc866ba3807fb3
CRs-Fixed: 908743
2015-11-23 13:08:10 -08:00
Naveen Rawat
3e8322c055 qcacld-3.0: Set channel width for TDLS link on base channel
This is qcacld-2.0 to qcacld-3.0 propagation

The htSupportedChannelWidthSet of the TDLS link on base channel
should be less than or equal to channel width of STA-AP link.
The parameter pStaDs->htSupportedChannelWidthSet represents the
channel width of TDLS link on base channel.
psessionEntry->htSupportedChannelWidthSet represents the channel
width set of STA-AP link.
So fill the pStaDs->htSupportedChannelWidthSet from
psessionEntry->htSupportedChannelWidthSet.

Change-Id: I7fe3f2f449d83f5d6f01adce3a25d8031dfbeb48
CRs-Fixed: 800031
2015-11-23 13:08:10 -08:00
Naveen Rawat
10ccf878f9 qcacld-3.0: Fix race condition between WMI control RX and driver unload
This is a qcacld-2.0 to qcacld-3.0 propagation

Don’t unregister the event in LIM cleanup since it will be take care
by WMI service close. Also in tlshim_mgmt_rx_wmi_handler, add driver
load/unload check to avoid processing any WMI_MGMT_RX_EVENTID event
even the handler is not NULL

Change-Id: I72b53b614218f26e874c964a0d8b0affba6cda79
CRs-Fixed: 904490
2015-11-23 13:08:10 -08:00
Chandrasekaran, Manishekar
3f6a72c09e qcacld-3.0: Check for concurrency rules before P2P CLI connection
Ensure that concurrency rules are validated before initiating
a P2P CLI connection.

Change-Id: I6ee8d03f2bde9b419391551c0ca988b3672eb089
CRs-Fixed: 935783
2015-11-23 13:08:10 -08:00
Satish Singh
18f12aac69 Release 5.0.0.140
Release 5.0.0.140

Change-Id: I4f54ce6df92b097ad33f3d6f97f9352bac4bce28
CRs-Fixed: 688141
2015-11-23 13:08:09 -08:00
Chandrasekaran, Manishekar
ef70c0dd64 qcacld-3.0: Set HW mode before issuing connect for Hidden SSID
Set the HW mode if needed before connecting to an SSID that
is hidden.

CRs-Fixed: 928208
Change-Id: Ibefd207327da1b85ae26a91afd27fc6baf98cf14
2015-11-23 13:08:09 -08:00
Chandrasekaran, Manishekar
123d863c0c qcacld-3.0: Support for CLI+SAP in the PCL tables for third connection
Add support for CLI+SAP combination in the PCL tables which will be
used before deciding the PCL for the third connection that is going to
come up.

CRs-Fixed: 932277
Change-Id: I87e0d6306a40129931268d869b09c5bf763fab95
2015-11-23 13:08:09 -08:00
Kiran Kumar Lokere
b3d8b5ba88 qcacld-3.0: Add ACS support in 160MHz
Add ACS support in SAP 160MHz mode.

Change-Id: I4893fc25057c64ea13c0297f6d7734415bcadd23
CRs-Fixed: 919904
2015-11-23 13:08:08 -08:00
Varun Reddy Yeturu
0518629d50 qcacld-3.0: Changes for early stop scan
Early stop scan is a feature for roaming to stop the scans at
an early stage as soon as we find a better AP to roam. This
would make the roaming happen quickly.

Apart from sending the configuration items, the host also
has to send down the channel list in a sorted order
to optimize the scans and meet the requirement of this
feature.

This feature is currently applicable only to roaming
scans. However the sorted order of scan list will be
the same used by all the scans.

CRs-Fixed: 932431
Change-Id: I9c7300e4922cb0d517c248bcf60f681a5872a315
2015-11-23 13:08:08 -08:00
Varun Reddy Yeturu
b43fda1ddd qcacld-3.0: PNO Channel prediction
Reduce the number of channels to scan in PNO mode
based on the initial scan memory and the movement
of the client STA using Tanimoto distance

CRs-Fixed: 932355
Change-Id: I1b5448af801fb37324b77cd13c6009f1d859dd61
2015-11-23 13:08:08 -08:00
Mukul Sharma
472382f646 qcacld-3.0: Check privilege permission for SET_PACKET_FILTER
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing SET_PACKET_FILTER IOCTL, making
sure user task has right permission to process the command.

Change-Id: Ib49c3223eacdc90dfe0d45af1aff7c74518990df
CRs-Fixed: 930937
2015-11-23 13:08:07 -08:00
Mukul Sharma
c7a59f3210 qcacld-3.0: SSR protection for linux/crda reg_notifier api
qcacld-2.0 to qcacld-3.0 propagation

if SSR trigger in middle of execution of linux_reg_notifier
/crda_reg_notifier, driver may access uninitialized data.
Hence Driver need to protect these function from SSR.

Change-Id: I9bdc6851a44fecc8353e94b38eb1dd4f63e58604
CRs-Fixed: 798672
2015-11-23 13:08:07 -08:00
Mukul Sharma
34777c6cf3 qcacld-3.0: Check privilege permission for SET_CHAR_GET_NONE
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing SET_CHAR_GET_NONE IOCTLs, making
sure user task has right permission to process the command.

Change-Id: I7b060bcdc84f7016e8d301e994437a535533a260
CRs-Fixed: 930935
2015-11-23 13:08:07 -08:00
Mukul Sharma
744420f213 qcacld-3.0: Check privilege permission for QCSAP_IOCTL_DISASSOC_STA
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing QCSAP_IOCTL_DISASSOC_STA IOCTL,
making sure user task has right permission to process the command.

Change-Id: I00919a56e93b8b49bce7a314b50f9f48039fbe6f
CRs-Fixed: 930946
2015-11-23 13:08:07 -08:00
Mukul Sharma
81661ae7f2 qcacld-3.0: Fix defects detected by Static code analyser
qcacld-2.0 to qcacld-3.0 propagation

Static code analyser detects uninitialized pointer/structure
access and dereferencing a pointer without null check.
As part of this fix host will initialize pointer/structure before
accessing it and put a null check for pointer access.

Change-Id: I5647b36a6ba0e84354d39799bf68a28df633cf20
CRs-Fixed: 836071
2015-11-23 13:08:06 -08:00
Mukul Sharma
51c449481e qcacld-3.0: Do not Update MC list in ftm mode
qcacld-2.0 to qcacld-3.0 propagation

Host should avoid to Update MC list in ftm mode because
as a part of MC list updation, host will access the
pMac roam sessions, as these sessions are not initialized
in FTM mode which lead to Null data access.

Change-Id: I2ac82e76c1c7de8d1bf0fd7e291bf5445e9d0f4b
CRs-fixed: 897871
2015-11-23 13:08:06 -08:00
Mukul Sharma
64a70e8c02 qcacld-3.0: Check privilege permission for SET_VAR_INTS_GETNONE
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing SET_VAR_INTS_GETNONE, making
sure user task has right permission to process the command.

Change-Id: Icbdfe69c18c1ab3b75d63e046d5251307a794817
CRs-Fixed: 930942
2015-11-23 13:08:06 -08:00
Mukul Sharma
a42b062623 qcacld-3.0: Check privilege permission for QCSAP_IOCTL_SETWPSIE
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing QCSAP_IOCTL_SETWPSIE IOCTL,
making sure user task has right permission to process the command.

Change-Id: Ie1c945afb0f109892beda66bab25647d70cc62d7
CRs-Fixed: 930944
2015-11-23 13:08:06 -08:00
Mukul Sharma
a5fe19828c qcacld-3.0: Check priviledge permission for SET_BAND_CONFIG IOCTL
qcacld-2.0 to qcacld-3.0 propagation

Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing SET_BAND_CONFIG IOCTL, making
sure user task has right permission to process the command.

Change-Id: Ie8a36bfa07a7b21601364b27b3c4bc888a6a5b4e
CRs-Fixed: 930952
2015-11-23 13:08:06 -08:00
Mukul Sharma
b315218e7a qcacld-3.0: Handle excessive logging during hostap select queue
qcacld-2.0 to qcacld-3.0 propagation

As a part of unload hdd is stopping the netdev queue.
But still N/W layer 3 is calling the select queue netdev
ops, where error print for sap context is Null appears
excessively.
As a part of this fix hostap select queue need to validate
Hdd context to take care of SSR and load / unload cases.

Change-Id: Id6d93a3a83de7d95a283ff57b6fa2c44f08a9ee3
CRs-Fixed: 857220
2015-11-23 13:08:06 -08:00
Abhishek Singh
10a00267d0 qcacld-3.0:IBSS:Update HT secondary channel offset from beacon in pStaDs
qcacld-2.0 to qcacld-3.0 propagation

While adding pStaDs for IBSS when peer beacon is received, HT
secondary channel offset is not copied from beacon. This leads to
false change capability indication while processing the same beacon
and thus update cb mode is sent with staid 255(default),
leading to crash.

Update HT secondary channel offset from beacon and add a check in
cbmode update to ignore update if staid is 255.

CRs-Fixed: 885747
Change-Id: I66dedb38aadde473b99b2f8fc4a7a9b855a10b2a
2015-11-23 13:08:05 -08:00
Edhar, Mahesh Kumar
35d9b2ed49 qcacld-3.0: Optimize processing of DFS phy events
qcacld-2.0 to qcacld-3.0 propagation

Optimize by avoiding processing of DFS phy events in below scenario's

1)Once radar indication given to UMAC.
2)Vdev restart in SAP interface

Change-Id: Ib175feed4a611a5c7185202e3d50abc3e84fc781
CRs-Fixed: 910586
2015-11-23 13:08:05 -08:00
Edhar, Mahesh Kumar
b0319c4725 qcacld-3.0: synchronize concurrent access of shared variable
qcacld-2.0 to qcacld-3.0 propagation

Currently DFS variables are accessed in different context without
protection leading to NULL pointer dereferences.

Ensure lock is taken before accessing the DFS shared variable.

Change-Id: Ie78dd50ff4b32ef52f78e2944d175a6c10577882
CRs-Fixed: 910586
2015-11-23 13:08:05 -08:00
Yue Ma
e3eaebe339 qcacld-3.0: Do not update WLAN status to LPASS when disconnect during unload
qcacld-2.0 to qcacld-3.0 propagation

Host driver updates WLAN status to LPASS with connected false and WLAN on
when disconnection happens. Host driver also updates WLAN status right
after driver unload is triggered with connected false and WLAN off. There
is a scenario that disconnection callback comes during driver unloading
which causes LPASS misbehavior. Fix this by only updating disconnection
status to LAPSS when driver is not unloading.

Change-Id: Ie72ba094283a64c06e8c74523314d6de92a0f08b
CRs-fixed: 928365
2015-11-23 13:08:04 -08:00
Yue Ma
4ea4f05710 qcacld-3.0: Increase SSR timeout to 30 seconds
qcacld-2.0 to qcacld-3.0 propagation

Increase SSR timeout from 15 seconds to 30 seconds in order to handle
some corner cases which may cause SSR to take longer time. E.g. CPU is
busy/stuck with other tasks.

Change-Id: I6837f2d5e87090ede15e514d1c4f978d34931f32
CRs-fixed: 927722
2015-11-23 13:08:04 -08:00
Yue Ma
d6478e468a qcacld-3.0: Modify bus bandwidth vote criterion
qcacld-2.0 to qcacld-3.0 propagation

If total TX/RX packets are less than bus bandwidth low threshold, there
is no need to vote separately from WLAN side.

Change-Id: I02284d035e58471b3933a84c778d4d44bd6b19ba
CRs-fixed: 918723
2015-11-23 13:08:04 -08:00
Yue Ma
455aff67e9 qcacld-3.0: Ignore VOS_BUG if recovery is already going on during suspend
qcacld-2.0 to qcacld-3.0 propagation

There is no need for host driver to do VOS_BUG if FW has already requested
recovery during suspend.

Change-Id: I0c77210316fea978fe686201f42b9501612e9a1e
CRs-fixed: 904909
2015-11-23 13:08:04 -08:00
Yue Ma
e1a85f39d1 qcacld-3.0: Recover if fail to receive HTC ACK from FW for PDEV suspend
qcacld-2.0 to qcacld-3.0 propagation

If self-recovery is enabled in ini file, recover if host driver fails to
receive HTC ACK from FW for PDEV suspend, otherwise do VOS_BUG.

Change-Id: Ieddb22c5806067ec1a1166b60e1642e6cdf74a4c
CRs-fixed: 894187
2015-11-23 13:08:03 -08:00
Yue Ma
cd9614433f qcacld-3.0: Fix several SSR related issues
qcacld-2.0 to qcacld-3.0 propagation

- Kill wlan_tasklet before freeing TLshim free queue. This can avoid
  race condition between SSR and wlan_tasklet which is still processing
  Rx packets in the case of self-recovery when FW doesn't really crash.

- In additional to connected state, add disconnected/disconnecting states
  to send notification to supplicant for re-issuing connect after SSR.
  This is to avoid corner cases that while FW crashes, disconnection is
  happening or disconnection fails because of FW crash, the HDD state is
  changed from connected to disconnecting/disconnected.

Change-Id: I8ff295a443e946e8775354dcf4331ad024776cb7
CRs-fixed: 899479
2015-11-23 13:08:03 -08:00
Prakash Dhavali
7090c5fd8d qcacld-3.0: Initial snapshot of ihelium wlan driver
qcacld-3.0: Initial snapshot of ihelium wlan driver
to match code-scanned SU Release 5.0.0.139. This is
open-source version of wlan for next Android release.

Change-Id: Icf598ca97da74f84bea607e4e902d1889806f507
2015-11-17 17:52:53 -08:00