Commit Graph

510 Commits

Author SHA1 Message Date
Kapil Gupta
8878ad9517 qcacld-3.0: Add support for external auto channel selection
Add changes to enabled driver to use external auto selection
logic instead of current driver based implementation.
In case external application is not present, driver will fall
back to current solution.

Change-Id: Ib7474e82bc7f5878af46c91ea09711775a7c046a
CRs-Fixed: 1110061
2017-02-13 23:01:23 -08:00
Selvaraj, Sridhar
8fe6c67d2c qcacld-3.0: Logging enhancements to LFR3 Roaming
1) Add enhancements to the existing log prints for lFR3
with respect to host driver code.
2) Fix memory leak in Wma roaming config handler.

Change-Id: If3e26a7f374673a4c7c11862e94f042bcf9d3c58
CRs-Fixed: 1109354
2017-02-06 03:27:09 -08:00
Jeff Johnson
e8216e8705 qcacld-3.0: Update sme_encrypt_decrypt_msg()
A new HDD Request Management framework is being deployed. One of the
requirements of that framework is that every request API must have a
provision for a caller-supplied context, and that caller-supplied
context must be returned to the caller when the callback function is
invoked.

Currently sme_encrypt_decrypt_msg() is not aligned with that
requirement. There is no provision for a caller-supplied context;
instead the HDD handle which is stored in the MAC context is always
returned.

In order to prepare sme_encrypt_decrypt_msg() for the HDD Request
Management framework update the curent implementation as follows:
1) Remove the separate registration and deregistration of the callback
   function pointer, and instead make the callback function and
   callback context parameters to sme_encrypt_decrypt_msg().
2) Pass the callback context when invoking the callback function.

Change-Id: I6e8c5405393f4cb732d9874ac07145caf5e95cac
CRs-Fixed: 2000026
2017-02-03 12:25:45 -08:00
Jeff Johnson
a867e0c43c qcacld-3.0: Update sme_get_bpf_offload_capabilities()
A new HDD Request Management framework is being deployed. One of the
requirements of that framework is that every request API must have a
provision for a caller-supplied context, and that caller-supplied
context must be returned to the caller when the callback function is
invoked.

Currently sme_get_bpf_offload_capabilities() is not aligned with that
requirement. There is no provision for a caller-supplied context;
instead the HDD handle which is stored in the MAC context is always
returned.

In order to prepare sme_get_bpf_offload_capabilities() for the HDD
Request Management framework update the curent implementation as
follows:
1) Remove the separate registration and deregistration of the callback
   function pointer, and instead make the callback function and
   callback context parameters to sme_get_bpf_offload_capabilities().
2) Pass the callback context when invoking the callback function.

Change-Id: I3967fdf9b002d961b0ec9a7ea78e7783b47c50a3
CRs-Fixed: 2000024
2017-02-03 12:25:42 -08:00
Jeff Johnson
a5317a6a20 qcacld-3.0: Sanitize the sme_get_link_speed() API
Currently sme_get_link_speed() requires that the caller pass an
allocated buffer as the lsReq param. This violates the general
concensus that SME should make no assumptions about the buffers passed
to it by HDD.

Update the implementation such that SME allocates the buffer that will
be passed in the message, and update HDD to use the stack.

Note that this is a prerequisite for moving the linkspeed request
processing to the new HDD Request Management infrastructure.

Change-Id: I09257855c6c260bb4a6ca91eb79bb24813cc5efa
CRs-Fixed: 2000023
2017-02-03 12:25:40 -08:00
yeshwanth sriram guntuka
6751663cb1 qcacld-3.0: Fix memory leak in CSR
Memory leak in csr_scan_save_roam_offload_ap_to_scan_cache
due to not freeing memory allocated using
csr_get_parsed_bss_description_ies.

Free memory in csr_scan_save_roam_offload_ap_to_scan_cache
function.

Change-Id: I6487dc5964e0e671b429f256e001fcb9d117f44b
CRs-Fixed: 1116621
2017-02-03 04:03:07 -08:00
yeshwanth sriram guntuka
db501225c3 qcacld-3.0: Update the scan result only upon finding an active session
Invalidate the scan entry if there is no active session and
do not inform it to the user space.

