Commit Graph

2661 Commits

Author SHA1 Message Date
Yun Park
73ea8bbb2c qcacld-3.0: Send WLAN_CLIENT_DISONNNECT event from del_station
When receive STOP_BSS, send WLAN_CLIENT_DISONNNECT event send to IPA.
And upon receiving WLAN_CLIENT_DISONNNECT, check if all clients are
already disconnected to avoid redundant event processing.

Change-Id: Ibb3074cdaf65da9ea8c2032df86f9d66b2fce014
CRs-Fixed: 2096338
2017-10-17 18:11:24 -07:00
Hanumanth Reddy Pothula
aaa3f8871c qcacld-3.0: Fix CPU soft lock up during workqueue cancellation
Propagation from qcacld-2.0 to qcacld-3.0

ipv4 and ipv6 workqueues are initialized in open adapter for STA
and P2P modes but not for AP mode. The workqueues are cancelled
in stop adapter. The cancel_work_sync may be called on AP adapter
workqueue also, if just in time, the AP adapter mode has changed
to STA mode, for example during hostapd stop etc. This can cause
the cancel_work_sync to continuously loop since INIT_WORK has not
been called, finally raising CPU stuck. There is no harm in calling
INIT_WORK on any workqueue since it only makes sure that in cases
as above there is no undeterministic behaviour.

Fix cancel_work_sync issues by initializing ipv4 and ipv6 workqueues.

CRs-Fixed: 2121723
Change-Id: Ief8dd0c797dd1492fa30ca4e41da9e583548e21d
2017-10-17 18:11:22 -07:00
Dustin Brown
a7cf3a9bb5 qcacld-3.0: Avoid buffer overrun via null termination
__iw_softap_set_ini_cfg assumes a given user supplied buffer is null
terminated, which can lead to a buffer overrun. Ensure the buffer is
null terminated by copying it to a new, oversized buffer whose last byte
is zero.

Change-Id: If94e753026f79a368cd6b9cb7c745ade4ae29452
CRs-Fixed: 2118809
2017-10-17 18:11:20 -07:00
Yun Park
1027e8ca6d qcacld-3.0: Implement clearStats for TSO and NAPI statistics
Implement missing clearStats for TSO and NAPI statistics.

Change-Id: I384a6abcecca8276dadc647e93720e067f324aab
CRs-Fixed: 2024016
2017-10-17 18:11:18 -07:00
Yun Park
2aa880cc76 qcacld-3.0: Set Netdev Tx/Rx stat counter for IPA uC data path
Netdev Tx/Rx stat counters doesn't reflect packet counter from IPA
offload data path.
Change to add Tx/Rx packet counts from IPA uC data path through IPA uC
stats query.

Change-Id: If80dee818e97f4f75407885c20ee9abf2257be7c
CRs-Fixed: 956283
2017-10-17 15:57:53 -07:00
Jeff Johnson
ce4a8349b4 qcacld-3.0: Align on enum nl80211_wpa_versions
The original version of the driver was based upon wireless
extensions. Later when nl80211/cfg80211 support was added, in some
cases data received with nl80211 semantics was converted to wireless
extensions semantics. One such data item is the WPA version.

Now that wireless extensions have been deprecated, it is desirable to
align on cfg80211/nl80211 semantics. Therefore now align on enum
nl80211_wpa_versions for maintaining the WPA version.

Change-Id: I2a0fb6996b42adfe6dec7c14493c2dc10f83230c
CRs-Fixed: 2126880
2017-10-17 13:12:44 -07:00
Wu Gao
aceec6c1fc qcacld-3.0: Cleanup scan request when calling stop adapter
It doesn't record current scan request and won't cleanup being
process scan request. In some Rome platform, host driver just load one
time, scan request status mismatch to cfg80211 if didn't cleanup scan
request, and then cause crash.

Change-Id: I000db80bdf5175775f2415130ee3a2974aefa4ea
CRs-Fixed: 2111330
2017-10-17 11:48:50 -07:00
SaidiReddy Yenuga
744073fd06 qcacld-3.0: Fix wlan module loading issue
As part of configure default filters over suspend code
changes wlan module loading broken.

