Commit Graph

226 Commits

Author SHA1 Message Date
Jeff Johnson
0f41e16b1e qcacld-3.0: Remove obsolete SAP WPSIE structs
struct sap_WPSIE_s, as well as the structs it contains, were inherited
from a prior version of the driver where SAP WPS was implemented in
the driver. Since SAP WPS is now handled by hostapd these structs are
unused, so remove them.

Change-Id: Iabdd7f3b83668cb203614353b4766fb0b40fbd05
CRs-Fixed: 2110167
2017-09-20 07:59:01 -07:00
hqu
16d6e08812 qcacld-3.0: Calculate supported rates according to different case
Fix the regression issue introduced by change
"Change-Id: Ica336398865a8b5e16297e4555dbb7de5e79567e".
The issue is that it will always include driver default rates.

In some case it only needs to calculate supported rates from hostapd.conf
file. Define ini item gChanSwitchHostapdRateEnabled to configure supported
rates calculated from hostapd.conf file or driver default rates when doing
SAP channel switch.

Change-Id: I45eeea5134dd80929bdd1f61246bdc66e1857e22
CRs-fixed: 2103714
2017-09-20 06:21:53 -07:00
Jiachao Wu
712d4fd6a6 qcacld-3.0: Send beacon tx rate to firmware
Add data structures to save beacon tx rate.
The beacon data rate is multiples of 100 Kbps.
Firmware expects the data rate in the form of hw rate codes.
So convert the data rates to hw rate code.
And send it to firmware.

Change-Id: Ia39fd4c14defa729f75f2c45748fe5b04b909647
CRs-Fixed: 2099052
2017-09-19 04:18:34 -07:00
Jeff Johnson
f1cd3c7d40 qcacld-3.0: Replace typedef ptSapContext
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 ptSapContext typedef does not
meet any of those criteria, so replace it.

Change-Id: Ia08bea35b7c0d3b3dfad4641c1c79a7c0990cd8d
CRs-Fixed: 2109993
2017-09-19 02:28:30 -07:00
Jeff Johnson
49c7a1465a qcacld-3.0: Remove wlansap_open() p_cds_gctx parameter
Currently wlansap_open() takes a p_cds_gctx parameter. At one time
this was needed, but that is no longer the case, so remove this unused
parameter.

Change-Id: Ie110b3cee9898233fb921aaab223caa4cf93de4e
CRs-Fixed: 2109961
2017-09-19 02:28:28 -07:00
Jeff Johnson
6816303da2 qcacld-3.0: Replace typedef tSapContext
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 tSapContext typedef does not
meet any of those criteria, so replace it.

Change-Id: If237edee7638c1c6b35413312cb3dd934554431a
CRs-Fixed: 2109960
2017-09-19 02:28:25 -07:00
Jeff Johnson
d0337e0f44 qcacld-3.0: Rename struct sSapContext
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename struct sSapContext to align with the
Coding Style. The associated tSapContext and ptSapContext typedefs
will be cleaned up as a subquent effort.

Change-Id: I83962e1c574491039597559fb8b16f3339d41fbd
CRs-Fixed: 2109959
2017-09-19 02:28:22 -07:00
Jeff Johnson
ef20675305 qcacld-3.0: Remove p_cds_gctx from struct sSapContext
The p_cds_gctx field in struct sSapContext is not used, so remove it.

Change-Id: I9eb6f651a359bf12f23ec094887ca308c834bae1
CRs-Fixed: 2109957
2017-09-19 00:18:03 -07:00
Jeff Johnson
c0db38437e qcacld-3.0: Remove unused CDS_GET_HAL_CB() parameter
Macro CDS_GET_HAL_CB() currently takes a ctx parameter. At one time
cds_get_context() needed a pointer to the global context, and hence
the reason for the parameter. But now that cds_get_context() no longer
needs the global context, remove the parameter from the macro. This is
a precursor to removing the p_cds_gctx from the SAP config.

Change-Id: Ic75bab55fd8b87710aee99b7e2d3783361dc3d87
CRs-Fixed: 2109955
2017-09-19 00:17:57 -07:00
Naveen Rawat
08db88f684 qcacld-3.0: Cleanup get IE pointer from out, eid or ext_id APIs
Cleanup duplicate APIs for get ie pointer from EID or OUI or EXT_ID
and use wlan_utils exposed by qcacmn.

