Commit Graph

493 Commits

Author SHA1 Message Date
Wu Gao
aa15514706 qcacld-3.0: Change WNI_CFG_COUNTRY_CODE_LEN to CFG_COUNTRY_CODE_LEN
All WNI configurations will be cleanup based on new cfg framework, so
change Change WNI_CFG_COUNTRY_CODE_LEN to CFG_COUNTRY_CODE_LEN.

Change-Id: I786b62e2c0aff08a89fc3c8a3359e2ffb4044269
CRs-Fixed: 2380488
2019-01-14 21:47:20 -08:00
hangtian
127c953c7f qcacld-3.0: Use qdf_mem_zero for zero initialization
Use qdf_mem_zero for zero initialization.

Change-Id: Ic2b8d907623cf67a4569aaf01398c1b3a2bff707
CRs-Fixed: 2376644
2019-01-14 08:38:03 -08:00
Wu Gao
0821b0dd4c qcacld-3.0: Change WNI_VALID_CHANNEL_LIST_LEN to VALID_CHANNEL_LIST_LEN
All WNI configurations will be cleanup based on new cfg framework, so
change Change WNI_VALID_CHANNEL_LIST_LEN to VALID_CHANNEL_LIST_LEN.

Change-Id: I805be88ecdcca90cf3a19d1784bf8f8c261b6ca4
CRs-Fixed: 2379748
2019-01-13 18:45:55 -08:00
Jingxiang Ge
37d878ccb5 qcacld-3.0: Fix potential out of bound issue
Change to avoid potential out of bound issue
when unsafe channel numbers parameter is invalid.

Change-Id: I0c2cdac844c5fd644fce61d3d69fefcecdb62f19
CRs-Fixed: 2374986
2019-01-12 07:28:47 -08:00
Jingxiang Ge
b5fb05be39 qcacld-3.0: Check if gp_sap_ctx is empty after reinit
In SSR, after reinit, there is still memory leak
for gp_sap_ctx; As in multi SSR test, memory leak
detection is disabled in recovery mode, it is a
little late to get the issue moment.

Check gp_sap_ctx after stopping all adapter in
hdd_is_interface_down_during_ssr.

