Commit Graph

4197 Commits

Author SHA1 Message Date
Karthik Kantamneni
309ed808f5 qcacld-3.0: Fix cfg80211 change interface failure
In cfg80211_change_iface if we don't get previous mode vdev
references then error is returned. In a case where there is
no vdev existing before this will cause sap failure.

Fix is if previous vdev reference is not available skip vdev
access and continue further operations.

Change-Id: I3209f1e1a86050baf389f20029a97a5bdb50d71d
CRs-Fixed: 2352385
2018-11-20 10:31:28 -08:00
wadesong
3daaeeb4ea qcacld-3.0: CFG INI refining - wave 3
Remove the definitions and related internal data structures and
value retrieving code of the following 3 CFG INI items, due to
they're not used to control any driver behavior any more.

 -gVccRssiTrigger
 -gVccUlMacLossThresh
 -gEnableBypass11d

Change-Id: I919bf191f48db4bf0947235ff804aed2b4b1bdb9
CRs-Fixed: 2352224
2018-11-20 10:31:24 -08:00
Jeff Johnson
b1e673cd1d qcacld-3.0: Fix camelCase in hdd_cfg_get_config()
In order to conform to the coding style rename local variables in
function hdd_cfg_get_config().

Change-Id: I2b3d3d6b5c3b630967bed389f7f33b6c7b091413
CRs-Fixed: 2352065
2018-11-20 05:28:43 -08:00
Bala Venkatesh
6d53709337 qcacld-3.0: ADD HE CFG items in MLME component
Refactor HE cap cfg items to new mlme component using
updated cfg architecture.

Change-Id: Ib983d3fc983dfffd2eee7efd1a4e3681d26d84a6
CRs-Fixed: 2351420
2018-11-20 00:26:34 -08:00
Bala Venkatesh
46e2903f11 qcacld-3.0: Refactor SAP CFG items
Refactor SAP CFG items gMaxLIModulatedDTIM,
gCountryCodePriority, gSapPreferredChanLocation.

Change-Id: I52a1b3f782c440b12a2f2dcf82d9dad6cf6e76e0
CRs-Fixed: 2351237
2018-11-17 08:00:20 -08:00
Jeff Johnson
3ba2732a20 qcacld-3.0: Use vtable in __iw_setint_getnone()
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). A prior set of changes has refactored all of
the individual sub-ioctl handling into separate functions with a
consistent signature. Now convert __iw_setint_getnone() to use a
vtable as the last step of refactoring.

Change-Id: I7f9d5442083a58b9f36e3bb874748d0d5068bc12
CRs-Fixed: 2350073
2018-11-16 09:24:11 -08:00
wadesong
3777915910 qcacld-3.0: Add missing CFG INI comment text - wave 2
1) Some CFG INI options' comment text are missing.
   Add them so automation script can parse and retrieve the
   correct comment text.
2) Fix some discrepancies in existing CFG INI comments.
3) Delete some INI items that are not used any more.

Change-Id: Ia2fc4fab70f78e99d14fd1f7f2b4248e6484ee32
CRs-Fixed: 2350612
2018-11-16 05:10:01 -08:00
gaurank kathpalia
651abcd134 qcacld-3.0: Legacy vdev type nss inis cleanup
With the introduction of new 32 bit ini for per vdev
nss and chains, the legacy inis are no longer required.

Cleanup the legacy inis of per vdev nss for both the
bands.

Change-Id: Ia4c8301062457a15a9bda49dca4a4a36a4372f88
CRs-Fixed: 2349204
2018-11-16 05:09:50 -08:00
gaurank kathpalia
b414bce3b7 qcacld-3.0: Add prefix NSS_CHAINS to band info
Add prefix NSS_CHAINS to band info to remove duplicate band
info in driver, and minor code cleanup.

Change-Id: I3a8446af6b6c272cfcb19583540e2384f64e3a1a
CRs-Fixed: 2347624
2018-11-16 05:09:35 -08:00
gaurank kathpalia
6982d47826 qcacld-3.0: Accept the dynamic command only in started state
Accept the command to change the dynamic params like nss
and chains only when the vdev is in connected state for
STA/P2P-CLI, and in start state in case of SAP/P2P-GO.