Change-Id: I134cceef0cfc54f68966d3287d92bdf6b35e33fc
CRs-Fixed: 1114216
2017-02-03 01:28:34 -08:00
Rajeev Kumar
d138ac59cc qcacld-3.0: Rename legacy cds_send_mb_message_to_mac properly
Legacy message posting api cds_send_mb_message_to_mac does not
belong to cds and is relocated to WMA legacy file hence rename
it accordingly.

Change-Id: I68e868b0019896baa91e34418064b33219eef2ca
CRs-Fixed: 2000246
2017-02-02 18:38:58 -08:00
Rajeev Kumar
e406d65d70 qcacld-3.0: Move legacy UMAC posting API to legacy file
After control path scheduler componentization cds_mq.[ch]
needs to be deleted hence remove legacy UMAC message posting
API to WMA legacy file.

Change-Id: I781a7586cb6dbf635e283eacd38c768a6b7f6d3e
CRs-Fixed: 2000234
2017-02-02 18:38:55 -08:00
Dustin Brown
e94495c41d qcacld-3.0: Remove dead sme_configure_rxp_filter()
sme_configure_rxp_filter() sends a WMA message type that isn't being
handled, effectively making it dead code. Remove
sme_configure_rxp_filter and cleanup calling contexts as necessary.

Change-Id: I04190111e1c714cf93b42c9f17ea4d80049ee98d
CRs-Fixed: 1114226
2017-01-31 11:20:37 -08:00
Naveen Rawat
10b1c15524 qcacld-3.0: Restrict SAP in 11abg mode when starting in 5/10 MHz
Restrict SAP in 11abg mode when starting in 5/10 MHz, since sub 20MHz
channel width is not compatible with HT and VHT rates.

Change-Id: I80b3f7b8f360368f3c3cfe653c90432dfd173ce2
CRs-Fixed: 1113259
2017-01-30 11:21:01 -08:00
Arif Hussain
c6aa1ceb94 qcacld-3.0: Set CSN value in assoc request based on peer’s CSN value
Instead of using CSN value based on peer’s numSoundingDim, check peer’s
CSN value to make sure CSN value in assoc request should not be greater
than the peer CSN value.

Change-Id: I1456fbeb3ab1ef294d16b8383a5a094ca68d09c2
CRs-Fixed: 1116537
2017-01-28 04:50:20 -08:00
Sreelakshmi Konamki
0a942d4f66 qcacld-3.0: Update TSPEC IEs to CSR if TSPEC IE present in reassoc rsp
Currently TSPEC IEs are not updated to CSR when reassoc response included
TSPEC IEs. In LFR3 CCX roaming, CSR doesnt get TSPEC IE data as reassoc rsp
doesnt include RIC data.
Del TSPEC is not being processed properly at CSR level as it doesnt have
any TSPEC information.

Add changes to update TSPEC IEs and length to CSR after successful
CCX roaming.

Change-Id: I0e024c8264cb2e06042d517824245db1f1d09aea
CRs-Fixed: 1108440
2017-01-26 01:09:52 -08:00
Padma, Santhosh Kumar
31bac74c81 qcacld-3.0: Send scan results to kernel as and when driver receives
Currently scan results are first cached in SME and then they are
updated to kernel using results in SME cache. This may result in
updation of stale entries to kernel. Fix this by sending scan results
to kernel as and when driver receives them.

Also, add changes to send ext scan results to kernel.

Change-Id: I18f4b36cf3a9fc2e191352c868f69d797eb0a786
CRs-Fixed: 1098411
2017-01-26 01:09:50 -08:00
Rajeev Kumar
feb96388e1 qcacld-3.0: Fix 80 columns issue introduced in tSirMsgQ clean up
Fix code exceeding 80 columns introduced after replacing tSirMsgQ
message types in mac with converged scheduler apis.

Change-Id: I8fe87318fd913d6fa8dbabdb7ebfaa96fd57d959
CRs-Fixed: 1114457
2017-01-23 13:06:45 -08:00
Rajeev Kumar
156188e64e qcacld-3.0: Remove redundant type casts for scheduler msg
Complete cld driver is using common scheduler message queue APIs
hence remove redundant type casts associated with scheduler message
queue structures and APIs.

