Commit Graph

4110 Commits

Author SHA1 Message Date
yuanl
5a28749530 qcacld-3.0: Add SAP, GO and currency support for TSF feature
1) Support SAP, GO standalone case
2) Support SAP + STA concurrency
3) Support GO + STA concurrency

Change-Id: I7da2102f0d8b893bc057bc8ecf0af4ab74f81db4
CR-Fixed:2320218
2018-10-29 22:59:36 -07:00
Jeff Johnson
cb598fd644 qcacld-3.0: Refactor WE_CLEAR_STATS processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_CLEAR_STATS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I51e72ccf83a6b63792c17d6c65daca6571ef21bb
CRs-Fixed: 2341122
2018-10-29 18:21:02 -07:00
Pragaspathi Thilagaraj
3cf0f65518 qcacld-3.0: Remove legacy cfg items
Remove legacy cfg items definitions and related macros for the
converged CFG items.

Change-Id: I12944f50d68dafe989417dda777f29a6233c97a4
CRs-Fixed: 2340856
2018-10-29 15:19:08 -07:00
Jeff Johnson
fc6480b100 qcacld-3.0: Refactor WE_SET_AMSDU processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_AMSDU has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I74bbc055c1587fff548512f4c7f325f75345eb95
CRs-Fixed: 2340147
2018-10-29 09:34:09 -07:00
Jeff Johnson
bd2c9916ae qcacld-3.0: Refactor WE_SET_VHT_RATE processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_VHT_RATE has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I07299bcc7e1cba7b5ceced3ba1cf22c470cb448e
CRs-Fixed: 2340146
2018-10-29 09:34:05 -07:00
Jeff Johnson
50b1588d8b qcacld-3.0: Refactor WE_SET_11N_RATE processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_11N_RATE has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: Iea2ee6bc53a56bb92497d42ac057e6663bc07097
CRs-Fixed: 2340145
2018-10-29 09:34:02 -07:00
Jeff Johnson
71d8038cea qcacld-3.0: Refactor WE_SET_RTSCTS processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_RTSCTS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I9f17824abe6ac9e60cc908c46661fe991ecfd9aa
CRs-Fixed: 2340144
2018-10-29 09:33:58 -07:00
Jeff Johnson
ce996b3e66 qcacld-3.0: Refactor WE_SET_SHORT_GI processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_SHORT_GI has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: Ica2a50216c413985f05a2771641be439c6c9d8cd
CRs-Fixed: 2339229
2018-10-29 09:33:54 -07:00
Jeff Johnson
b6645852ca qcacld-3.0: Relocate hdd_set_rx_stbc() mac_handle test
hdd_set_rx_stbc() is called from both the STA and SAP ioctl
handlers. In the STA case the caller checks the mac_handle, but in the
SAP case the mac_handle is not checked. This could result in a bad
mac_handle being used in the SAP case. In order to cover both cases
relocate the mac_handle test to hdd_set_rx_stbc().

Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.

Change-Id: I9442a8a46da4066c8b4dafe2cf9ce64f608bb3a9
CRs-Fixed: 2339228
2018-10-29 09:33:51 -07:00
Jeff Johnson
57ff4fa1d2 qcacld-3.0: Relocate hdd_set_tx_stbc() mac_handle test
hdd_set_tx_stbc() is called from both the STA and SAP ioctl
handlers. In the STA case the caller checks the mac_handle, but in the
SAP case the mac_handle is not checked. This could result in a bad
mac_handle being used in the SAP case. In order to cover both cases
relocate the mac_handle test to hdd_set_tx_stbc().

Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.

Change-Id: Ie7a01ddbfb958ab87b7baf11e93d8a86c32744b7
CRs-Fixed: 2339227
2018-10-29 09:33:46 -07:00
Jeff Johnson
1ca04768ea qcacld-3.0: Relocate hdd_set_ldpc() mac_handle test
hdd_set_ldpc() is called from both the STA and SAP ioctl handlers. In
the STA case the caller checks the mac_handle, but in the SAP case the
mac_handle is not checked. This could result in a bad mac_handle being
used in the SAP case. In order to cover both cases relocate the
mac_handle test to hdd_set_ldpc().

Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.

