Commit Graph

254 Commits

Author SHA1 Message Date
Jeff Johnson
65dd6d9632 qcacld-3.0: Refine API wlansap_set_mac_acl()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_set_mac_acl() to use the true struct pointer type.

Change-Id: I3d32647b2e9dfdea2314f8a3ade8aee82c94f8af
CRs-Fixed: 2116267
2017-09-28 03:47:55 -07:00
Jeff Johnson
16e29cd0de qcacld-3.0: Refine API wlansap_stop_bss()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_stop_bss() to use the true struct pointer type.

Change-Id: I225637ad0543e721bee34378cd3619e1fb785c60
CRs-Fixed: 2116267
2017-09-28 03:47:52 -07:00
Jeff Johnson
e2f7d54e42 qcacld-3.0: Refine API wlansap_start_bss()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_start_bss() to use the true struct pointer type.

Change-Id: Ic6db98d641f5c71967f04e09b7b41ec20285bc99
CRs-Fixed: 2116267
2017-09-28 03:47:50 -07:00
Jeff Johnson
2de14da2a5 qcacld-3.0: Refine API wlan_sap_set_vht_ch_width()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlan_sap_set_vht_ch_width() to use the true struct pointer type.

Change-Id: I0858cb97b0a99fddcbcb88551280858789d8c0e9
CRs-Fixed: 2116267
2017-09-28 03:47:48 -07:00
Jeff Johnson
ee7a3938d5 qcacld-3.0: Refine API wlan_sap_get_vht_ch_width()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlan_sap_get_vht_ch_width() to use the true struct pointer type.

Change-Id: I1c717866721a6f2573df5bc7adbd0ddb6ea61cc3
CRs-Fixed: 2116267
2017-09-28 03:47:46 -07:00
Jeff Johnson
ebb7f0ab68 qcacld-3.0: Refine API wlan_sap_get_phymode()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlan_sap_get_phymode() to use the true struct pointer type.

Change-Id: I572a61fe1068d47e1f443788c9dbf1ea21664e4c
CRs-Fixed: 2116267
2017-09-28 03:47:43 -07:00
Jeff Johnson
5e6b0d2886 qcacld-3.0: Refine API wlansap_check_cc_intf()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_check_cc_intf() to use the true struct pointer type.

Change-Id: Id994ff58d005a8a50611fa2bbd8ab0bdc9c7fde7
CRs-Fixed: 2116267
2017-09-28 03:47:41 -07:00
Jeff Johnson
2f6013c21a qcacld-3.0: Refine API wlansap_is_channel_leaking_in_nol()
See change "qcacld-3.0: Refine API wlansap_open()" for the API
history. Update wlansap_is_channel_leaking_in_nol() to use the
true struct pointer type.

Change-Id: If9c05df8c3b15ab8c480347ef6e5c87e42e545a6
CRs-Fixed: 2116267
2017-09-28 03:47:39 -07:00
Jeff Johnson
bb4d77cb25 qcacld-3.0: Refine API wlansap_is_channel_in_nol_list()
See change "qcacld-3.0: Refine API wlansap_open()" for the API
history.  Update wlansap_is_channel_in_nol_list() to use the true
struct pointer type.

Change-Id: Ia15403523d27023f50d676f3c7099b018f7d21f7
CRs-Fixed: 2116267
2017-09-28 03:47:37 -07:00
Jeff Johnson
e5124bba52 qcacld-3.0: Refine API sap_cleanup_channel_list()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update sap_cleanup_channel_list() to use the true struct pointer type.

Change-Id: Iea5bc4d9f2b94622a87e66bd4e0f41b9fab54a64
CRs-Fixed: 2116267
2017-09-28 03:47:34 -07:00
Jeff Johnson
42e7c403e5 qcacld-3.0: Refine API wlansap_de_register_mgmt_frame()
See change "qcacld-3.0: Refine API wlansap_open()" for the API
history.  Update wlansap_de_register_mgmt_frame() to use the true
struct pointer type.