Change-Id: Ia5d6208cc365acd94f20bbc7cadc0e22be6fbd01
CRs-Fixed: 1114379
2017-01-23 13:06:18 -08:00
Rajeev Kumar
416b73f3d0 qcacld-3.0: Remove duplicate tSirMsgQ structure from MAC module
After control path scheduler componentization every legacy module
is supposed to use common converged scheduler message types and APIs.
Remove duplicate tSirMsgQ message types in mac and use converged scheduler
message queue APIs.

Change-Id: If47df18043f8127a20a72562bf45afe37dabca72
CRs-Fixed: 1114378
2017-01-23 13:06:16 -08:00
Rajeev Kumar
8eaedf65a1 qcacld-3.0: Remove obsolete CDS mq APIs reference from SME module
After control path scheduler componentization CDS message queue
APIs are no longer used hence replace CDS mq APIs in SME by
scheduler mq APIs.

Change-Id: I645209741a602798fc077a50ac66de198e292038
CRs-Fixed: 1114363
2017-01-21 22:01:01 -08:00
Abhishek Singh
562aad6cf8 qcacld-3.0: Enhance 5/10 MHz feature logging
Add logs to enhance 5/10 MHz feature logging

Change-Id: Ied2489185721e3c547ee392a9c46b5a3d733ad74
CRs-Fixed: 1108818
2017-01-19 02:42:07 -08:00
Abhishek Singh
44d3e486c7 qcacld-3.0: Reset uOsRequestedHandoff when reassoc fails
qcacld-2.0 to qcacld-3.0 propagation

uOsRequestedHandoff is not reset in many scenarios after reassoc
fails/timeout. Due to this if the next connect request initiate
scan for ssid to find the AP in local cache, the scan for ssid
complete handler think that OS requested handoff is in progress
and returns without initiating the connect or connect failure.
Thus the HDD remains in connecting state and after that scans
fails.

To fix this reset uOsRequestedHandoff whenever reassoc fails

Change-Id: Ife9ee885cc1638f2bc4e02fd91b000c6e00f0689
CRs-Fixed: 1101706
2017-01-19 02:42:04 -08:00
Abhishek Singh
3c9910e266 qcacld-3.0: Prioritize the bssid_hint and if fails try with other BSS
qcacld-2.0 to qcacld-3.0 propagation

If connect request has bssid_hint the behaviour is same as
when connect request has bssid present. So driver only try
to connect to BSSID present in the bssid_hint.

With this change if bssid_hint is provided in connect request
driver will prioritize connection to the BSSID provided and if it
fails to connect to bssid_hint, driver will try to connect to
other APs with same profile.

Change-Id: Ie7fd29cdfb2013aca1d4944272da6b3c29a16ab3
CRs-Fixed: 1107816
2017-01-19 02:41:50 -08:00
Krishna Kumaar Natarajan
5554cec78d qcacld-3.0: Fix peer_state transition in IBSS network
Fix peer_state transition in case of IBSS network. Currently
when IBSS peer is created, it is updated to Authenticated state
even before set key is complete. This is putting hardware into
bad state.

Add check in hdd_hard_start_xmit to check if peer is in authenticated
state before transmitting any packet.

Change-Id: Id89fac911cd757e2df368bb7e15a3cf476b2d90f
CRs-Fixed: 1111977
2017-01-18 19:25:14 -08:00
Naveen Rawat
2165e3ddc7 qcacld-3.0: Fix NULL pointer dereference
Fix NULL pointer dereference.

Change-Id: If5032543798da87c83647899c1a0711ba924178a
CRs-Fixed: 1111041
2017-01-17 11:53:07 -08:00
Naveen Rawat
4f3983ec6d qcacld-3.0: NAN Datapath security changes
This is qcacld-2.0 to qcacld-3.0 propagation.

Implement NAN Datapath security changes. This mainly involves:
1) Getting CSID and PMK parameters from user layers and passing down
   to firmware.
2) Passing CSID and SCID parameter received from firmware to user layers.

Change-Id: I25c85944abf4206f40b73f86996e9425c22df66a
CRs-Fixed: 1095382
2017-01-17 11:53:06 -08:00
Agrawal, Ashish
9f84c40158 qcacld-3.0: Update unsafe channel list for sta based on SAP operating band
qcacld-2.0 to qcacld-3.0 propagation