Fix the loading issue by adding the newly added files
to Kbuild.

CRs-Fixed: 2017259
Change-Id: Ib33efa8f7f5e2ca8d9734181df94f70557e9f9cd
2017-10-17 05:05:26 -07:00
Hanumanth Reddy Pothula
3def8945b0 qcacld-3.0: Configure and clear default packet filters over suspend and resume
In suspend mode multicast, broadcast packets wakes up host,
this leads to higher power consumption.

Add support to configure the IPv6/IPv4 multicast, IPv4 broadcast, XID,
STP, DTP/LLC/CDP packet filters based on ini bit map param, before the
device goes to suspend mode and clear the same filters in resume.

CRs-Fixed: 2011442
Change-Id: Ib355459132086902ba008f2abd17415a8f569b41
2017-10-17 05:05:24 -07:00
Jingxiang Ge
9db9d235af qcacld-3.0: Ignore netdev notifier when driver status is closed
when unloading driver, there is possible that the driver_status
has been DRIVER_MODULES_CLOSED, then NETDEV_GOING_DOWN is received,
which will cause assert in qdf_mutex_acquire as lock has been
destoryed.

Change-Id: Ic7e26dc1eb9a40a2462b041b0f3b84452e448cfd
CRs-Fixed: 2126832
2017-10-16 22:02:49 -07:00
Yun Park
d8fb1a803c qcacld-3.0: Fix memory leaks detected in pending_event list
Pending_event memory is dynamically allocated after driver loaded
but freed up only when driver unloading.
Fix to free pending_event memory when driver stop.

Change-Id: Ia748e311fc77fc99e193230910fccd7bc9b4f5a9
CRs-Fixed: 2126695
2017-10-16 18:06:51 -07:00
Krunal Soni
22208393bb qcacld-3.0: Remove SAP connection from policy manager upon stopbss
If SAP has no channel left to move then it will issue stop bss. In this
scenario, SAP is not cleaning up its entry from policy manager table
which causes stale entry left over in table.

Fix this situation by stopping the bss successfully and deleting entry
from policy manager table.

Change-Id: I7c7d305936fe16b0deebb9b7a67f7753cbf243e6
CRs-Fixed: 2112932
2017-10-16 16:44:13 -07:00
Mahesh Kumar Kalikot Veetil
c637fc91d7 qcacld-3.0: Allow BSS start during STA connection
SoftAP start fails during station connection is in progress and the flag
update_beacon is not set. Also allow beacon/probe resp update in the middle
of p2p connection.

Change-Id: I13d89b6b8b51f999ff317d1f55dc3fcf48bdd422
CRs-Fixed: 2108186
2017-10-16 16:44:09 -07:00
Mahesh Kumar Kalikot Veetil
0c5cb992cf Revert "qcacld-3.0: Don't allow start ap during sta connection"
This reverts Change-Id: I1887aab39d2fa13cc8a900164d2aa6d489464e42

Driver is no more acquiring qdf_conc_list_lock before calling
cds_get_pcl(). SME active queue will serialize connection request and
bss start commands.

Change-Id: I98066b8f1e756ae930ea97be6f8c6e6de244662d
CRs-Fixed: 2108186
2017-10-16 16:44:07 -07:00
Sravan Kumar Kairam
3a69831d44 qcacld-3.0: Send TX timeout event for TX data stall
For data stall continuous HDD tx timeout count of five
post HOST TX time out data stall event to handle it in
data detection module.

Change-Id: Ic6cf5e62f711cef5919a4a5e85e4232c622c04bb
CRs-Fixed: 2094393
2017-10-16 14:23:13 -07:00
Hanumanth Reddy Pothula
006f383e64 qcacld-3.0: Don't double start inactivity timer
There is a possibility of double start of inactivity timer if iff_up
(hdd_open) happens while probe/remove/reinit is still going on.