Change-Id: I77708d296fb218ca53ac656f844d02f58e23d241
CRs-Fixed: 2377718
2019-01-12 01:28:29 -08:00
Jeff Johnson
2d4ec97ad0 qcacld-3.0: Remove rate_set fields from struct sap_context
Change I3226438b908a96f1b1bd3c2968a0c20eef81a799 ("qcacld-3.0:
Populate correct supported rates from hostapd.conf file") removed
the logic which previously utilized the supp_rate_set and
extended_rate_set fields in struct sap_context. Since these fields
are now obsolete, remove them.

Change-Id: Id433659da18d61217b45a839aaddcfbae329143d
CRs-Fixed: 2378327
2019-01-11 13:37:00 -08:00
Jeff Johnson
a2a04c7b4c qcacld-3.0: Remove sap_roc_ind from tSap_Event
Change I83a704d3f03e9cb9e6a7420f32d609a323799a12 ("qcacld-3.0: Remove
legacy P2P codes in SAP") removed the usage of the sap_roc_ind field
in tSap_Event. Since it is obsolete, remove the field along with the
underlying struct sap_roc_ready_ind_s.

Change-Id: I6101ec7874825b8e4e2e891c3f8ae084486eef87
CRs-Fixed: 2378326
2019-01-11 13:36:57 -08:00
gaurank kathpalia
1dea75b34d qcacld-3.0: Fix channel numbers in SAP ACS 80MHZ channel bonding
currently the driver just ignore the channel numbers greater
than 165 for 80MHZ channel bonding, which results in best
channel selected as 169, 173 in 20MHZ bandwidth as the
respective channels does not support 80, or even 40 MHZ
channel bandwidth.

Fix is to assign the maximum weight to channel numbers greater
than 165, so that they do not get selected as best channel
for 80MHZ bandwidth operation.

Change-Id: I44c5073a806f39d98103681267faa317a6b6d73b
CRs-Fixed: 2375375
2019-01-10 19:42:06 -08:00
Yeshwanth Sriram Guntuka
261ac4d56e qcacld-3.0: Remove redundant logic in csr_is_valid_channel
sapDfsChannelNolList and numCurrentRegDomainDfsChannels
fields in sap dfs info is not populated and is used in
csr_is_valid_channel.

Fix is to remove the redundant logic in csr_is_valid_channel.

Change-Id: Ib98423ba910a1947a908f4a74762f82183aa89d5
CRs-Fixed: 2374080
2019-01-09 10:34:56 -08:00
Kiran Kumar Lokere
7d6e4c9dc1 qcacld-3.0: crypto convergence support for SET KEY
Make changes to the legacy code to support the
new SET KEY converged infrastructure.

Change-Id: Ic5359e3a9035ac5f2a937a9a1013fa92764cda9d
CRs-Fixed: 2358795
2019-01-08 20:24:43 -08:00
Jeff Johnson
22e2026036 qcacld-3.0: Remove vendor_ie_access_policy from sap_config
Change "I9d05cd7b8e051c4e9e4912cf866206ae32ec293d" ("qcacld-3.0:
Define data structures for new AP requirements") added the
vendor_ie_access_policy field to struct sap_config, but subsequently
no code was added which actually utilizes this field. Since it is
unused, remove it, along with the underlying enumeration.

Change-Id: I7a3661a50ef17b0452e87e0ed86c3826b3bd199d
CRs-Fixed: 2375528
2019-01-08 15:31:37 -08:00
Jeff Johnson
9661fc978d qcacld-3.0: Remove sapGetWPSPBCSessionEvent from tSap_Event
Change I9d83f66bce4ec66bc131747254a45d8b6afb5cbb ("qcacld-3.0:
Remove eSAP_GET_WPSPBC_SESSION_EVENT") removed the references
to the sapGetWPSPBCSessionEvent field in typedef tSap_Event.
Since this field is obsolete, remove it, along with the underlying
tSap_GetWPSPBCSessionEvent typedef which is also now obsolete.

Change-Id: I20dbc1635430f8148f997aeb15df4ddb7e06ceef
CRs-Fixed: 2375527
2019-01-08 15:31:30 -08:00
Jeff Johnson
a5798f1a03 qcacld-3.0: Remove typedef tChannelInfo
Change I5a07c44ca4138af5494d1a6f6e1d08158d244be2 ("qcacld-3.0: Remove
SapAllChnlList from struct sap_context") removed the last reference to
typedef tChannelInfo. Since this typedef is now obsolete, remove it.

Change-Id: Ib38c9744c9419ce91b94956b5da78cc7bcc440c5
CRs-Fixed: 2375526
2019-01-08 15:31:23 -08:00
Jeff Johnson
b382dcb420 qcacld-3.0: Remove typedef tSapChannelListInfo
Change I2c3b96e1f2ee44c9f1158108d4b5e48495222080 ("qcacld-3.0: Make
SAP open()-close() & start()-stop() symmetrical") removed the last
reference to typedef tSapChannelListInfo. Since the typedef is
obsolete, remove it.

Change-Id: I4fc7cf83f41ad0192b971513f0456cf211fabb54
CRs-Fixed: 2375525
2019-01-08 15:31:16 -08:00
Jeff Johnson
75ea56b510 qcacld-3.0: Harmonize sap_get_channel_list()
The parameter identifiers used in the implementation of
sap_get_channel_list() differ from the ones used in the forward
reference. Since this can be confusing for both humans and code
analysis tools, harmonize on the parameters used in the
implementation.

Change-Id: I356740677e790e48b0c28d5ca694be3ae3835d59
CRs-Fixed: 2375524
2019-01-08 15:31:09 -08:00
Jeff Johnson
88c5c3e850 qcacld-3.0: Remove isScanSessionOpen from struct sap_context
Change I3c4f8da14dbc70a3102fb1892bb101eb1a90a00d ("qcacld-3.0: Fix
firmware assertion caused by vdev delete") removed all usage of field
isScanSessionOpen in struct sap_context. Since it is obsolete, remove
it.

Change-Id: I30eb9d3b4ca39a5f14dafe9559d025cb361372b5
CRs-Fixed: 2375522
2019-01-08 15:31:02 -08:00
Jeff Johnson
7fea18b8a3 qcacld-3.0: Remove sap_channel_matrix_check() prototype
The implementation of sap_channel_matrix_check() is no longer part of
the driver, but the prototype is still present. Since the prototype is
obsolete, remove it.

Change-Id: I689c4360776a2b46d723c48dd5bb8a61da5c95cd
CRs-Fixed: 2375521
2019-01-08 15:30:50 -08:00
Jeff Johnson
9585979abd qcacld-3.0: Remove stop_bss_in_progress from struct sap_context
Change I76e78824cdc7acad87e60310d53225596630ea94 ("qcacld-3.0: Remove
SAP FSM dependency from CSA") removed all logic which used the
stop_bss_in_progress field in struct sap_context. Since this field is
now obsolete, remove it.

Change-Id: I9867bcf7d8021e7173c679d3e20e16ca8bdbc5cc
CRs-Fixed: 2375520
2019-01-08 15:30:43 -08:00
Jeff Johnson
676dacfbb9 qcacld-3.0: Remove SapAllChnlList from struct sap_context
Change Ia0fa016b174ef4b50e2cc339e4e476ec65642dbf ("qcacld-3.0: Use dfs
component support") removed the logic that utilized the SapAllChnlList
in struct sap_context. Since this field is now obsolete, remove it,
along with the underlying tAll5GChannelList typedef that is also now
obsolete.

Change-Id: I5a07c44ca4138af5494d1a6f6e1d08158d244be2
CRs-Fixed: 2374834
2019-01-07 00:10:27 -08:00
Jeff Johnson
e0b7effe1e qcacld-3.0: Remove macro ANI_EAPOL_KEY_RSN_NONCE_SIZE
Macro ANI_EAPOL_KEY_RSN_NONCE_SIZE is obsolete, so remove it.

Change-Id: Id9107d513f8c4ebe42e7dc6b6ee19d2e09fd7748
CRs-Fixed: 2374833
2019-01-07 00:10:18 -08:00
Jeff Johnson
534dc7f16b qcacld-3.0: Remove typedef tSapChSelParams
Typedef tSapChSelParams is unused, so remove it.

Change-Id: I13f55881c75454125b1fbc6be741e4f164c51782
CRs-Fixed: 2374832
2019-01-07 00:10:08 -08:00
Jeff Johnson
b3a9c6cfc7 qcacld-3.0: Remove ap_table fields from struct sap_config
The ap_table_max_size and ap_table_expiration_time fields in struct
sap_config are unused, so remove them.

Change-Id: I24aabe78b0da45c3dde19b444f94222eb874477d
CRs-Fixed: 2374831
2019-01-07 00:09:59 -08:00
Jeff Johnson
94b3303ffd qcacld-3.0: Remove ucSecEnabled from struct sap_context
Field ucSecEnabled in struct sap_context is initialized, but is
otherwise unused, so remove it.

Change-Id: I4b947be54d86e0e7e272b97427efd7acb4658fe6
CRs-Fixed: 2374275
2019-01-07 00:07:31 -08:00
Jeff Johnson
d039a3302f qcacld-3.0: Remove ownSsid from struct sap_context
The ownSsid and ownSsidLen fields in struct sap_context are unused, so
remove them.

Change-Id: I405f0c7c47e163a962bc3db19d88d5b69ca95ac7
CRs-Fixed: 2374274
2019-01-07 00:07:25 -08:00
Arif Hussain
0b634b48ed qcacld-3.0: Restore gDisableDfsJapanW53 ini support
Restore gDisableDfsJapanW53 ini support.

Change-Id: I085e62e7cd8b1fdfe931997d35915f55d079f11d
CRs-Fixed: 2371006
2019-01-01 17:06:03 -08:00
Abhishek Singh
caebb463d7 qcacld-3.0: Fix infinite for loop in wlansap_update_csa_channel_params
In wlansap_update_csa_channel_params if channel is not present in
op class table the for loop become infinite.

Add check to break the loop if BW is 20 and still entry is not found
in op class table.

Change-Id: I6ef6bc138a8df0e18b54bd16a47eba23b437616d
CRs-Fixed: 2373915
2018-12-30 03:59:09 -08:00
gaurank kathpalia
ece50259ec qcacld-3.0: Set passive scan as false in ACS scan req
Currently the driver doesn't set the passive scan req flag
as false which results in passive scan, and thus introduces
latency.

Fix is to set passive scan as false in ACS scan req.

Change-Id: I1274a4ccb9d99d568c32aeea1a65e4637a82b9c8
CRs-Fixed: 2372103
2018-12-24 22:29:32 -08:00
Jeff Johnson
64a419a8ad qcacld-3.0: Remove sap_dfs_is_channel_in_preferred_location()
Change Ia0fa016b174ef4b50e2cc339e4e476ec65642dbf ("qcacld-3.0:
Use dfs component support") removed the last client of
sap_dfs_is_channel_in_preferred_location().  Since this function
is now obsolete, remove it.

Change-Id: I137a00699511c7f019f6cf3b8f0579aeb52c7778
CRs-Fixed: 2371144
2018-12-21 15:12:00 -08:00
lifeng
0b46ae503e qcacld-3.0: Refine mlme reg configurations
Refine mlme reg configurations based on converged cfg component.
Remove related legacy codes.

Change-Id: I524b29d2d03e60111fa1759d11e32236bb3aa3fa
CRs-Fixed: 2357961
2018-12-19 04:56:44 -08:00
gaurank kathpalia
4ef9ba2cf8 qcacld-3.0: Modify the active dwell time in ACS scan
Currently the driver scans for the channels as part of ACS
algorithm, to select the best channel for SAP bringup.
But the active dwell time set in the scan request is Zero,
hence the active probe is not sent to the AP, and the DUT
(SAP in this case), just passively scans the channels for BSS,
which causes latency in SAP bringup.

Fix is to initialize the default active dwell time in case of
ACS scan, and set broadcast probe to true.

Change-Id: If4f001a9b272a7894125d81f2895cfa6f6ca2bc4
CRs-Fixed: 2363789
2018-12-13 14:57:12 -08:00
Jeff Johnson
f9f921c52a qcacld-3.0: Clean up tSap_StationAssocReassocCompleteEvent
The typedef tSap_StationAssocReassocCompleteEvent contains the
following fields that are not being used, so remove them:
- SapAuthType
- beaconLength
- beaconPtr
- assocReqLength
- assocReqPtr
- assocRespLength
- assocRespPtr

Change-Id: I1de03b76b0070ee0b19d3d4672ed75614c013ac7
CRs-Fixed: 2364104
2018-12-11 10:18:23 -08:00
Jeff Johnson
219b6a0aae qcacld-3.0: Remove gDisableDfsJapanW53 remnants
Previously change I7f39ed0680919c6a383d9b8bae5864f979b6948c
("qcacld-3.0: Refactor more dfs cfg items") removed support for
gDisableDfsJapanW53. However some remants of that support were left
behind, so remove them.

Change-Id: Ic0ec3411621c87a66a2d2055ceeebc2ed027aa39
CRs-Fixed: 2364103
2018-12-11 10:18:19 -08:00
Jeff Johnson
9f158923b9 qcacld-3.0: Remove typedef tSap_DfsNolInfo
The only use of typedef tSap_DfsNolInfo is to define the unused
sapDfsNolInfo field in typedef tSap_Event. Since they serve no purpose
remove both the sapDfsNolInfo field and the tSap_DfsNolInfo typedef.

Change-Id: Ic63288c0ea59b4f26a20d65a3e41503e49efedbd
CRs-Fixed: 2364102
2018-12-11 10:18:16 -08:00
Abhishek Singh
f27d517553 qcacld-3.0: Move ifdef CONFIG_VDEV_SM outside functions in sap
Moves ifdef CONFIG_VDEV_SM outside functions in sap module.

Change-Id: I141d86293ca61d29cc2e6d47a7b988eb6e127950
CRs-Fixed: 2363650
2018-12-11 06:11:05 -08:00
Jeff Johnson
4155a5ea6d qcacld-3.0: Remove assoId from tSap_StationAssocIndication
The typedef tSap_StationAssocIndication contains an assoId field that
isn't used, so remove it.

Change-Id: I2a4ba9bd7220cb0cebe891d7085d92e17361ed06
CRs-Fixed: 2364101
2018-12-10 20:21:43 -08:00
Jeff Johnson
405c998276 qcacld-3.0: Remove sessionID field from tSapCtxList
The sessionID field in tSapCtxList is written but never read, hence it
serves no purpose, so remove it.

Change-Id: I0c7a134dba75be905f85016a3db026132bbfa348
CRs-Fixed: 2364099
2018-12-10 20:21:38 -08:00
Jeff Johnson
5c859a5110 qcacld-3.0: Remove obsolete typedef tSap_SoftapStats
The typedef tSap_SoftapStats is unused, so remove it.

Change-Id: I641c5528a6794aa3721529e0fc0015bbb71499fd
CRs-Fixed: 2364098
2018-12-10 20:21:36 -08:00
Amar Singhal
05b103ff39 qcacld-3.0: Validate hostapd country code
Hostapd is expected to use country code already programmed in the driver.
Therefore, validate the country code sent by hostapd. Enable SAP 11d only
if country code from hostapd is same as driver country code.

Change-Id: I88d6603f4e696c86ffb85b798221d750f71b741b
CRs-Fixed: 2359333
2018-12-10 15:12:21 -08:00
gaurank kathpalia
379e05c97a qcacld-3.0: Update the sap channel only after sap start event
In the case of SAP restart due to a RADAR, or force SCC
due to STA vdev formed, in the SAP restart path
the driver updates the SAP channel in the global
AP context, and then sends the command to change the channel
to south bound layers to process, which may reject or accept
the command.
If the command has been accepted, the channel in the
global config would be the same as the channel configured
in the restart path, but for a case where the command was rejected
by the south bound, due to a concurrency check, or other reasons
the SAP remains on the previous channel in SCC, or MCC, with the
STA interface, but the channel in the global config is same as that
given in the restart path, so the real operating channel, and the
config channel are different.
Because of this if a fresh bringup of some vdev is to be done
according to the channel of the SAP, that would fail in some cases
( SAP on DFS channel, and STA coming, so the driver would reject MCC,
and SCC) which could be avoided if the channel of the SAP wouldnt be
configured in the restart path, and would be configured in the callback
of SAP.
Also the secondary channel of the SAP was configured as the secondary
channel configured at time of fresh SAP bringup, hence the sec channel
isn't updated after every restart of SAP.

Fix is to configure the channel of in the global AP context
only when the SAP START or CHANNEL CHANGE event comes for
the SAP. Also update the secondary channel after the CSA.

Change-Id: I6cbc31cae4958c0d7da79d4640e5ad8b1ce98338
CRs-Fixed: 2355420
2018-12-10 12:49:57 -08:00
Jeff Johnson
6d0b75be6e qcacld-3.0: Remove wlansap management frame registrar
The following wlansap management frame registration functions are
unused, so remove them:
- wlansap_register_mgmt_frame()
- wlansap_de_register_mgmt_frame()

Change-Id: Ib8865fbda4e65e7bbd39576a49423f60426d489a
CRs-Fixed: 2361909
2018-12-07 15:53:06 -08:00
Jeff Johnson
c59ef8b5b6 qcacld-3.0: Replace tpAniSirGlobal in SAP
To align with the Linux coding style replace tpAniSirGlobal with
struct mac_context * in:
sap_api_link_cntl.c
sap_ch_select.c
sap_fsm.c
sap_internal.h
sap_module.c

Change-Id: Iec4f67fc3ba08cf046d00136fb0f4edf37d65d64
CRs-Fixed: 2360297
2018-12-04 18:25:51 -08:00
Arif Hussain
224d38154f qcacld-3.0: Refactor more dfs cfg items
Refactor following DFS cfg items
CFG_DISABLE_DFS_CH_SWITCH
CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME
CFG_IGNORE_CAC_NAME
CFG_DFS_RADAR_PRI_MULTIPLIER_NAME
CFG_SAP_TX_LEAKAGE_THRESHOLD_NAME
CFG_DFS_BEACON_TX_ENHANCED
CFG_DISABLE_DFS_JAPAN_W53
CFG_ENABLE_NON_DFS_CHAN_ON_RADAR

Change-Id: I7f39ed0680919c6a383d9b8bae5864f979b6948c
CRs-Fixed: 2351995
2018-12-04 00:05:53 -08:00
Jeff Johnson
a0619e4264 qcacld-3.0: Replace PMAC_STRUCT() with MAC_CONTEXT()
The inline function MAC_CONTEXT() is the preferred mechanism for
converting a MAC handle into a MAC context, so replace all instances
of the legacy macro PMAC_STRUCT().

Change-Id: Ieb29696c79b729648462be699892607484c2f301
CRs-Fixed: 2357873
2018-11-30 14:36:47 -08:00
jiad
391c528b3e qcacld-3.0: Properly featurize mobile router
When CONFIG_MOBILE_ROUTER is enabled there are build failures
due to improper featurization of mobile router, so fix the
featurization.

Change-Id: Ic9e1f608bc631409fbb5bcf84fc3f4520d69a7c9
CRs-Fixed: 2355786
2018-11-29 18:10:55 -08:00
Jeff Johnson
b9794442c6 qcacld-3.0: Rename pMac in misc SAP files
Per the Linux coding style "mixed-case names are frowned upon" and
"so-called Hungarian notation [...] is brain damaged." One identifier
used extensively throughout the driver that violates both of these
tenants is "pMac." In order to be compliant with the Linux coding
style there is a campaign to rename all instances of this identifier.

For this change rename all instances of "pMac" to "mac" in:
sap_ch_select.c
sap_fsm.c
sap_module.c

Change-Id: Iaf300b458fb89550d2e3a90f98ed6aabecd98024
CRs-Fixed: 2355451
2018-11-27 18:30:46 -08:00
Jeff Johnson
1856266cba qcacld-3.0: Replace hal in sap_module
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hal with mac_handle
in sap_module.

Change-Id: I8631e7b3cc4bdca564846bb2dee50e6c993087ef
CRs-Fixed: 2351898
2018-11-21 13:46:46 -08:00
Jeff Johnson
15f7829bbb qcacld-3.0: Replace hal in sap_fsm
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hal with mac_handle
in sap_fsm.

Change-Id: I560f99110bd38815c6e515006245f538d3dc6482
CRs-Fixed: 2351897
2018-11-21 13:46:38 -08:00
Jeff Johnson
7730fbbd64 qcacld-3.0: Replace halHandle in sap_ch_select
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of halHandle with
mac_handle in sap_ch_select.

Change-Id: I4306005fb2677b1892272e2176e8cc73cb927d29
CRs-Fixed: 2351894
2018-11-16 14:55:36 -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
Jeff Johnson
419348b1bc qcacld-3.0: Replace hHal in sap_module
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hHal with mac_handle
in sap_module.

Change-Id: I5422b4a7e1a464a8f870cea33069c47401c73bac
CRs-Fixed: 2349566
2018-11-15 15:18:10 -08:00