If SAP band is 2.4Ghz, driver will allow 5Ghz unsafe channels
in station scan list for connection / roaming.
And if SAP band is 5Ghz, We will allow 2.4Ghz unsafe channels
in station scan list for connection / roaming.

Change-Id: Ia204e5cabb6d8b87def90e42d4192afd5878e6fe
CRs-Fixed: 1062202
2017-01-16 12:15:45 -08:00
yeshwanth sriram guntuka
310b3ac34c qcacld-3.0: Add support for vendor abort scan
Add vendor abort scan which takes adapter and scan
id as input. Supplicant may abort a scan if a
preferred AP or P2P peer device is found.

Change-Id: Ia9cbf4bb38d2111b1fcf42a1e1f51d1049f5a9ab
CRs-Fixed: 1090800
2017-01-16 11:31:07 -08:00
Sandeep Puligilla
4d976b6d07 qcacld-3.0: Cancel host roaming during del session
-Disconnect triggered due to deauth from peer, at
 the Same instance supplicant also triggered change iface
 which initiated stop adapter.
-Disconnect triggered host based lost link scan and .
 Stop adapter triggered vdev delete.
-VDEV delete is sent before Scan request which triggered
assert at firmware.

Cancel all the host based roaming scans as part of sme
close session handling.

Change-Id: I350b840264751615779bc20dad96723c8bf41b76
CRs-Fixed: 1107525
2017-01-15 18:13:56 -08:00
Krunal Soni
4274f36bcd qcacld-3.0: Allow full spectrum scan when agile & aDFS scan supported
Traditionally full spectrum scan on STA/CLI is not allowed when SAP/GO is
already present on DFS channel.

With new generation of hardware, agile scan and agile DFS scan features
are supported which will allow hardware to do full spectrum scan even if
SAP/GO is present on DFS channel.

Change-Id: I7e5a21601642e0d6afef73beeecf80a3e0475909
CRs-Fixed: 1103730
2017-01-12 13:12:51 -08:00
Kabilan Kannan
3c0a735b24 qcacld-3.0: Add SAR power limit configuration
There is a regulatory requirement for Specific Absorption
Rate (SAR) whereby the phone transmit power is reduced
when it is determined that the phone is in close
proximity to the body.
Implement a vendor command interface to set SAR power
limits dynamically.

Change-Id: I137ce9bde2fa05e363d5af17e155dc739d862c5f
CRs-Fixed: 1098102
2017-01-11 09:06:36 -08:00
yeshwanth sriram guntuka
27e4ffcd83 qcacld-3.0: Add TSPEC IE in reassoc request for LFR3
In LFR3, for ccx scenario TSPEC IE are missing in
reassociation request frames initiated by FW.

Assoc IE are sent to FW via CSR Roam Scan Offload as
soon as connection is successful. Add the TSPEC IE
while sending assoc IE to FW via RSO command.

Change-Id: Ifa6145bfa209cca428321db9056c01c3a4b140de
CRs-Fixed: 1096199
2017-01-11 09:06:31 -08:00
Naveen Rawat
b56880cd83 qcacld-3.0: Match the timeout values at HDD with SME cmd timeout
Change the timeout values at HDD to match sme cmd timeout in all the
instances where HDD is sending cmd via SME command queue.

Change-Id: I00337169804b9ce71562cb114e4c2b92a7534dba
Crs-Fixed: 1100854
2017-01-11 09:06:29 -08:00
Sreelakshmi Konamki
8b8257c844 qcacld-3.0: Retrieve BSSID to support vendor scan
Host doesnt have changes to support specific BSSID vendor scan
if supplicant set specific BSSID.

Add changes to get BSSID to do specific scan if supplicant set BSSID.

Change-Id: I2b0ba590814e6c99f7003abdf855d3264b03a060
CRs-Fixed: 1099020
2017-01-11 09:06:27 -08:00
Deepak Dhamdhere
a2785820c4 qcacld-3.0: Enable roaming only on wlan0
Current implementation of host driver will support fast roaming only
on a single device even in DBS mode. It is allowed on the first
STA, i.e. wlan device created in driver initialization. Dynamic roaming
disable/enable is allowed only on that device. Roaming is marked as not
allowed on other devices.