To mitigate this issue, on iff_up, start inactivity after acquiring
hdd_init_deinit_lock, which make sure probe/remove/reinit are
completed, and thereby inactivity timer is stopped.

Change-Id: I2417215380e318a8410a2d25eabf82f353a26c4f
CRs-Fixed: 2125494
2017-10-16 04:41:24 -07:00
Arunk Khandavalli
e9ef42ae0c qcacld-3.0: Start inactivity timer for hdd_open
There can be deadlock on iff_up on anyone of mutex's like
init_deinit_lock, iface_change_lock. To catch what caused the
deadlock start the inactivity timer to root-cause the issue

CRs-Fixed: 2120569
Change-Id: I830cc4127a9c0691ee44a5e2c56c871471d638db
2017-10-16 04:41:08 -07:00
SaidiReddy Yenuga
a92f8cc9a1 qcacld-3.0: Add support for configuring modulated DTIM dynamically
qcacld-2.0 to qcacld-3.0 Propagation.

Wifi OFF/ON is needed to update the gEnableModuleDTIM ini param.

Add private ioctl to configure modulated DTIM at runtime.

CRs-Fixed: 2002662
Change-Id: I28be432da775a9aa026cd702c63dee5666260d33
2017-10-16 16:47:49 +05:30
Varun Reddy Yeturu
b60d5227da qcacld-3.0: Tune config parameters for scan rest time
Fine tune the scan rest time configuration parameters,
gRoamRestTimeMin and gNeighborScanTimerPeriod to 50ms and
100ms respectively for better power efficiency.

Change-Id: Ia6edb87dbb0abf4771613a028d711f4f7a4e0f41
CRs-Fixed: 2120683
2017-10-16 01:56:48 -07:00
Kiran Kumar Lokere
b0f19c322c qcacld-3.0: Send IMPS disable cmd to FW if disabled in INI
If the IMPS disabled in INI send the IMPS disable command to FW

Change-Id: I1cfc731b8d0e8eddc4dc0ffa6d3b59f22506943c
CRs-Fixed: 2126599
2017-10-13 19:51:27 -07:00
Yun Park
fec73dc984 qcacld-3.0: Add default log message to IPA init/deinit code
Add default log message to IPA interface init/deinit code while WLAN
driver load/unload process.

Change-Id: Ibfb1f9444c73e0dbbb1899f02aee0727c44765bf
CRs-Fixed: 2108804
2017-10-13 19:51:26 -07:00
Mahesh Kumar Kalikot Veetil
9111a57ae0 qcacld-3.0: Fix code style issues
Fix code style issues introduced by the change
"Change-Id: I3934f2a18c796ed3b53175dcbe7efd7f4d1409b9" in HDD.

Change-Id: Ib2c411017f1a838156a222d2e536fad15056daf0
CRs-Fixed: 2122828
2017-10-13 15:51:25 -07:00
Arif Hussain
3a9030acda qcacld-3.0: Include correct dfs header file
To avoid circular dependency, cleanup is done
in common code, So use correct header file to
fix any compilation issue.

Change-Id: Id094107dda4f34ed479ead0b801da27c7aa240ff
CRs-Fixed: 2126011
2017-10-13 13:42:41 -07:00
Himanshu Agarwal
c855227306 qcacld-3.0: Extract value of auto_channel_select_weight ini
When force_sap_acs is enabled, hostapd acs will be discarded
and driver acs will happen with override values from ini. Finally
weight for a channel is calculated based on rssi, bsscount. etc.
from auto_channel_select_weight. This ini value is getting extracted
only in __wlan_hdd_cfg80211_do_acs() and so ini value won't be updated
in sap config when hostapd acs doesn't happen or force_sap_acs is enabled.

Update auto_channel_select_weight ini value in sap config in
wlan_hdd_cfg80211_start_bss() which is called irrespective of any
configuration.