Change-Id: I97827ee257c9e15e24468ed9800080375f082ff1
CRs-Fixed: 2339226
2018-10-29 09:33:42 -07:00
jitiphil
7af5cf252a qcacld-3.0: Open WLAN adapter in FTM mode after modules are started
According to the current code flow of con_mode_handler, the
WLAN modules are stopped, adapter is opened in FTM mode and then
the modules are started. Due to the INI/CFG value accces done as
part of opening the adapter, and since the modules are stopped
at this point, it results in a use after free scenario.

Modify code sequence of con_mode_handler to WLAN start modules
before opening the adapter in FTM mode.

Change-Id: I94afb9b2a3751247b4ae95e27b1374b25890a9d7
CRs-Fixed: 2339777
2018-10-29 04:39:42 -07:00
Abhinav Kumar
e057b4188a qcacld-3.0: Remove legacy VHT INI & CFG Items
Remove the definition of following INI & CFG Items
for VHT caps which is common for HT and HE caps.

CFG_VHT_LDPC_CODING_CAP
CFG_VHT_SHORT_GI_80MHZ
CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ
CFG_VHT_TXSTBC
CFG_VHT_RXSTBC
CFG_VHT_RX_MCS_MAP
CFG_VHT_TX_MCS_MAP
CFG_VHT_BASIC_MCS_SET

Change-Id: I55390c3391a0be272c609030dae232d767111fcf
CRs-Fixed: 2333183
2018-10-27 05:28:24 -07:00
Kiran Kumar Lokere
6f6a5688c9 qcacld-3.0: Fix issue with Nss setting status
Update Nss routine always returns failure status to user space.
Fix issue to send correct response to user space.

Change-Id: I12342ee531fc790b3042d8dcd8f5bb4b7a97e9fe
CRs-Fixed: 2340073
2018-10-27 02:32:27 -07:00
Abhishek Singh
13bf0ce6cd qcacld-3.0: Purge all serialization commands on csr stop
During csr stop, csr_roam_close_session try to purge all the pending
commands for the vdev. But as vdev is already logically deleted,
the cmds are not purged as the purge by vdev API fails to get the
vdev ref.

As in csr stop, driver clean up all the sme session so instead of
calling purge commands for vdev, call purge cmd for all the vdev.

Also the active command timeout for the delete vdev is 30 sec while
HDD waits for 15 sec. The active command timeout should be less
than the HDD timeout. Thus set active cmd timeout as 10 sec and
HDD timeout as 11 sec

Change-Id: I1d45de261c50f1835379a9cc1df4631f3e32f459
CRs-Fixed: 2339694
2018-10-27 00:11:32 -07:00
Dustin Brown
0c8486685e qcacld-3.0: Replace idle timeout flush in fw down
I1bfa8ab7329040c0b5ba989c0d7de7bf7228dd35 moved the idle timeout work
flush in an attempt to address a regression caused by moving the WMI
stop call in Iea53931771afd93ffaeabf704bbaffcf2460284f. Later, the WMI
stop call change was ultimately reverted in
I91046efeab8bc13b9f5c37d5a4d02b66c63e35a9, but the flush call was left
in its new location. Replace the original call site of the idle timeout
work flush, from before Iea53931771afd93ffaeabf704bbaffcf2460284f.

Change-Id: I21d74e02b5491dd3b42bb668329d09e77b416b7d
CRs-Fixed: 2339335
2018-10-26 12:17:23 -07:00
Jeff Johnson
389126493f qcacld-3.0: Refactor WE_SET_NSS processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_NSS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone(). As part of the
refactoring relocate the mac_handle NULL check to hdd_update_nss()
since that is where it is actually used.

Change-Id: I6fef7680b8013547cb2b8eb649e207e3026144ff
CRs-Fixed: 2338567
2018-10-26 12:17:19 -07:00
Liangwei Dong
3abfe8f832 qcacld-3.0: Add Random MAC addr Action Frame Tx
1. Report NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA to
cfg80211.
2. Indicate Random MAC addr frame to source adapter.