Change-Id: I3e3a72eb4d8fe81f6d3b784ab70023d2e3ac5618
CRs-Fixed: 1092386
2017-01-11 09:06:24 -08:00
Yingying Tang
95409972fb qcacld-3.0: Add support to set wakeup pulse for WoW
Propagate from qcacld-2.0 to qcacld-3.0

Host send WoW pulse setting information to firmware and allow
firmware to use this pulse to wake host

Change-Id: I632b3e85a8e113b8b8d4c927e822dce53f1b6727
CRs-Fixed: 924672
2017-01-10 10:52:39 -08:00
Yeshwanth Sriram Guntuka
6f8b875ed5 qcacld-3.0: Fix memory leak in CSR
Memory leak in csr_roam_synch_callback due to not
freeing memory allocated using
csr_get_parsed_bss_description_ies.

Free the memory in function csr_roam_synch_callback.

Change-Id: Iab8454850eabe029df4a3e0d868ca461686ed72f
CRs-Fixed: 1098966
2017-01-10 10:52:37 -08:00
Sandeep Puligilla
7a5b84d5b0 qcacld-3.0: Increase SAP open session timeout value
In failure scenario host got two commands, one is connect
request on the STA interface and the second one is add
interface/open session on softAP interface.
HDD/SAP queues the eSmeCommandRoam first to
the SME active list and then eSmeCommandAddStaSession to
sme pending list with timeout value of 2 secs at SAP.
Connect takes more than 2 secs due to which addStaSession
gets timedout.

Configure SME active timeout value to 30sec.
Increase the wait time at SAP for open session to 30secs
which is equal to the SME active command timeout value.

Change-Id: I77a0279421566ded7cd0eb7cde7871d3074ec5cf
CRs-Fixed: 1096771
2017-01-10 10:52:33 -08:00
Prakash Dhavali
f3287ef57b qcacld-3.0: Do not send WEP keys to firmware after roaming
LFR module in firmware copies WEP keys from old AP to new AP during
roaming. Host driver should not install 0 length keys during roam
sync indication processing.

Change-Id: I002be0ab330a7161ca2554d9d423e8e1b2170e55
CRs-Fixed: 1096918
2017-01-09 15:46:56 -08:00
Prakash Dhavali
0b17550a35 qcacld-3.0: Update per session uapsd mask in sme after ADD TS rsp
In function sme_set_tspec_uapsd_mask_per_session update
uapsd_per_ac_bit_mask as per the values received from
ADD TS response. Otherwise, ini change if 0 will always
override ADD TS response values.

Change-Id: Ie834f651bb097c084c81c6ebc9c8637f96d7a075
CRs-Fixed: 1096829
2017-01-09 15:46:40 -08:00
Prakash Dhavali
2aa7f890c7 Revert "qcacld-3.0: Fix Beamformee STS capability Info field"
This reverts commit 8febc2164202ff0cca72b30bd4265ed322d2a944

Change-Id: Id3dbf1f27438e7c9f87b91ad95abd186cc1079e1
CRs-Fixed: 1096878
2017-01-09 15:46:38 -08:00
Amar Singhal
6edf9733ec qcacld-3.0: Keep source of driver hint also
Maintain source of driver as well as 11d hint. Use the source of
hint to correctly disable 11d if required.

CRs-Fixed: 1093565
Change-Id: Id0ccc44389836b72466b501f5ce024f1be4b5926
2017-01-09 11:21:45 -08:00
Sridhar Selvaraj
dc400d2572 qcacld-3.0: Add Host Driver support for Chip Power stats debugfs
Implementation of Host driver support to collect chip power stats
from firmware and display the stats in
    "adb shell cat /sys/kernel/debug/wlan0/power_stats".

Change-Id: I19595ebf5a6870a0ee4d3cc2ff47d18eb24d213c
CRs-Fixed: 1045057
2017-01-09 11:21:43 -08:00
Naveen Rawat
2560111dd2 qcacld-3.0: Logical AND current UAPSD bitmask with ADDTS rsp values
In function sme_ps_fill_uapsd_req_params perform a logical AND rather than OR
between current UASPD bitmask and values received in ADDTS response, otherwise
existing UAPSD bitmask (if all set) will always override ADDTS rsp values.