Change-Id: I90f549fece117a72c19cf5fdc9f6485b1ab8afdc
CRs-Fixed: 2125597
2017-10-13 01:52:04 -07:00
Tiger Yu
438c648c7b qcacld-3.0: Fix the coding style error
Fix the coding style error.

Change-Id: Iafd3fc730c188fe027fc9a4dde3f45520091f47b
CRs-Fixed: 2125802
2017-10-13 01:52:02 -07:00
Yue Ma
9f275d9bdb qcacld-3.0: Add debug print for wlan_hdd_validate_context
It can help to trace what is happening during load/unload and
avoid just exiting silently.

Change-Id: I61a451058a7846d3627500db2c9d8d5998e8210e
CRs-fixed: 2123331
2017-10-13 00:10:48 -07:00
Yue Ma
cd359b7e00 qcacld-3.0: Move runtime suspend context init to correct place
Commit fb9d5acfed and 645749571d introduce an API to deinit scan
runtime suspend lock and move runtime suspend context deinit in
order to fix a memory leak issue. However, it breaks SSR because
runtime suspend context init and deinit are not matching during
SSR which results double free happens in the rmmod after SSR.
Move runtime suspend context init to correct place.

Change-Id: I698385ab52e7e18636b143cd71c229afb676baff
CRs-fixed: 2123331
2017-10-13 00:10:46 -07:00
Yuanyuan Liu
5583b2cd0f qcacld-3.0: Convert probe return error from -ENOMEM to -EPROBE_DEFER
If probe failed because of no memory, we want to try to recovery by
issuing a re-probe for built-in driver. Hence, convert probe return
error from -ENOMEM to -EPROBE_DEFER for built-in driver so that
platform driver can issue re-probe based on the return value.

CRs-Fixed: 2124159
Change-Id: I6cca0ed186554c8065b77af8c178ca9e143abf98
2017-10-13 00:10:44 -07:00
Abhishek Singh
9d5f4580f0 qcacld-3.0: Use per session cb mode to validate channel bw switch
In driver as part of __wlan_hdd_cfg80211_set_ap_channel_width() driver
modify the channelBondingMode24GHz and this modified value is not
changed to default value once hostapd restarts.

Due to this when the 20/40 BSS Coexistence Management frame is
received and hostapd tries to change the width to 20Mhz using
__wlan_hdd_cfg80211_set_ap_channel_width(), as
channelBondingMode24GHz is already set to 0, the request is
ignored and SAP doesn’t switch to 20Mhz.

To fix this use per session cb mode to validate bw switch.

Change-Id: Ia233c478794602aa6909cf637c5fc8c82fc3433a
CRs-Fixed: 2058315
2017-10-12 14:03:00 -07:00
Mukul Sharma
07bd875c18 qcacld-3.0: Acquire wakelock until change iface timer expires
Currently, when wifi is disabled from UI, and if the device goes
to suspend before the interface change timer expires, then until
the next APPS wakeup wifi remains enabled hence power numbers are
high.
As a part of fix, Host acquire wakelock when it start change
interface timer.

Change-Id: I41662596725315a6cfe185ee23ae889b69938e0b
CRs-Fixed: 2091154
2017-10-12 14:02:31 -07:00
Sravan Kumar Kairam
6b727a4ca7 qcacld-3.0: Implement nbuf alloc fail replenish timer
Implement nbuf alloc fail replenish timer which starts when
there is an nbuf allocation failure and stops when there is
an nbuf allocation success with in the timer expiry duration.

Change-Id: Ie956ea144dec4323664632d00bb8f0f82ba22439
CRs-Fixed: 2033944
2017-10-12 14:02:26 -07:00
Himanshu Agarwal
8bcec57472 qcacld-3.0: Add INI support for best candidate algo and RSSI scoring
1) Currently all the parameter to decide best candidate are chosen
   as by default.
   Add INI support for those parameters to change values on basis
   of performance.
2) At the time of calculating best candidate score, rssi consider
   bucket size, good rssi, bad rssi, good rssi percentage from total
   rssi percentage, bad rssi percentage from total percentage.
   Configure these all params from ini.