Change-Id: Id4d2e3c4ac6745e25c7005af0b3c95e3e1db4533
CRs-Fixed: 2347488
2018-11-16 05:09:30 -08:00
gaurank kathpalia
2472fb942e qcacld-3.0: Get the current chains in drv_cmd_get_antenna_mode
In the API drv_cmd_get_antenna_mode, the driver gets the
hdd_ctx->current_antenna_mode, which is pdev level, but
with the new feature of per vdev antenna mode, return the
num of chains for that particular vdev.

Change-Id: Ia8180592c34a29a7593943fc5e10c781682aac56
CRs-Fixed: 2347494
2018-11-16 05:09:20 -08:00
gaurank kathpalia
f95ae68380 qcacld-3.0: Remove the pdev level antenna mode
If the new feature of per vdev antenna mode is enabled, there
is no need of per pdev level antenna mode, as it may happen that
one vdev configures its antennas as 2, and the other vdev configures
its antennas as 1, which could lead to change of pdev level antenna
mode, by a vdev level command.

Fix is to keep the antenna mode only if the feature is not enabled.

Change-Id: I67011a5b88f8750cab22d76b1bf6d8ccc1f5375d
CRs-Fixed: 2347495
2018-11-16 05:09:16 -08:00
gaurank kathpalia
1281b30098 qcacld-3.0: Refactor nss update API
Refactor the code to a new API, and
inform the TDLS module about the new
nss change.

Change-Id: Ic478bed0634ba1f862d844994a0836a23eda3f56
CRs-Fixed: 2347496
2018-11-16 05:09:11 -08:00
gaurank kathpalia
7cb6a32f47 qcacld-3.0: Add support for dynamic chains update in set antenna mode ioctl
Populate and verify the num of chains params sent by
the user and then send it to the fw.

Change-Id: I9a4870913ce9484d1a5dc5fddcade72bdafb6116
CRs-Fixed: 2347501
2018-11-16 05:08:54 -08:00
gaurank kathpalia
2b32de0c58 qcacld-3.0: Validate nss configuration from user
Validate the nss set by the user and then
send the user config to the firmware

Change-Id: Ia1292e428e0c5b30ff0b96f2387ea29ceec9c97c
CRs-Fixed: 2347502
2018-11-16 05:08:50 -08:00
gaurank kathpalia
78af193878 qcacld-3.0: Populate the ini and dynamic params
Populate the ini and dynamic params from the mlme
component and store them to the respective
vdev component in mlme priv obj during vdev create.

Change-Id: Ic80526e51ba97c24b5340843fc97406a6ba4c7ef
CRs-Fixed: 2347504
2018-11-16 05:08:46 -08:00
gaurank kathpalia
5fcefa93b0 qcacld-3.0: Populate the per vdev chain capability in hdd context
Populate the feature capability from wmi to hdd config

Change-Id: I8931da53fb50229b405a2b7c1802a6d15a35781b
CRs-Fixed: 2347619
2018-11-16 05:08:38 -08:00
Abhishek Singh
0ba1e8f90e qcacld-3.0: Fix serialization command list full issue
In __wlan_hdd_cfg80211_del_station while disconnecting all the
connected stations, driver send both disassoc and deauth and wait
for disconnect to complete for the STA. Once disconnect is completed
for the 1st STA, it continue to disconnect the next STA.

Now as both disassoc and deauth were queued and both of them set the
wait event resulting in wait event set twice for a disconnect
indication. This result in wait completion for the next STA disconnect
as well. This lead dynamo effect and multiple STA disassoc and deauth
commands are added in the serialization queue filling it up.

Fix this by sending only deauth STA req and removing the duplicate
disassoc STA req. Thus the next command will be queued only when
disconnect is completed for 1st STA.

Change-Id: I4ae6c578a3177a2a6ff75e6e75606e8c5e2f81a0
CRs-Fixed: 2350557
2018-11-16 02:39:22 -08:00
Jeff Johnson
deab857b1b qcacld-3.0: Change hdd_we_set_11d_state() signature
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal update hdd_we_set_11d_state() to conform with a consistent
int()(adapter, value) signature.

Change-Id: I96a7424630ffc9fd3a8713d980fe6efad4a7be05
CRs-Fixed: 2350071
2018-11-16 01:04:02 -08:00
Jeff Johnson
b43ec12eb5 qcacld-3.0: Refactor WE_SET_MODULATED_DTIM ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_MODULATED_DTIM ioctl handling into a separate
function.

Change-Id: I81701e1c54e62deb01468bb16a940ae823014d04
CRs-Fixed: 2350072
2018-11-16 01:03:57 -08:00
Jeff Johnson
74696bbda0 qcacld-3.0: Refactor WE_SET_11AX_RATE ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_11AX_RATE ioctl handling into a separate
function with a consistent int()(adapter, value) signature.