Change-Id: Iacbf041c9c49b2aedeffecba3427e9334cb70dcc
CRs-Fixed: 2105377
2017-09-18 20:27:49 -07:00
Naveen Rawat
bec64d9137 qcacld-3.0: Fix SAP ACS logging
Fix misleading ACS logging that indicates best channel and final
channel selected are different.

Change-Id: I00a2a15fa9d709c3e78ebf580d599ec10deefb28
CRs-Fixed: 2105204
2017-09-18 15:37:25 -07:00
bings
aa6f96a345 qcacld-3.0: Fix channel weight calculation errors in ACS mode
Channel 13 and channel 9 can be combined to HT40. The channel weight of
13 is updated with channel 9 when chStartNum of acs_ht40_channels24_g
is 9 in sap_sort_chl_weight_ht40_24_g, however at this time the channel
weight of 9 may be already updated to SAP_ACS_WEIGHT_MAX * 2 when the
chStartNum of acs_ht40_channels24_g is 1. In such case channel weight of
13 is updated incorrectly.

When update the channel weight of 13, use original channel weight of
channel 9 and channel 13.

Change-Id: Iab16cd5b1ab45fdf2f9805767d81c6fc997ee4be
CRs-Fixed: 2105213
2017-09-13 23:27:17 -07:00
Jeff Johnson
bbace0a9fb qcacld-3.0: Remove sapCleanupAllChannelList() prototype
sap_api.h currently exports sapCleanupAllChannelList() but the
implementation of that function is no longer preset, so remove the
obsolete prototype.

Change-Id: Ic7fae1985edebde3784e33aed09d011acbcd251d
CRs-Fixed: 2108350
2017-09-12 19:54:17 -07:00
Jeff Johnson
97b656046f qcacld-3.0: Remove wlansap_update_bw80_cbmode()
Function wlansap_update_bw80_cbmode() is unused, so remove it.

Change-Id: I2377eaad16296f6cce01223a70b241cc177298a0
CRs-Fixed: 2108349
2017-09-12 19:54:14 -07:00
Jeff Johnson
dae9488f36 qcacld-3.0: Remove wlansap_pmc_full_pwr_req_cb()
Function wlansap_pmc_full_pwr_req_cb() is not used, so remove it.

Change-Id: I25d0a5b44d8576b5d302132b47a6955febaec86d
CRs-Fixed: 2108348
2017-09-12 19:54:12 -07:00
Jeff Johnson
22a1c6fc20 qcacld-3.0: Remove wlansap_*_wps_ie()
Functions wlansap_set_wps_ie() and wlansap_update_wps_ie() are unused,
so remove them.

Change-Id: I9552ee4404961ae2973f0c0aefc0821fb7ba5a1e
CRs-Fixed: 2108347
2017-09-12 19:54:10 -07:00
Jeff Johnson
9b495ddfa0 qcacld-3.0: Remove wlansap_*_wps_session_overlap()
Functions wlansap_remove_wps_session_overlap() and
wlansap_get_wps_session_overlap() are unused, so remove them.

Change-Id: Ib36fe420478ea9a5c5485a4cff6b5bd01d2a51f5
CRs-Fixed: 2108345
2017-09-12 19:54:07 -07:00
Jeff Johnson
0654b69a16 qcacld-3.0: Remove wlansap_get_state()
Function wlansap_get_state() is unused, so remove it.

Change-Id: I3736c498a2409e0fe6d67b78fcce2a5e88fefdf5
CRs-Fixed: 2108343
2017-09-12 19:54:05 -07:00
Jeff Johnson
7e3e8c29c6 qcacld-3.0: Remove wlansap_get_assoc_stations()
Function wlansap_get_assoc_stations() is unused, so remove it.

Change-Id: I4a452d6eed9eb035ad124fb5cd1fe5f62f507b5f
CRs-Fixed: 2108342
2017-09-12 19:54:03 -07:00
Jeff Johnson
99fabf11c5 qcacld-3.0: Remove wlansap_clean_cb() prototype
sap_internal.h currently exports wlansap_clean_cb() but the
implementation of that function is no longer present, so remove the
obsolete prototype.

Change-Id: I850b3de45d27d3d8332278d10714254d93ffd2b3
CRs-Fixed: 2108341
2017-09-12 19:54:00 -07:00
Jeff Johnson
7c32e9cab9 qcacld-3.0: Remove wlansap_stop_Wps() prototype
sap_api.h currently exports wlansap_stop_Wps() but the implementation
of that function is no longer preset, so remove the obsolete
prototype.