Change-Id: Ica66fb43636fc1609febd87b6e6398dac3af25f3
CRs-Fixed: 2322077
2018-10-26 10:39:09 -07:00
Jeff Johnson
9516c11ecd qcacld-3.0: Fix channel width logs when updating phymode
In wlan_hdd_update_phymode() there are two separate calls to
ucfg_mlme_get_vht_channel_width(). In both cases the return status is
checked, and in case of error the following messages is logged:
  "Failed to set channel_width"

Since ucfg_mlme_get_vht_channel_width() is a "getter" and not a
"setter" change the log to:
  "Failed to get channel_width"

Change-Id: Ifed249e78e4a64d76eae9310da42ee490756337e
CRs-Fixed: 2338478
2018-10-26 10:38:59 -07:00
Jeff Johnson
c171324c3d qcacld-3.0: Refine wlan_hdd_update_phymode()
Function wlan_hdd_update_phymode() is called from two ioctl handler
functions, __iw_softap_setparam() and __iw_setint_getnone(). Unlike
most of the ioctl "setter" functions which take two parameters (an
adapter and a value), wlan_hdd_update_phymode() currently takes four
parameters (a net device, a mac handle, an hdd context, and a value).

In addition, currently the HDD function with the highest cyclomatic
complexity is __iw_setint_getnone(). In order to reduce the complexity
of that function all of the switch/case handlers are being refactored,
and in anticipation of eventually using a vtable, the refactored
functions all expect two parameters, an adapter and a value.

In order to align with that goal, refine wlan_hdd_update_phymode() to
expect those same two parameters. Note that the net device, mac
handle, and hdd context that are currently being passed can all be
derived from the adapter.

Change-Id: Ib919e6751aee182e2d8fde90a8446935447123db
CRs-Fixed: 2338381
2018-10-25 06:34:52 -07:00
Jeff Johnson
5bee39bfe1 qcacld-3.0: Refactor WE_SET_TM_LEVEL processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_TM_LEVEL has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: Ifa68b6553b6856a008aa37af55d2ca1760da0970
CRs-Fixed: 2338380
2018-10-25 06:34:52 -07:00
Jeff Johnson
175004cd2e qcacld-3.0: Refactor WE_SET_MAX_TX_POWER_5_0 processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER_5_0 has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: I3eb942b5bbed7cdc8199c5a4233b4443613023b0
CRs-Fixed: 2338379
2018-10-24 17:48:04 -07:00
Dustin Brown
62743f4c71 qcacld-3.0: Initialize out_mode in hdd_parse_driver_mode
gcc-4.8 incorrectly flags the use of @next_mode in __con_mode_handler as
potentially uninitialized, while newer versions do not seem to have a
problem. Work around the compiler quirk by initializing @out_mode in
hdd_parse_driver_mode.

Change-Id: Iee101db6eaded8e856e461458d6a80e8279e9ca1
CRs-Fixed: 2338538
2018-10-24 17:48:00 -07:00
Jeff Johnson
f3892b5d68 qcacld-3.0: Refactor WE_SET_MAX_TX_POWER_2_4 processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER_2_4 has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: Ib6da540f9d96893899ad3865fd1c72e15a1c34bf
CRs-Fixed: 2338378
2018-10-24 17:47:56 -07:00
Dustin Brown
c07ce8eb66 qcacld-3.0: Lightly refactor __con_mode_handler
There are a number of style issues in __con_mode_handler. In preparation
for additional work in this area, lightly refactor __con_mode_handler,
and address low hanging style issues.

Change-Id: I7ec7cfd369bd00a0f8acc612ebf92f7a30a7a360
CRs-Fixed: 2337850
2018-10-24 11:54:07 -07:00
Ashish Kumar Dhanotiya
2ef479048d qcacld-3.0: Clear oldest cached sta information
Currently host is caching all the connected sta info
in case of SAP, once the sta count reaches to MAX, below
mentioned issues occurs:
1. Driver can not cache the information of newly connected
   stations.
2. Some of the info is cached at the time of connection while
   remaining info is cached during disconnection. In the
   disconnect path driver tries to cache some of the info
   such mc_bc count, disconnect reason code, since driver can't
   cache anymore info, it does not find the current station which
   is getting disconnected in cache sta info structure leading to
   an error, and driver is returning an error without completing
   the wait for disconnect event which is resulting in timeout.