Change-Id: I808a40486473fcbb161c12fbd369b3b846beb8c2
CRs-Fixed: 2121735
2017-10-12 14:02:08 -07:00
tfyu
5f01db27c1 qcacld-3.0: Enable the TX orphan for TCP packets by gEnableTxOrphan
Enable the TX orphan for TCP packets by gEnableTxOrphan if TX flow control
is not enabled, such as SCC mode.

Change-Id: I0f3bc41bb22f8db10614d4833558caa664e52517
CRs-Fixed: 2123892
2017-10-12 14:01:42 -07:00
Jeff Johnson
435e1b8760 qcacld-3.0: Fix trivial long lines in wlan_hdd_assoc.c
Checkpatch has detected multiple instances of "line over 80
characters." Some of them are trivial, so fix them.

Note that there are some instances that can only be addressed by
refactoring the code, and those will be addressed later.

Change-Id: I5d23b8cc7643d83a349532e3f2d32cd27b5dca95
CRs-Fixed: 2122896
2017-10-12 14:01:23 -07:00
Jeff Johnson
21d63bbde7 qcacld-3.0: Fix whitespace issues in WE_UNIT_TEST_CMD handler
Change "qcacld-3.0: Provide SME API to send unit test command to FW"
introduced two whitespace-related issues flagged by checkpatch:
- WARNING: suspect code indent for conditional statements (16, 20)
- WARNING: Statements should start on a tabstop

Fix those issues, as well as update an error message to align with the
new design.

Change-Id: Ic58c3330f73c838ba100e7621ce23eadc3f0d7b0
CRs-Fixed: 2122894
2017-10-12 14:01:19 -07:00
Jeff Johnson
a5fb21806a qcacld-3.0: Remove unnecessary else in hdd_indicate_tsf_internal()
Checkpatch has detected one instance of "else is not generally useful
after a break or return" in hdd_indicate_tsf_internal(), so fix it.

Change-Id: I6aa92cc7966795e719eb5824a3a9354928e79590
CRs-Fixed: 2122872
2017-10-12 14:01:14 -07:00
Jeff Johnson
d6d1f63d73 qcacld-3.0: Fix long lines in wlan_hdd_power.c
Checkpatch has detected multiple instances of "line over 80
characters" so fix them. Also remove an obsolete extern to
eliminate an instance of "externs should be avoided in .c files."

Change-Id: Ic6b2082c2df0ffb20ce10c3c3a51c2fbebe849c7
CRs-Fixed: 2122873
2017-10-12 14:01:10 -07:00
Jeff Johnson
4929cd9a2d qcacld-3.0: Fix long lines in wlan_hdd_ipa.c
Checkpatch has detected multiple instances of "line over 80
characters" so fix them. Also fix one instance of "else is not
generally useful after a break or return."

Change-Id: Ifb03d4d1399a53fa69f03ce2f77ccfca3929d1cc
CRs-Fixed: 2122822
2017-10-12 14:01:05 -07:00
Jeff Johnson
6dff3eeb62 qcacld-3.0: Fix long lines in wlan_hdd_main.h
Checkpatch has detected instances of "line over 80 characters" so fix
them.

Change-Id: Ia4241c997a01979bd4e5aac32920f780641bcb01
CRs-Fixed: 2122693
2017-10-12 14:01:01 -07:00
Jeff Johnson
11b4c32fd0 qcacld-3.0: Fix long lines in wlan_hdd_nan_datapath.c
Checkpatch has detected instances of "line over 80 characters" so
fix them.

Change-Id: Id6cae4045104ed34cba84ef88b518e4b1da474f5
CRs-Fixed: 2122615
2017-10-12 14:00:57 -07:00
Jeff Johnson
2381294829 qcacld-3.0: Rename sap_restart_chan_switch_cb()
Functions exported by HDD should have an HDD prefix so rename
sap_restart_chan_switch_cb() since it is exported by HDD.