Change-Id: I41231b3ed7d43bdd8d3e250673b3ad1985ecd60d
CRs-Fixed: 2116267
2017-09-28 03:47:33 -07:00
Jeff Johnson
4a7ff43427 qcacld-3.0: Refine API wlansap_register_mgmt_frame()
See change "qcacld-3.0: Refine API wlansap_open()" for the API
history.  Update wlansap_register_mgmt_frame() to use the true
struct pointer type.

Change-Id: I4f1816f30b54c21e98119fe12c8bcca4a5be93de
CRs-Fixed: 2116267
2017-09-28 03:47:30 -07:00
Jeff Johnson
617fe64a3d qcacld-3.0: Refine API wlan_sap_getstation_ie_information()
See change "qcacld-3.0: Refine API wlansap_open()" for the API
history.  Update wlan_sap_getstation_ie_information() to use the
true struct pointer type.

Change-Id: I7a3be736210ffe44c89dd96c7d70e4fda04938c6
CRs-Fixed: 2116267
2017-09-28 03:47:28 -07:00
Jeff Johnson
42fbe2f0e9 qcacld-3.0: Refine API wlansap_modify_acl()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_modify_acl() to use the true struct pointer type.

Change-Id: I91aa0e55f1f08a28417108dae76205c0785cd163
CRs-Fixed: 2116267
2017-09-28 03:47:26 -07:00
Jeff Johnson
3d4c7100a9 qcacld-3.0: Refine API wlansap_stop()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_stop() to use the true struct pointer type.

Change-Id: Ic5b8108cd599de44ae1f03489b4621630fa56662
CRs-Fixed: 2116267
2017-09-28 03:47:24 -07:00
Jeff Johnson
d8b6057125 qcacld-3.0: Refine API wlansap_start()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_start() to use the true struct pointer type.

Change-Id: I20c27e75c0e4d1dce52316f39ce3cad9f4187533
CRs-Fixed: 2116267
2017-09-28 03:47:22 -07:00
Jeff Johnson
70955b5bdc qcacld-3.0: Refine API wlansap_close()
See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_close() to use the true struct pointer type.

Change-Id: Ia0f05b1ed80b3cc317f8951e6d1ccd94eee35c9c
CRs-Fixed: 2116267
2017-09-28 03:47:19 -07:00
Jeff Johnson
2bc0b727e3 qcacld-3.0: Refine API wlansap_open()
At one time the WLAN driver only supported a single SAP. At that time
most SAP APIs took the global context pointer as a param, and from
that they could extract the pointer to the one & only SAP context.
Later the MBSSID feature was added, and conditional compilation was
introduced such that either the global context pointer or a per-BSS
SAP context pointer was used. Finally in qcacld-3.0 the conditional
compilation was removed, leaving just the MBSSID behavior. However one
of the artifacts that was left behind was that the SAP APIs are
currently defined to take a void *context which prevents the compiler
from performing proper type checking.

Update wlansap_open() to return the true struct pointer type so that
it can then be used by other SAP APIs.

Change-Id: I216ed653e4feb9960357a168d4981e7a7a92411e
CRs-Fixed: 2116267
2017-09-28 03:47:17 -07:00
Jeff Johnson
8d5d7cd3b1 qcacld-3.0: Remove obsolete wlansap_set_counter_measure()
Change "qcacld-3.0: Remove hdd_softap_tkip_mic_fail_counter_measure()"
removed the only caller of function wlansap_set_counter_measure. Since
this function is now unused and obsolete, remove it.

Change-Id: I6fc7ab24351dca41b22aabf40a82509448c795b0
CRs-Fixed: 2115342
2017-09-28 03:46:49 -07:00
Jeff Johnson
67cbe1d49f qcacld-3.0: Remove obsolete wlansap_set_wparsn_ies()
Change "qcacld-3.0: Remove obsolete SAP support for SIOCSIWGENIE"
removed the only caller of function wlansap_set_wparsn_ies(). Since
this function is now unused and obsolete, remove it. As a result the
APWPARSNIEs field in the SAP context is also no longer used, so remove
it as well.

