Commit Graph

29 Commits

Author SHA1 Message Date
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
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
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
a2ae5c115c Revert "qcacld-3.0: Enable gEnableTxSUBeamformer by default"
This reverts commit bff91464a2c38ed4ed0d3aa537d24372a6dd984a.

Change-Id: I84c07c9b2214a2d59cf35d9f0ee2deb5e838caf8
2015-11-23 13:08:12 -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
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
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
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
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
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