Change-Id: Iaaba30073d59f96faddcb9f9baaabc60b8e58ee5
CRs-Fixed: 2350070
2018-11-16 01:03:53 -08:00
Jeff Johnson
d3f1efd8fa qcacld-3.0: Refactor WE_SET_CONC_SYSTEM_PREF ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_CONC_SYSTEM_PREF ioctl handling into a
separate function.

Change-Id: I89a0037902935d7ebf3c5ba3064ff9469d025c13
CRs-Fixed: 2350069
2018-11-16 01:03:49 -08:00
Jeff Johnson
e50951c939 qcacld-3.0: Refactor WE_SET_SCAN_DISABLE ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_SCAN_DISABLE ioctl handling into a separate
function.

Change-Id: I412098141c3d4664c24ef40d10d0372051b19b6b
CRs-Fixed: 2350068
2018-11-16 01:03:45 -08:00
Jeff Johnson
33ec1982cb qcacld-3.0: Refactor WE_SET_DEBUG_LOG ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_DEBUG_LOG ioctl handling into a separate
function.

Change-Id: I38b10ebef241cf202d17557293851af3b8af36ec
CRs-Fixed: 2350067
2018-11-15 23:26:10 -08:00
Jeff Johnson
0e07ca1d66 qcacld-3.0: Refactor WE_MCC_CONFIG_* ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_MCC_CONFIG_LATENCY and WE_MCC_CONFIG_QUOTA ioctl
handling into separate functions.

Change-Id: I3396b436d221871d3c22d838af1fbdfd229c7d66
CRs-Fixed: 2350066
2018-11-15 23:26:06 -08:00
Dustin Brown
5a26dae6d0 qcacld-3.0: Don't stop transition in ssr shutdown
During sub-system recovery, the platform driver invokes the wlan's
shutdown and reinit callbacks. Reinit is called regardless of the result
of shutdown. Currently, the SSR transition is aborted in shutdown in the
event of a failure. This results in a panic during reinit, which expects
to be protected by that transition. Regardless of the result of
shutdown, do not stop the SSR transition such that the entire recovery
process is properly protected.

Change-Id: I3685920de5a7d47f6334bf4d8389cb267a46fac2
CRs-Fixed: 2350868
2018-11-15 18:48:59 -08:00
gaurank kathpalia
5f6919b0f4 qcacld-3.0: Skip ACS based on hw mode and STA's channel
If the STA is already present, and a SAP has to come up,
return the STA channel as the best channel, and skip ACS,
if the Hw_mode is set according to the STA channel
Eg:- STA on channel 1, and hw_mode is 11B, or 11G.
Also the driver doesnt check the DFS master mode, and
includes the DFS channels in the ACS scan list, which
may result in SAP bringup on a DFS channel

Check the conc_channel, and acs_policy ini, and return the
best channel as the STA channel.
Also exclude the DFS channels from the ACS scan list if
DFS master mode is disabled.

Change-Id: I70951d7b51b620db8cda7ed771d5c36a7571a125
CRs-Fixed: 2340965
2018-11-15 17:19:26 -08:00
jitiphil
4e3bef4621 qcacld-3.0: disable pktlog as part of stop modules
Pktlog is not disabled as part of stop procedure. If
the DUT was booted up with WLAN turned off, the modules
will be loaded and after a timer expires they are
unloaded. At this point if WLAN was turned on, the start
procedure will try to enable pktlog and find that it
is already enabled, and will not send indication to
firmware.

Ensure pktlog is called as part of stop procedure.

Change-Id: If17fb597cabed59ef5a3220ba7e536820a940eaf
CRs-Fixed: 2349956
2018-11-15 03:38:19 -08:00
Min Liu
8c5d99e012 qcacld-3.0: Get vdev from adapter directly
For the case that there is leakage of vdev, get ref of vdev by mac address
might get the incorrect vdev object. Get vdev from adapter directly.

Add help function to get vdev reference counted before use it.

Change-Id: I7d4ad1a2b7031f2877adb19bc15f690616e87c74
CRs-Fixed: 2312152
2018-11-15 01:38:16 -08:00
Jeff Johnson
274a1d6063 qcacld-3.0: Refactor WE_SET_CHANNEL ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_CHANNEL ioctl handling into a separate
function.