Since sta_disconnect comes with rtnl_held, any other process
is not able to get the rtnl_lock until this timeout occurs.

To address this issue below mentioned two measures taken care:
Clear the oldest cached sta information and save the newly connected
station's information.
In the disconnect path, do not return any error and simply proceed
with disconnection as failure to cache the information of sta
should not stop the disconnection process.

Change-Id: Ia955a6774033fdfa91ff1fa7c8832b3ec7e8e1a0
CRs-Fixed: 2333075
2018-10-24 08:17:33 -07:00
hangtian
5fe81f014a qcacld-3.0: Update chandef if choosing new channel for softap
Currently if hostapd choose channel 149, enable ieee80211d, and
select country_code JP. Driver will choose random channel after regd
updated to JP got from firmware. Since 149 is invalid for JP
country_code, driver choose random channel in JP channel list.
Driver indicate cfg80211 chandef is changed in hdd_chan_change_notify.
However, if we don't update cfg80211_ap_settings.chandef in
cfg80211_ops.start_ap, cfg80211 will copy old chandef back to
wdev->chandef after cfg80211_ops.start_ap.  Then reg_wdev_chan_valid
will return false and cfg80211_leave leads to stop
AP in reg_leave_invalid_chans.

Change-Id: I3f89da46b4172fdea2774703f32b9cbabff41eeb
CRs-Fixed: 2315627
2018-10-24 04:49:30 -07:00
Dustin Brown
4c66322b99 qcacld-3.0: Abstract idle shutdown timer start/stop
The code to start and stop the idle shutdown timer in HDD is currently
copy-pasted in multiple locations. Abstract this logic behind two new
APIs, and call these APIs where appropriate.

Change-Id: I73b05e603454a4817cb9c1606c1207d7fe68e5ab
CRs-Fixed: 2337755
2018-10-24 01:45:05 -07:00
Rakshith Suresh Patkar
4faeb2e806 qcacld-3.0: Add NULL check for adapter in hdd_nud_filter_netevent
API hdd_nud_filter_netevent is used to filter netevents for
STA interface. It is the driver's responsibility to
filter and act on event if it is for the net device. However,
the NULL check that is present in hdd_validate_adapter comes
with error logs which flood the console.

Add NULL check for adapter after call to hdd_get_adapter_by_macaddr
in hdd_nud_filter_netevent so that if the event is not for
the net device, ignore the event and return to avoid excessive
logging.

Change-Id: Icfb2f27f97712bf8e1422404a85163e801d43641
CRs-Fixed: 2335081
2018-10-23 17:57:56 +05:30
Jeff Johnson
5e15ef5157 qcacld-3.0: Refactor WE_SET_MAX_TX_POWER processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: I9d2390aba4d90f7171de516be68f7073d1f2e4eb
CRs-Fixed: 2336982
2018-10-22 19:49:18 -07:00
Jeff Johnson
5d4a6d15ed qcacld-3.0: Refactor WE_SET_TX_POWER processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_TX_POWER has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I91f5da1593d5c8c6bfacbcc76e8595b3957b3ec2
CRs-Fixed: 2336981
2018-10-22 19:49:15 -07:00
Jeff Johnson
9451194fef qcacld-3.0: Refactor WE_SET_WOW_DATA_INACTIVITY_TO processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_WOW_DATA_INACTIVITY_TO
has a complexity greater than 1, so refactor that logic into a
separate function to help reduce the complexity of
__iw_setint_getnone().