Change-Id: I17872f62b1f073963d3c04ad72415acd395f1ca5
CRs-Fixed: 1095306
2017-01-09 11:21:41 -08:00
Arif Hussain
b39eab4df0 qcacld-3.0: Fix Beamformee STS capability Info field
Revert “If26f49386b72864730679e05559b7bba80b5487a” changes
to advertise max value configured as per the WFA certification
requirement 5.2.63 STAUT acting as MU Beamformee.

Change-Id: Ib11f1f5cad89579277eba2e0b9f0cbc3ea26de5c
CRs-Fixed: 1093901
2017-01-09 11:21:34 -08:00
Hanumantha Reddy Pothula
3e5d6aae27 qcacld-3.0: Send disconnect indication to upperlayer after clean up in PE
qcacld-2.0 to qcacld-3.0 propagation.

Supplicant may send PNO command as disconnection was already informed
to supplicant while disconnection might still be in progress in PE
layer(DEL_STA/DEL_BSS).
Fix to send disconnect indication to upper layers after complete
cleanup.

Change-Id: I976044186eb8e79f709bda618b38815827a3e0c5
CRs-Fixed: 951162
2017-01-09 11:21:23 -08:00
Naveen Rawat
cd11831498 qcacld-3.0: Populate roam_request qos params from sme_session
While preparing roam_scan_offload_request in csr, populate QoS parameters
from current sme_session.

Change-Id: I8ec26b61babf15b622d2a96b304f068c15f78795
CRs-Fixed: 1092258
2017-01-09 11:21:21 -08:00
Naveen Rawat
d4c0c5475b qcacld-3.0: Check num_chn before accessing channel list array
In function csr_issue_11d_scan, num channels is fetched from mac_ctx
before being used to access channel list. Check it against
WNI_CFG_VALID_CHANNEL_LIST_LEN before accessing channel list.

Change-Id: I4ef21ca03e1227801aaed2d5598aba7b91fdf8d3
CRs-Fixed: 1091486
2017-01-09 11:21:19 -08:00
Krunal Soni
8f8507cc5b qcacld-3.0: Ignore rates from hostapd when doing SAP channel switch
When softap mode comes up, hostapd provides OFDM/CCK supported rates
based on hardware mode and channel. If same softap changes channel
from 2G to 5G or 5G to 2G then provided hostapd rates become invalid.

To avoid above condition, use basic rates generated within driver while
doing softap channel switch operation.

Ignore hostapd rates when pre-cac adapter is generated to handle radar
detection as pre-cap adapter is temporary & its not actual adapter.

CRs-Fixed: 1103673
Change-Id: Iec4b79ad848dec560b8a44cbaaa320416be62cb1
2016-12-22 10:58:04 -08:00
Krunal Soni
66c113f3e7 qcacld-3.0: change CDS_MQ_ID to QDF_MODULE_ID
As a common driver design, CDS_MQ_ID has to be replaced with
QDF_MODULE_ID

CRs-Fixed: 1104147
Change-Id: Id47770f24a6afa2dbd6b976122948b09a8873b77
2016-12-22 10:23:23 -08:00
Jeff Johnson
f5289be449 qcacld-3.0: Properly export qos_release_command()
We want to enable the -Wmissing-prototypes compiler switch. Currently
when enabled there is a build failure due to qos_release_command() not
having a prototype. Add a proper prototype, and remove the associated
extern declaration from sme_api.c that is no longer required. In
addition remove adjacent obsolete prototypes.

Change-Id: If5f67e4cb8fdfe01837620394f23ede74cd6cf7c
CRs-Fixed: 1095704
2016-12-19 10:19:46 -08:00
Rajeev Kumar
e4cbd534a6 qcacld-3.0: Clean up obsolete conditional compilation NAPIER_CODE
Clean up obsolete conditional compilation NAPIER_CODE.

Change-Id: I6655c135757117535be1ccdc688dbe7ff5bd5a6a
CRs-Fixed: 1095867
2016-12-14 14:25:02 -08:00