Change-Id: I02a1f0597688367650796b1334b6144a6afff6ee
CRs-Fixed: 2114956
2017-09-28 03:46:37 -07:00
bings
d60c0b4795 qcacld-3.0: Fix channel selection failure after radar is detected
sap_dfs_is_channel_in_nol_list will return true even for the channels
which are not in the nol list.

When sap_dfs_is_channel_in_nol_list gets bonded channels, it gets the
bonded channels of current channel of the sap rather than the input
channels, so after radar is detected, the current channel of the sap
is in nol list, and sap_dfs_is_channel_in_nol_list returns true for
all input channels.

sap_dfs_is_channel_in_nol_list should get the bonded channels of input
channels.

CRs-fixed: 2105496
Change-Id: I7c5fc06c66c004aa5c1a208376d1ab4b88956a6f
2017-09-27 16:23:32 -07:00
Jeff Johnson
a7c0ddb8c1 qcacld-3.0: sap: Replace instances of unadorned %p
Replace instances of unadorned %p in core/sap.

Change-Id: I37a803518430313d360d10e429469fa7bb471b78
CRs-Fixed: 2100997
2017-09-25 21:56:54 -07:00
Zhu Jianmin
62e119634c qcacld-3.0: Avoid issue that NULL constant is dereferenced
NULL constant is unsuitable for sapEvent parameter since following
may be called:
        sapEventInit(sapEvent);
        vosStatus = sapFsm(sapContext, sapEvent);

Change-Id: I2ffc1be27f96bcbd793b2302e6c5920b5d30073b
CRs-Fixed: 2111290
2017-09-25 07:22:01 -07:00
Jeff Johnson
a0fa814f93 qcacld-3.0: Remove pStaAddIE from the SAP context
Currently the SAP has logic to extract and locally save a collection
of Additional IEs. But this is legacy code inherited from a version
of the driver that supported in-driver SAP, and now the SAP
functionality is handled primarily by hostapd. Since this local copy
of the Additional IEs is never used, remove it.

Change-Id: I9bb1f7d44dfdeb4c908016aad365ee1b94a97b29
CRs-Fixed: 2114375
2017-09-22 18:39:06 -07:00
Jeff Johnson
dba35543b8 qcacld-3.0: Remove pStaWapiReqIE from the SAP context
Currently the SAP has logic to extract and locally save the WAPI
IE. But this is legacy code inherited from a version of the driver
that supported in-driver WAPI, and now the SAP WAPI functionality is
handled by hostapd. Since this local copy of the WAPI IE is never
used, remove it.

Change-Id: I57cad0d8e44ff1ca5a7a61454a21aac61bf873c0
CRs-Fixed: 2114153
2017-09-22 18:39:03 -07:00
Jeff Johnson
29adc0738b qcacld-3.0: Remove APWPSIEs from the SAP context
The SAP no longer maintains WPS information internally and the
APWPSIEs struct in the SAP context is no longer referenced, so remove
it.

Change-Id: If4a30626913fdacb751a434458a2e3918665a352
CRs-Fixed: 2113553
2017-09-20 22:58:28 -07:00
Jeff Johnson
6c8e31255c qcacld-3.0: Remove SapGlobalLock infrastructure
Change "qcacld-3.0: Remove obsolete wlansap_get_wps_state()" removed
the last consumer of the SapGlobalLock infrastructure. Since this
infrastructure is now unused, remove it.

Change-Id: I4646a7796073b259351d8cff48a424ef8741c9cf
CRs-Fixed: 2113552
2017-09-20 22:09:17 -07:00
Jeff Johnson
8b8d03d533 qcacld-3.0: Remove obsolete wlansap_get_wps_state()
Currently in hdd_hostapd_sap_event_cb() when processing the
eSAP_STA_ASSOC_EVENT and eSAP_STA_REASSOC_EVENT events a call is made
to wlansap_get_wps_state(). This is a legacy call inherited from a
version of the driver that supported in-driver WPS. But now that WPS
is handled by hostapd this functionality is obsolete and should be
removed.

Change-Id: Ia52d9554ed4b3a44726a4cac268eae77856cbd18
CRs-Fixed: 2113551
2017-09-20 21:27:10 -07:00
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