Change-Id: Iee2fa74b0863a1d80ff9d7cbb9695b9a2cd086a3
CRs-Fixed: 2108340
2017-09-12 19:53:59 -07:00
gaolez
e510894670 qcacld-3.0: Add new params in ACS calc process
qcacld-2.0 to qcacld-3.0 propagation

Before this change the ACS calc process only consider the
channel's rssi and bss count in this channel, in this change
add noise floor, channel free statistics and tx power in the
ACS calc process.

Change-Id: I654e53fa2441e03723f150d973c124985c67f2b4
CRs-fixed: 1050316
2017-09-11 23:27:25 -07:00
Tushnim Bhattacharyya
518e80fc94 qcacld-3.0: Add the DFS MCC check in ACS algorithm
During channel selection for SAP via ACS, add check if there is
a connection on 5Ghz, don't allow SAP to select DFS channel.

Change-Id: If6e42cbc584ddb80588daf138d94d2e0a75b882a
CRs-Fixed: 2102024
2017-09-11 12:16:33 -07:00
Paul Zhang
fb35175109 qcacld-3.0: Fix the spinlock pairing issue
Per code review, some spin_lock/spin_unlock are not pairing.

Change-Id: I72cbc6d77ee37e44b4672a4e6747b90b7ebb0a4e
CRs-Fixed: 2105070
2017-09-10 21:27:54 -07:00
Abhishek Singh
9da81d0555 qcacld-3.0: Fix SAP close issue in dual band SAP
In Dual band SAP+SAP, if channel change for a SAP, the SAP get
stuck in eSAP_DISCONNECTING state, waiting for channel change
indication for the concurrent SAP, which may never come as this
is Dual band SAP+SAP and both are on different bands.

Now when stop adapter is called for this SAP, the stop BSS fails
as its already in disconnecting state and due to this it is not
deleted cleanly.

To fix this if DBS is enabled change the channel of the AP on
which CSA was initiated without waiting for other SAP interface.

Change-Id: I54d903d4fc0694b16c1f1debf52ffe2a6dad0ba9
CRs-Fixed: 2097002
2017-09-08 17:57:12 -07:00
Tushnim Bhattacharyya
03103fd070 qcacld-3.0: Add logic to force SCC in SAP+STA concurrency with ACS
If STA is up & SAP is comings up on a ACS derived channel causing MCC,
move SAP to the other band if DBS is supported. This logic is enabled
only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I48d809f83921292f51ca1735bff4c4d6dd339975
CRs-Fixed: 2063060
2017-09-08 14:28:10 -07:00
Tushnim Bhattacharyya
9a92999835 qcacld-3.0: Add logic to force SCC in SAP+STA concurrency - Part 2
If STA is up on a a DFS or passive or LTE unsafe channel & SAP is
comings up that causes MCC, move SAP to the other band if DBS
is supported. This logic is enabled only if gWlanMccToSccSwitchMode
is set to QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I5d393a21301f3fa838f7cf38620fb1d57ae1d57a
CRs-Fixed: 2063060
2017-09-08 14:28:08 -07:00
bings
d1b43e5401 qcacld-3.0: Fix NOL updating issue
Make sure to update NOL correctly for all the right bonding channel.

Irrelevant channel will be marked as eSAP_DFS_CHANNEL_UNAVAILABLE if
wrong bonding channel is gotten.

Change-Id: I40420bdc881ce83aadbce87c10911507be4f3144
CRs-Fixed: 2093557
2017-08-30 10:42:53 -07:00
gaolez
76d2a16f03 qcacld-3.0: Channel hopping for 2_4G and 5G band
qcacld-2.0 to qcacld-3.0 propagation

Allow device switch to a different channel if the current channel is
congested, using the 11h channel switch announcement.

Change-Id: I1766785017e43f17cc800039b383ee5dabcd6ea5
CRs-Fixed: 2082632
2017-08-22 20:57:57 -07:00
Poddar, Siddarth
2fb98079a9 qcacld-3.0: Add missing qdf_spinlock_destroy() to free debug cookie
Add missing qdf_spinlock_destroy() to destroy spin lock debug cookie
for SLUB build. For normal builds, qdf_spinlock_destroy() is a NO-OP
function.

