1) Support SAP, GO standalone case
2) Support SAP + STA concurrency
3) Support GO + STA concurrency
Change-Id: I7da2102f0d8b893bc057bc8ecf0af4ab74f81db4
CR-Fixed:2320218
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
Remove legacy cfg items definitions and related macros for the
converged CFG items.
Change-Id: I12944f50d68dafe989417dda777f29a6233c97a4
CRs-Fixed: 2340856
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
__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
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
As part of new INI/CFG model, move gEnableStaConnectionIn5Ghz
ownership from HDD to policy manager.
CRs-Fixed: 2324393
Change-Id: I894467bab4b0bddf309463802b98904ef1150536