Change-Id: Ibe02deaaf0250b434d72da23088ee0aaec311006
CRs-Fixed: 2336980
2018-10-22 19:49:12 -07:00
Jeff Johnson
693722c4b4 qcacld-3.0: Refactor WE_SET_DATA_INACTIVITY_TO processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_DATA_INACTIVITY_TO has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: Ica3c1c31ac8ae88d02d5d34d2fc1e53aa70508b9
CRs-Fixed: 2336979
2018-10-22 19:49:08 -07:00
Jeff Johnson
eb4368a044 qcacld-3.0: Refactor WE_SET_MAX_ASSOC processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_ASSOC has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: Ie24b589f2b32ea495cfaba7a600ef77e10d20f9e
CRs-Fixed: 2336978
2018-10-22 19:47:12 -07:00
Jeff Johnson
daf2e6a888 qcacld-3.0: Refactor WE_SET_POWER processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_POWER has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I4a2c08faf7ec88ca35a353c778fa0269f35eb76d
CRs-Fixed: 2336977
2018-10-22 19:47:08 -07:00
Wu Gao
d7dd6e4157 qcacld-3.0: Rename some ucfg APIs of PMO
To keep names of PMO ucfg APIs consistent, change some of them from
"pmo_ucfg_xxx" to "ucfg_pmo_xxx".

Change-Id: I77165be8c5c408c3f91f84a477c15be1c6ea15e8
CRs-Fixed: 2334109
2018-10-22 03:52:11 -07:00
Dustin Brown
53f51e7c9b qcacld-3.0: Remove wlan_hdd_get_session_type()
wlan_hdd_get_session_type() implements a subset of
hdd_nl_to_qdf_iface_type(). Remove wlan_hdd_get_session_type() and use
hdd_nl_to_qdf_iface_type() instead to reduce duplicate code.

Change-Id: I9186ff28def73edffa027d454540543c8619144d
CRs-Fixed: 2336080
2018-10-22 03:52:07 -07:00
Min Liu
74a1a5032f qcacld-3.0: HDD: Remove excessive logs - Part 1
Remove log in callers of the following function:

qdf_mem_malloc()

Change-Id: I33019772f0c9289eb7e770cfa98739e0260cca81
CRs-Fixed: 2331653
2018-10-22 01:02:51 -07:00
Dustin Brown
458027cef4 qcacld-3.0: Remove hdd_device_mode_to_string()
qdf_opmode_str() has recently been added for converting a vdev operating
mode into a human readable string. Historically, HDD has used
hdd_device_mode_to_string() for this purpose. Replace
hdd_device_mode_to_string() with qdf_opmode_str() such that there is one
function for mapping vdev operating mode to human readable string.

Change-Id: I38880f915b617b5c02b2029762eacdf6ef8bac15
CRs-Fixed: 2336065
2018-10-21 23:14:16 -07:00
Dustin Brown
61cc393b74 qcacld-3.0: Convert open adapters to vtable map
Using a switch case as a method for mapping an enumerated value to a
handler function has the down side of allowing future changes to pollute
the switch case with additional logic. It also tends to lead to high
cyclomatic complexity. Avoid these issues in hdd_open_adapters_for_mode
by converting the switch case to a vtable.

Change-Id: If91cbaf1e0ed561122b599550f3c450ec47eda31
CRs-Fixed: 2335970
2018-10-19 16:53:14 -07:00
Dustin Brown
a2deeb7047 qcacld-3.0: Unify open_interfaces and register_req_mode
The logic for creating the initial vdevs for a given driver mode is
implemented in two different functions: hdd_open_interfaces() and
hdd_register_req_mode(). This had lead to some duplication between the
two implementations. Instead, unify both functions so the duplicate code
can be removed.

Change-Id: I9a1f74ca14d3d4cda8d05bf6b000038770a1ea05
CRs-Fixed: 2335969
2018-10-19 16:53:10 -07:00
Jeff Johnson
7272ea7cc0 qcacld-3.0: Refine the extscan stop scan logic
Make the following updates to the extscan stop scan logic:
1) Exclusively use the Unified WMI data structures.
2) Update the HDD<=>SME interface to enforce the contract that SME
   must not make any assumptions about the buffers provided by HDD.

Change-Id: Ie4a693b4a91d728a075cffad3ee368b22d9c5b2a
CRs-Fixed: 2335647
2018-10-19 13:09:50 -07:00
Dustin Brown
686d3030e2 qcacld-3.0: Change dot11p_mode to enumerated type
dot11p_mode is currently represented with a uint8_t type, despite an
appropriate enumerated type being available. Change the field's type to
the more restrictive 'enum dot11p_mode' instead of uint8_t.