Change-Id: Idccdc9f7acaea785a600e14304368f53ff7e17d7
CRs-Fixed: 2077964
2017-08-18 05:37:35 -07:00
bings
14d1d3be37 qcacld-3.0: Optimize channel selection in ACS mode
SAP selects different channel between cld2.0 driver and cld3.0
driver in ACS mode, which leads to confusion.
In cld2.0 driver, channel with the least weight is the first
choice, and non-overlap channel will be selected only when
overlap channel is disabled and its weight is not bigger than
the first choice channel.
In cld3.0 driver, non-overlap channel will be selected when
overlap channel is disabled.

The behavior in cld2.0 is more reasonable. Make cld3.0 driver
follow cld2.0 driver.

Change-Id: I6243ace8db7314c698a9b554e65794d2ee66e555
CRs-Fixed: 2086287
2017-08-11 06:40:12 -07:00
gaolez
e2920bda2b qcacld-3.0: Add ini option for action frame based channel switch
qcacld-2.0 to qcacld-3.0 propagation

Add ini option to enable/disable action frame based channel switch.

Change-Id: I340464a18ef0b5cf09f481a23b01edcf04904e34
CRs-Fixed: 2082563
2017-08-09 20:50:29 -07:00
Srinivas Girigowda
f326dfe224 qcacld-3.0: clang: Remove extraneous parentheses
clang is reporting these compiler warnings.
Remove extraneous parentheses.

Change-Id: I3dd6490cc1bf2a038e72e1630ba9b0c2b5f0ebed
CRs-Fixed: 2087229
2017-08-06 14:48:13 -07:00
Yingying Tang
22facc1b25 qcacld-3.0: Fix incorrect NULL pointer check for SAP
Propagate from qcacld-2.0 to qcacld-3.0

Currently there are some places where array name is compared to NULL
in SAP, add fix to correct it.

CRs-Fixed: 1063255
Change-Id: I736ac42dd08cd6d3375b7693e914e825dae6c702
2017-08-06 09:47:29 -07:00
Wu Gao
35a5cfec1b qcacld-3.0: Check tHalHanle pointer before access
Static analyze tool reports error, since NULL check for tHalhandle
is not present. Fix is to add NULL checks.

Change-Id: Ibe68b89809a36e0184523934e7b3aefbd732666a
CRs-fixed: 2083409
2017-07-31 20:55:53 -07:00
gaolez
7bb1e74744 qcacld-3.0: Add ecsa capability record
qcacld-2.0 to qcacld-3.0 propagation

Add eCSA capability record of STAs which associated to SAP.

Change-Id: I1d7892bb1dc4e490a587e8372a4bdc7f419e8b36
CRs-Fixed: 1094958
2017-07-25 15:44:06 -07:00
bings
58ce86229c qcacld-3.0: Add phymode parameter in hdd_chan_change_notify
Information in struct ch_params_s are the same for 11g and
11n ht20, so phymode is still needed to distinguish them.

Change-Id: I5ddfc011b4fd3b11c975f8b2df3a270e8141e622
CRs-Fixed: 2073580
2017-07-25 03:45:24 -07:00
Will Huang
558f8085c4 qcacld-3.0: Add support of request peer stats info(part 2)
qcacld-2.0 to qcacld-3.0 propagation

FW has limitation to support old WMI_REQUEST_STATS_CMDID and
WMI_UPDATE_STATS_EVENTID interface on AP vDev. FW suggest to use new
WMI_REQUEST_PEER_STATS_INFO_CMDID and WMI_PEER_STATS_INFO_EVENTID to
get tx/rx rate.

This checkin is about LIM/SME/SAP layer, provide SME APIs/callbacks
to HDD layer to get SAP's peer station tx/rx related information,
fill these information from wma layer get-peer-stat-info APIs and
peer station's association request frame. It also fixed function
csr_send_assoc_ind_to_upper_layer_cnf_msg when copy information
between different structures and using offset style.

Change-Id: Icb1aaa126663af7eaedd1c4db86ca25c40ce6ee9
CRs-Fixed: 2051628
2017-07-18 05:54:26 -07:00
Wu Gao
3545e64d4a qcacld-3.0: Cleanup DFS CAC timer when SSR and reset all adapters
In SAP and SSR case, it won't cleanup DFS CAC timer until up layer
kill hostapd. It will call wlansap close when hostapd exit. If
enable sap internal restart in this case, it will double init DFS CAC
timer, which cause abnormal in kernel. Solution is cleanup DFS CAC
timer when reset all adapters.