Change-Id: I66a8e9902b8b2a1ab2df0088630dc9a4923fbabd
CRs-Fixed: 2350065
2018-11-14 22:06:10 -08:00
wadesong
5cea9124a5 qcacld-3.0: Add missing CFG INI comment text - wave 1
Some CFG INI options' comment text are missing.

Add them so automation script can parse and retrieve the
correct comment text.

Change-Id: I4f79b075244c18490c52bc9a178d36c47db43878
CRs-Fixed: 2348307
2018-11-14 18:51:40 -08:00
Kai Liu
eabb1df217 qcacld-3.0: Release bus clock and bandwidth when module stop
Wlan should release bus clock and bandwidth when module stop,
otherwise when system enter into X0 shutdown, voted clock is still on.

Change-Id: I735cbed1289b17ab2fbc81e35043f1f663a60473
CRs-Fixed: 2341653
2018-11-14 13:47:15 -08:00
Karthik Kantamneni
9180c75d61 qcacld-3.0: Add RTT related CFG item
ADD RTT MAC randomization CFG item based on converged cfg component

Change-Id: I0e1203fc3b3cdab8d9f331c90092b460a02f0fbf
CRs-Fixed: 2349709
2018-11-14 13:47:11 -08:00
Alok Kumar
2fad644d65 qcacld-3.0: Add vendor event to update TCP paramenter
Currently, TCP params are configured through cnss-daemon.

Add vendor event to configure TCP params through Wi-Fi HAL.

Change-Id: I5ca3e33a8b15b5d499f771098ce8a3c58e4bb850
CRs-Fixed: 2349253
2018-11-14 10:40:52 -08:00
yuanl
45a1526a61 qcacld-3.0: Fix compiling error for 32 bit platform
Fix compiling error on 32 bit platform due to integer overflow