Change-Id: I847ce0901297b0a3e4312e8ce4124a886320f174
CRs-Fixed: 2335575
2018-10-18 18:41:44 -07:00
Jeff Johnson
dab5860bf9 qcacld-3.0: Refine the extscan start scan logic
Make the following updates to the extscan start scan logic:
1) Exclusively use the Unified WMI data structures.
2) Update the HDD<=>SME interface to enforce the contract that SME
   must not make any assumptions about the buffers provided by HDD.
3) Address a multitude of checkpatch issues

Change-Id: I68dc988fafb7e14b2b80d1007adf614ddff284e2
CRs-Fixed: 2335045
2018-10-18 14:22:18 -07:00
Jeff Johnson
43837af883 qcacld-3.0: Replace new instance of tHalHandle in wlan_hdd_main
Previously "qcacld-3.0: Use mac_handle_t in wlan_hdd_main" (Change
If9ddbe0935d859d4c71dc11576cd7062a715b3e9) replaced all instances of
tHalHandle with mac_handle_t in wlan_hdd_main. But subsequently change
"qcacld-3.0: Allow Setting Channel&Bandwidth in STA mode" (Change
Ie9ffc701d93ed1c050375dd56151b7a0da69cdce) introduced a new instance,
so replace it as well.

Change-Id: I01e67401b0eb99b242a7a0b0d161696cbe2fba79
CRs-Fixed: 2335139
2018-10-18 02:16:54 -07:00
Dustin Brown
194aeca1bf qcacld-3.0: Move p2p work around to change_iface
hdd_change_adapter_mode() contains a work around for an issue with
userspace requesting station mode on a p2p adapter, expecting the wlan
driver to instead change the adapter to p2p-device mode. Hoist this work
around to the caller, __wlan_hdd_cfg80211_change_iface, so the rest of
the code doesn't need to be aware of it.

Change-Id: Ic71d6d99b1df7339dda892adcfb27605fa8dfc59
CRs-Fixed: 2332798
2018-10-18 00:21:03 -07:00
Dustin Brown
63fe49239f qcacld-3.0: Factor out common parts in change_iface
Some common parts of __wlan_hdd_cfg80211_change_iface are repeated in
multiple places. Factor out these common sections to reduce redundant
code and ensure they stay synchronized in the future.

Change-Id: I80d47f1c9a14342f777bfc169d85287a3e709a58
CRs-Fixed: 2332780
2018-10-18 00:20:59 -07:00
Dustin Brown
56377e1ebe qcacld-3.0: Prefer QDF_OPMODE in __wlan_hdd_cfg80211_change_iface
__wlan_hdd_cfg80211_change_iface() currently uses QDF_OPMODE and
nl80211_iftype relatively interchangeably, which forces the reader to
mentally convert between the two as they go and disperses the real
conversion of one into the other throughout the code. Instead, do the
conversion from nl80211_iftype to QDF_OPMODE once up front. This way
usage can be consistent and more easily followed.

Change-Id: Ie578865c3724e4a85bd249352288afac10928bb4
CRs-Fixed: 2331969
2018-10-18 00:20:52 -07:00
Mohit Khanna
cabf5e79d8 qcacld-3.0: Fixes for IPA enablement for lithium/Hasting
Following changes were made -

- Replace #ifdef CONFIG_LITHIUM with QCA_WIFI_QCA6290 and QCA_WIFI_QCA6390
  flags. CONFIG_LITHIUM is not defined to be used within the code, the
  individual chip specific flags are defined, hence use those.

- Pass IPA enable/disable ini configuration to DP layer

Change-Id: If0bfdaf408b06a922923e998c0c6ad2157e2c080
CRs-Fixed: 2328711
2018-10-17 17:42:18 -07:00
Krunal Soni
80d0f27518 qcacld-3.0: Move gEnableStaConnectionIn5Ghz from HDD to Plcy manager
As part of new INI/CFG model, move gEnableStaConnectionIn5Ghz
ownership from HDD to policy manager.

CRs-Fixed: 2324393
Change-Id: I894467bab4b0bddf309463802b98904ef1150536
2018-10-17 14:28:02 -07:00