Change-Id: I96962349af548074e226976c8c01cd5a8710ed3f
CRs-fixed: 2075904
2017-07-17 18:29:13 -07:00
Srinivas Girigowda
eaf136a65e qcacld-3.0: Fix clang warnings 'taking address of packed member'
warning: Taking address of packed member 're_list' of class or
structure 'dfs_event' may result in an unaligned
pointer value [-Waddress-of-packed-member].

Change-Id: I498aebc7631854774302379a96e844fa11be3ea6
CRs-Fixed: 2055487
2017-07-13 01:48:01 -07:00
Srinivas Girigowda
74a66d627b qcacld-3.0: Fix clang warnings implicit enum type tAniBool
warning: implicit conversion from enumeration type 'tAniBool'
(aka 'enum eAniBool') to different enumeration type
'eSapBool' [-Wenum-conversion]

Replace tAniBool/eSapBool with bool.

Change-Id: I919488d2accc094049375fffe8b54a5d7dea621e
CRs-Fixed: 2055487
2017-07-13 01:47:55 -07:00
Kapil Gupta
c1224bf234 qcacld-3.0: Changes to correct channel flags for vendor ACS
In the reg channel info which is sent to external channel
selection daemon, Some channel flags are missing which causes
application to select wrong channel.

Add changes to correct channel flags.

Change-Id: I80834dd7f5f4bfbd2fce88084a938356a741140c
CRs-Fixed: 2068354
2017-07-11 07:27:12 -07:00
Amar Singhal
7f55e34ea7 qcacld-3.0: Modify regulatory apis to pdev level
To support reg-domain at pdev level, modify the usage of some
apis to pdev level.

Change-Id: I37c504f77c7704553714cc74cba6c5ef882e774c
CRs-Fixed: 2048784
2017-07-10 09:37:08 -07:00
Varun Reddy Yeturu
0d3d9916c4 qcacld-3.0: Cleanup CBMode in SME
Cleanup the variable CBMode as there is no usage of
the variable in the code

Change-Id: I4e63a0f6f1cddd639f324c177b198e4b5c18e9e0
CRs-Fixed: 2063149
2017-07-09 23:41:17 -07:00
bings
61d5bec36f qcacld-3.0: Do not assign ht_sec_ch with sec_ch_offset
Supplicant reports ACS failed, if driver indicates invalid ht_sec_ch.
Do not assign ht_sec_ch with sec_ch_offset, because they are not the
same thing.

Change-Id: I8fb2a42973b67bb045d385b1fd90ee32917450ea
CRs-Fixed: 2067092
2017-07-03 19:54:18 -07:00
lifeng
c0fb61a3f5 qcacld-3.0: Fix the issue of launching guest ap in SCC
Try to set ap-ap mode on single wifi with acs enabled,
primary ap can start up successfully, but fail to bring up
the guest ap.

The fix is to call appropriate procedure once the guest ap
skip acs scan before starting bss.

Change-Id: I106269308932dafff27f9dc0665ade06b88e99a6
CRs-Fixed: 2063960
2017-06-29 23:40:52 -07:00
Varun Reddy Yeturu
dd51e8d67b qcacld-3.0: Fix logging levels - Part 2
Move the log messages to appropriate log levels so that
the console does not get a huge spam of unnecessary logs

Change-Id: Ie58b45078ad8b4732d7b84bfb77261396bd5862a
CRs-Fixed: 2043741
2017-06-29 20:30:36 -07:00
lifeng
9537f47b1d qcacld-3.0: Fix memory leak in acs procedure
qcacld-2.0 to qcacld-3.0 propagation

Free the memory for channel list once the scanStatus is NOT
eCSR_SCAN_SUCCESS in WLANSAP_PreStartBssAcsScanCallback.

Change-Id: Id2d7fe5d7df8c032d50f02880deedb2ed1ac79fd
CRs-Fixed: 2059751
2017-06-29 05:01:24 -07:00
Sandeep Puligilla
994f620e23 qcacld-3.0: Cleanup legacy scan in SAP module
Cleanup legacy scan code in the SAP module.

Change-Id: Ifdb2575727c5c52a2b09c03d8bde43e5fd8fb910
CRs-Fixed: 2063667
2017-06-21 05:56:13 -07:00
Arif Hussain
8cc9d8407b qcacld-3.0: Fix sap context memory leak
Make sure to decrement sap context ref count in wlansap_roam_callback
for failure case also, else this will prevent freeing sap context memory
in during driver unload in wlansap_close().

Change-Id: I07bd8a254196e2fc38018b738b20a9f6746d6b92
CRs-Fixed: 2012433
2017-06-16 05:26:11 -07:00