Change-Id: Ie9517e141b504cfd28138a0e353a0fbbad46e806
CRs-Fixed: 2347903
2018-11-13 21:11:45 -08:00
Dustin Brown
13fa987a29 qcacld-3.0: Ignore uninitialized driver mode change
The driver mode can be dynamically controlled via the module parameter
"con_mode," which triggers the callback con_mode_handler(). However, if
the wlan module is loaded with a non-default con_mode, this callback
handler is invoked before module init (e.g. 'insmod wlan.ko
con_mode=5'). If con_mode_handler is invoked before module init, simply
return success, as no processing is needed.

Change-Id: Iaa426188d13507cc6c7f09a03effd881854bbf3d
CRs-Fixed: 2349370
2018-11-13 19:41:41 -08:00
Jeff Johnson
030cd90bd9 qcacld-3.0: Rename hdd_is_valid_mac_address() pMacAddr param
hdd_is_valid_mac_address() currently takes a parameter named pMacAddr.
Per the Linux coding style "mixed-case names are frowned upon" and
"so-called Hungarian notation [...] is brain damaged" so rename the
parameter to mac_addr to conform to the naming convention. As part of
the cleanup relocate the documentation so that the interface is
documented, not the implementation.

Change-Id: I4abff563bb396a4ffce1356527307ce3bfed8a16
CRs-Fixed: 2347990
2018-11-13 17:21:17 -08:00
Jeff Johnson
7c4335001d qcacld-3.0: Refactor WE_SET_AMPDU ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_AMPDU ioctl handling into a separate
function.

Change-Id: I76c11e2a099c2f9734a0e9b0208b339406b4a22c
CRs-Fixed: 2348656
2018-11-13 13:54:55 -08:00
Jeff Johnson
22e57f1269 qcacld-3.0: Refactor "set dbg" ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the "set dbg" ioctl handling into separate functions.
Note that the existing logic that updates the fw_log_settings in the
HDD context is obsolete, so remove that logic as part of the
refactoring.

Change-Id: Ibf632d1ef37905ca8159ea997dc07e4f2f7d12cc
CRs-Fixed: 2348502
2018-11-13 13:54:50 -08:00
Jeff Johnson
2e38127bd8 qcacld-3.0: Refactor "set vdev" ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the "set vdev" ioctl handling into separate functions.

Change-Id: I73cc9fd5400fadb5812687d13741b7c430a0045c
CRs-Fixed: 2347909
2018-11-13 12:04:39 -08:00
Dundi Raviteja
5296f49644 qcacld-3.0: Possible OOB access in wlan_hdd_cfg80211_start_bss()
In wlan_hdd_cfg80211_start_bss(), beacon head buffer is typecast
to ieee80211_mgmt structure without checking for buffer length
against beacon header length which may cause OOB access
while accessing iee80211_mgmt structure.

To address this, add check for beacon head length against beacon
header length before typecasting to iee80211_mgmt structure.

Also while accessing supported rates, length given to function
wlan_hdd_cfg80211_get_ie_ptr() is the total length of management
frame that also includes header length which may cause OOB access
while getting supported rates.

To address this, send only beacon data length and exclude header
length to function wlan_hdd_cfg80211_get_ie_ptr().

Change-Id: I442b236e48c3be8cbd8019c5c339593f9aa74e3e
CRs-Fixed: 2335957
2018-11-13 12:04:34 -08:00
wadesong
cc2e216a57 qcacld-3.0: Fix some discrepancies in CFG INI comments
Discrepancies between some of the CFG INI names and their comment
text were discovered during reviewing.

Fix them by making all comment text aligning with the real CFG
INI names.

Change-Id: I1bf5417ea79727da451d0d6ca1a5cd100523e49a
CRs-Fixed: 2348140
2018-11-13 08:28:08 -08:00
Dustin Brown
f967e48d1d qcacld-3.0: Integrate DSC (psoc ssr)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

As part of integrating the DSC APIs into HDD, protect psoc sub-system
recovery (SSR).

Change-Id: I0374cdb22259763b0f61a4bea89fdb4ffc2c215c
CRs-Fixed: 2348567
2018-11-13 08:28:04 -08:00
Dustin Brown
3ecc87863e qcacld-3.0: Integrate DSC (psoc idle shutdown/restart)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

As part of integrating the DSC APIs into HDD, protect psoc idle shutdown
and restart.

Change-Id: I416a8f4cfb67fabce377ff96715e3a372a3aed7d
CRs-Fixed: 2347019
2018-11-13 08:28:00 -08:00
Dustin Brown
623e7e358d qcacld-3.0: Integrate DSC (psoc probe/remove)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

As part of integrating the DSC APIs into HDD, protect psoc probe and
remove.

Change-Id: I5db13fb321695f535b5765c637ee638396e5ca6f
CRs-Fixed: 2347016
2018-11-13 04:20:44 -08:00
Jeff Johnson
20967c9708 qcacld-3.0: Remove unused enum essid_bcast_type
enum essid_bcast_type is unused. so remove it.

Change-Id: I9d4307bfb7f502576abb0434030888f5ca27243f
CRs-Fixed: 2348051
2018-11-13 01:11:31 -08:00
Jeff Johnson
034f3c92a8 qcacld-3.0: Replace tpAniSirGlobal in HDD
Typedef tpAniSirGlobal is obsolete, so replace it with the underlying
struct pointer or handle conversion function as appropriate.

Change-Id: I4dd5d91f54bfb57d6322a5e3c91795b80393da8a
CRs-Fixed: 2347908
2018-11-13 01:11:27 -08:00
Jeff Johnson
5d0e8cd6cd qcacld-3.0: Refactor "set pdev" ioctl processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the "set pdev" ioctl handling into separate functions.

Change-Id: I4f382b7681710ce50cb5b2ffe65e4ad03d73a670
CRs-Fixed: 2346189
2018-11-13 01:11:24 -08:00
Jeff Johnson
6fea9da115 qcacld-3.0: Remove unused wlan_hdd_set_pre_cac_status() param
Change "qcacld-3.0: Remove wlan_sap_set_pre_cac_status() handle param"
(Change-Id I1c280be8c7c65a28267a9ab38d76fb8aa94e48af) removed an
unused handle param. As a result the handle param is now unused by
wlan_hdd_set_pre_cac_status(), so remove it from there as well.

Change-Id: Ida61a996b9203928af3a5636c219ab61c68d7d19
CRs-Fixed: 2347654
2018-11-09 18:21:57 -08:00
Jeff Johnson
6ccbec1f48 qcacld-3.0: Remove wlan_sap_set_pre_cac_status() handle param
Function wlan_sap_set_pre_cac_status() currently takes as one
parameter a tHalHandle handle.  This handle is converted into a MAC
context pointer. That MAC context pointer is then tested for NULL but
is otherwise unused.  Since the MAC context, and hence the handle, are
unnecessary, remove them.

This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.

Change-Id: I1c280be8c7c65a28267a9ab38d76fb8aa94e48af
CRs-Fixed: 2347653
2018-11-09 18:21:53 -08:00