Change-Id: I7b871774bb537e60e2992d471ab57b342246dd50
CRs-Fixed: 2122575
2017-10-12 14:00:53 -07:00
Jeff Johnson
4ba73cb1f1 qcacld-3.0: hdd: Replace typedef tSirBssDescription
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tSirBssDescription typedef does
not meet any of those criteria, so replace references to it within HDD
with a reference to the underlying struct.

Change-Id: I13938fc15841986e9957f4774fbcfd035f734ccd
CRs-Fixed: 2122558
2017-10-12 14:00:49 -07:00
Jeff Johnson
38e38a8483 qcacld-3.0: Remove duplicate GET_IE_LEN_IN_BSS_DESC() macros
Both HDD and SAP define GET_IE_LEN_IN_BSS_DESC() macros, but these
macros simply replicate the logic already present in the global macro
GET_IE_LEN_IN_BSS(). Therefore delete these macros, and use
GET_IE_LEN_IN_BSS() instead.

Change-Id: I431984673141715ad32ca6ea96e31722129ce929
CRs-Fixed: 2122547
2017-10-12 14:00:45 -07:00
Jeff Johnson
e58271f05c qcacld-3.0: Rename struct sSirBssDescription
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename struct sSirBssDescription to align with
the Coding Style.

Note that it will be a separate exercie to replace instances of the
tSirBssDescription and tpSirBssDescription typedefs.

Change-Id: Ia698c5290e719ac6eef22cdee56e8954e5f61146
CRs-Fixed: 2122503
2017-10-12 14:00:41 -07:00
Jeff Johnson
011c450b4a qcacld-3.0: Add support for pdev_reset ioctl
Test team requires support for pdev_reset ioctl that is present
on other devices, so add support for it.

Change-Id: I8d9b30987dfbdbc94de0a1ab2a0c686c93c7da8a
CRs-Fixed: 2122060
2017-10-12 14:00:37 -07:00
Jeff Johnson
59eb5fde86 qcacld-3.0: hdd: Fix code indentation issues
Checkpatch identified multiple indentation issues in hdd including:
- Statements should start on a tabstop
- suspect code indent for conditional statements
- labels should not be indented

Fix these issues.

(Note that there is a false positive "labels should not be indented"
in wlan_hdd_memdump.c that should not being modified)

Change-Id: I781fb05bffe6c75183bdd45d797a248d2cd06e6b
CRs-Fixed: 2121931
2017-10-12 14:00:34 -07:00
Jeff Johnson
dcf84ce461 qcacld-3.0: hdd: Fix block comment issues
Checkpatch reported multiple block comment issues in hdd including:
- Block comments use * on subsequent lines
- Block comments should align the * on each line
- Block comments use a trailing */ on a separate line

Fix those issues.

Change-Id: Ic2b74c520ffb4be1c82fad6f6bdd0a9474d4b506
CRs-Fixed: 2121930
2017-10-12 14:00:31 -07:00
Jeff Johnson
33a079296b qcacld-3.0: hdd: Remove unnecessary void function return statements
Checkpatch reported multiple instances of "void function return
statements are not generally useful" in hdd, so remove them.

Change-Id: Ia6ac669bdb9eaa71f9a68f1ef20f230acd59bf76
CRs-Fixed: 2121928
2017-10-12 14:00:27 -07:00
Jeff Johnson
4f7f7c6739 qcacld-3.0: hdd: Add missing blank line after declarations
Checkpatch reported multiple instances of "Missing a blank line after
declarations" in hdd, so fix them.

Change-Id: I0b86be9066425d0a92f88b96e08ff4a57f91765e
CRs-Fixed: 2121927
2017-10-12 14:00:23 -07:00
Arif Hussain
4549efa73b qcacld-3.0: Use updated dfs public function
Dfs public function are renamed to have utils_ prefix,
make sure to call new dfs public API's.

Change-Id: Ib36ebb6ca4d3838c5e7468e22f6dd5182a0a08e0
CRs-Fixed: 2124373
2017-10-12 14:00:08 -07:00