Commit Graph

547 Commits

Author SHA1 Message Date
Abhishek Singh
3bbf6cb77c qcacld-3.0: Fix wait timeout for existing channel change request
In case of STA+SAP, if STA connect to new channel, driver check
if SAP channel switch is required. Before this it wait if channel
switch is already in progress, if not it continue and check if
channel change is required. While waiting in case where event was
set and channel switch was not in progress, the even gets reset
after waiting.

So if event is not set again, i.e in case SAP channel change is not
required. Any subsequent wait on the event will result in timeout.

Also while changing channel this event is reset and then the
concurrency checks are made and if checks fails the channel change
may not happen leaving event in reset state.

So wait for event only if channel switch is already in progress.
Also reset the event once all concurrency checks have passed and
channel change is started.

Change-Id: Iffcd8b2bf9dc7cbbd7d939983601cc395ef4c515
CRs-Fixed: 2425145
2019-04-02 11:17:16 -07:00
Min Liu
0daa786397 qcacld-3.0: Parse IE from ASSOC_REQ_IE_OFFSET in assoc req
Random failure is observed when trying to parse RSN IE from
assoc_ind->assocReqPtr in sap_fill_owe_ie_in_assoc_ind.
It should be parsed from ASSOC_REQ_IE_OFFSET.

Change-Id: I8f532f8850a7d997e0227a9e00d4285297243495
CRs-Fixed: 2408770
2019-03-28 04:36:41 -07:00
Jeff Johnson
71277f5c32 qcacld-3.0: Harmonize wlansap_roam_callback()
Most of the identifiers used in the wlansap_roam_callback() prototype do
not match the ones used in the implementation, and furthermore the one
that does match does not conform to the coding standard, so update both
the prototype and the implementation to have identical, conforming
identifiers.

Change-Id: I3cf3622121d15bb6c9fb2f9a63a0f9b99dd675f6
CRs-Fixed: 2423731
2019-03-27 21:36:26 -07:00
Jeff Johnson
456e3b44e7 qcacld-3.0: Rename SAP identifier pScanResult
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SAP identifier pScanResult to be
compliant.

Change-Id: I7a43a55f19d3d9bed4ba84d80347c49c944af45f
CRs-Fixed: 2423730
2019-03-27 21:36:21 -07:00
Jeff Johnson
66fc8d2e91 qcacld-3.0: Replace typedef tWLAN_SAPEvent
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 tWLAN_SAPEvent typedef does not
meet any of those criteria, so replace it (and the "pt" variant) with
a properly named struct.

Change-Id: Ie39e51a24a16f0c19b7b0fe926748a6b90d31632
CRs-Fixed: 2423729
2019-03-27 21:36:16 -07:00
Jeff Johnson
b91e2d9eeb qcacld-3.0: Properly featurize sap_update_unsafe_channel_list()
Function sap_update_unsafe_channel_list() is conditional upon feature
flag FEATURE_WLAN_CH_AVOID. However there isn't a stub implementation
for when the feature is not enabled, and as a result in-function
conditional compilation is required at the call site. This is contrary
to the coding style, so introduce a stub implementation for when the
feature is not present. In addition make this function static since
the scope is local to a single source file.

Change-Id: I12f010ac8f6d2cb63794e3295977bfac4266cca1
CRs-Fixed: 2423728
2019-03-27 21:36:10 -07:00
Jeff Johnson
6c3368392b qcacld-3.0: Remove acsBestChannelInfo from struct sap_context
The information currently being stored in the sap_context's
acsBestChannelInfo is only utilized during the execution of function
sap_select_channel(). Since this use temporal there is no need to
cache the information, so remove the struct from the sap_context.

Change-Id: I6ca7ff73752ed44fdf11ad99f303538480942edb
CRs-Fixed: 2423727
2019-03-27 21:36:05 -07:00
Jeff Johnson
eb18030b81 qcacld-3.0: Remove SapQosCfg from struct sap_context
The SapQosCfg in struct sap_context is written, but is never read.
Since this information is unused, remove it.

Change-Id: Ic04980cd365524d458f6cb5d3e1ea411d1efd10f
CRs-Fixed: 2423726
2019-03-27 21:36:01 -07:00
Jeff Johnson
9a472f7f85 qcacld-3.0: Rename SAP identifier pconfig
The Linux Coding Style frowns upon so-called Hungarian notation, so
rename SAP identifier pconfig to be compliant.

Change-Id: I2d0ef46cf8f9972ca16592e7d8799ab8592b04a0
CRs-Fixed: 2422213
2019-03-25 22:17:25 -07:00
Jeff Johnson
8f8ceb9ac8 qcacld-3.0: Replace typedef tsap_config_t
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 tsap_config_t typedef does not
meet any of those criteria, so replace it with the underlying struct.

Change-Id: I95d9ad30d9af35dc4572d70c555b24b0285f8b2d
CRs-Fixed: 2422212
2019-03-25 22:17:19 -07:00
Jeff Johnson
e71c30916e qcacld-3.0: Rename SAP identifier pconfig_params
The Linux Coding Style frowns upon so-called Hungarian notation, so
rename SAP identifier pconfig_params to be compliant.

Change-Id: I2213bd6875113b5e73238d05cc131c29a0d473c2
CRs-Fixed: 2422211
2019-03-25 22:17:15 -07:00
Jeff Johnson
7dcac7ecbf qcacld-3.0: Rename SAP Event Callback identifiers
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SAP Event Callback identifiers
tpWLAN_SAPEventCB, pfnSapEventCallback, pSapEventCallback, and
pacs_event_callback to be compliant.

Change-Id: I6ce97af649c73dd779b23c7ec4f0192f28d0f00a
CRs-Fixed: 2422210
2019-03-25 20:40:33 -07:00
Jeff Johnson
2284ad9c47 qcacld-3.0: Rename SAP identifier pUsrContext
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SAP identifier pUsrContext to be
compliant.

Change-Id: Ib9c4cac6eb6f813e4da66c1c65bab16cebf62946
CRs-Fixed: 2422209
2019-03-25 20:40:26 -07:00
Jeff Johnson
eb704c070e qcacld-3.0: Rename SAP identifier pConfig
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SAP identifier pConfig to be compliant.

Change-Id: I7618b95b3d88c2306412eb8d1f55dcc6cfd1a476
CRs-Fixed: 2422208
2019-03-25 20:40:19 -07:00
Jeff Johnson
72577c82a6 qcacld-3.0: Rename SAP identifier pDelStaParams
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SAP identifier pDelStaParams to be
compliant.

Change-Id: I034f0157fe4016bbcacf3ce652035a3a13184f90
CRs-Fixed: 2422207
2019-03-25 20:40:12 -07:00
Jeff Johnson
8329f33bc8 qcacld-3.0: Rename SAP identifier sapContext
The Linux Coding Style frowns upon mixed-case names so rename SAP
identifier sapContext to be compliant.

Change-Id: If3d09c63141077247635315186068cabab396612
CRs-Fixed: 2422206
2019-03-25 20:40:05 -07:00
Jeff Johnson
84e2270bc6 qcacld-3.0: Remove obsolete SapFsm() prototype
Function SapFsm() no longer exists, so remove the obsolete prototype.

Change-Id: Ie308376743bd5e501d5037464ad55a9e47965b31
CRs-Fixed: 2422205
2019-03-25 20:39:59 -07:00
Jeff Johnson
01fcdb6b96 qcacld-3.0: Rename SAP identifier sapEvent
The Linux Coding Style frowns upon mixed-case names so rename SAP
identifier sapEvent to be compliant.

Change-Id: Iaa39fd0e82dedeed1a6749372214d6bd7e9c324b
CRs-Fixed: 2422204
2019-03-25 20:39:53 -07:00
Abhishek Singh
bfaebe3372 qcacld-3.0: Fix opportunistic timer start issue in 2x2 DBS mode
In 2x2 DBS mode once STA/SAP change channel from 2.4Ghz to 5Ghz,
policy_mgr_get_current_pref_hw_mode_ptr never return
PM_SINGLE_MAC_UPGRADE to start the opportunistic timer to switch to
single mac mode.

Fix is to check and start opportunistic timer once connection info are
updated. Also start opportunistic timer before
check for SAP to change channel as when SAP change channel it should
stop opportunistic timer and set required HW mode.
If single mac mode is required after channel switch it will start
opportunistic timer again in channel switch callback.

Change-Id: Id6bbc7ea51ba8147e517e7e7bf2b14931c95ea44
CRs-Fixed: 2419645
2019-03-24 14:54:48 -07:00
Ashish Kumar Dhanotiya
6025c701f7 qcacld-3.0: Cache supported mode of connected STA for SAP
Currently in case of SAP, supported mode of station received
in assoc request is not getting cached.

Add support to cache the supported mode of station received
in assoc request request in sta_info.

Change-Id: I9820ae2d65fc529a1ab16424f6732fd273da3ae0
CRs-fixed: 2419957
2019-03-22 13:33:34 -07:00
Jeff Johnson
4cfe6cc8b9 qcacld-3.0: sap: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within sap replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I0f738f58e64fdf20957d57775c3570fb4ccfc9f7
CRs-Fixed: 2418389
2019-03-22 03:08:57 -07:00
Srinivas Girigowda
b8fdc643d2 qcacld-3.0: Consolidate multiple MAX_SSID_LEN to WLAN_SSID_MAX_LEN
Consolidate multiple MAX_SSID_LEN to WLAN_SSID_MAX_LEN.

Change-Id: I1764b891501c4e3371cf478c324ebcdcab319f5f
CRs-Fixed: 2419367
2019-03-20 22:09:45 -07:00
Srinivas Girigowda
cf161406dd qcacld-3.0: Use converged qcacmn macros (part 1)
Replace the existing qcacld-3.0 macros with qcacmn converged
macros.

Change-Id: Ie05f396fcd2e01cf86256f25dbc171bbdf763da9
CRs-Fixed: 2416429
2019-03-19 02:24:23 -07:00
Zhaoyang Liu
132becce7e qcacld-3.0: Fix issues about uninitialized variables
Fix issues that variables used without initialization.

Change-Id: I40d7054a719bf8a442d153beeb4c9aa38bcad373
CRs-Fixed: 2416837
2019-03-18 23:55:48 -07:00
Abhishek Singh
a0f55ea6b1 qcacld-3.0: Send HW mode change before switching channel in DBS mode
If DBS 2x2 mode is supported, to operate in 2.4Ghz the driver needs to
be in DBS mode before vdev start/restart is sent on 2.4Ghz channel.
In scenareo with gWlanMccToSccSwitchMode 4, when AP is in 5Ghz and
STA connect to any other channel in 5ghz, it force AP to switch to 2.4 Ghz
channel. Thus AP sends vdev restart without sending the HW mode change
to firmware.

Fix is to set HW mode before the AP start channel switch.

Change-Id: I2a1c176d5f3ed8cc2f62dc24c72959db1afbaae3
CRs-Fixed: 2414034
2019-03-12 08:34:52 -07:00
Srinivas Girigowda
d8697d4d00 qcacld-3.0: Replace CSR_SESSION_ID_INVALID with WLAN_UMAC_VDEV_ID_MAX
Replace CSR_SESSION_ID_INVALID with WLAN_UMAC_VDEV_ID_MAX.

Change-Id: I00e0784086805f43c7889e3708dd7026cfe52c4f
CRs-Fixed: 2412781
2019-03-11 15:53:49 -07:00
Jeff Johnson
4338caad72 qcacld-3.0: Replace typedef tSap_Event
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 tSap_Event typedef does not
meet any of those criteria, so replace it (and the "tp" variant) with
a reference to the underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names and
so-called Hungarian notation, so in conjunction rename the underlying
struct to be in compliance.

Change-Id: I523f8642ef81b3e35b2bb7a2801f3b734b2f5865
CRs-Fixed: 2412716
2019-03-09 02:28:46 -08:00
Jeff Johnson
04739e334c qcacld-3.0: Remove RSNAuthType from struct sap_config
The RSNAuthType field in struct sap_config is unused, so remove it.

Change-Id: Id60840b00ae30b243f46ba51a5840cb29a17dc1a
CRs-Fixed: 2411671
2019-03-08 10:47:56 -08:00
Abhishek Singh
8f4aa18225 qcacld-3.0: Fix vdev ref leak in P2P-GO during SSR
If P2P-GO is active and SSR happens the vdev ref coount taken
by sap_ctx is not released and this lead to ref count leak.

To fix this release vdev ref count for sap_ctx in
hdd_reset_all_adapters().

Change-Id: Id35247a917f3e0c3e163ea00a7a850cdf28ddd80
CRs-Fixed: 2410121
2019-03-06 16:56:17 -08:00
Jeff Johnson
93107ad75f qcacld-3.0: Rename HDD variable pStaCtx
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename HDD local variable pStaCtx to be
compliant.

Change-Id: Ief8942a12c802720d5eb2819e85eb895c6d8df40
CRs-Fixed: 2405752
2019-02-27 11:37:34 -08:00
Min Liu
0daa098737 qcacld-3.0: Handle OWE info update from hostapd
Handle OWE info update from hostapd in the following path:
HDD->SAP->SME->CSR

Change-Id: I7584fb5db036d1643bd7d56076d30a0c75008a98
CRs-Fixed: 2397009
2019-02-27 08:11:47 -08:00
Min Liu
e34708a91d qcacld-3.0: Send update OWE info event
When receiving assoc request from OWE STA, always send update OWE
info event which contains the following information:
- MAC address of STA
- RSN IE in assoc request
- DH IE in assoc request

Change-Id: I7017c5d2730e493db2472ae53d5dfa69553cfe45
CRs-Fixed: 2396925
2019-02-27 08:11:42 -08:00
Min Liu
ddd233069e qcacld-3.0: Save RSN auth type for RSN association
Save RSN auth type in related context for RSN assocoation.
Some OWE specific operation need to be done according to
this RSN auth type since we cannot tell if a STA / SAP is OWE,
WPA2 or OPEN by its auth type OPEN.

Change-Id: I17dd72c7adf1c663725ac58ce263f4408d9c967b
CRs-Fixed: 2396885
2019-02-25 18:43:42 -08:00
Pragaspathi Thilagaraj
2720d81efe qcacld-3.0: Send all assoc request IE to hostapd in SAP mode
Host driver packs only the RSN IE, WAP IE and additional IE
from association request to upper layers. With any new IE
support added on the driver, the driver has to add new structure
to csr_roam_info and pack that IE into the
tSap_StationAssocReassocCompleteEvent and pass it to higher
layers. This increases the redundancy with new IE introduced.

To facilitate hostapd to get information on all IE, pass all the
IE present in the assoc request to hostapd.

Change-Id: I1665a83de52bd67529ea026dc0c5e92cfbd51590
CRs-Fixed: 2390425
2019-02-20 07:42:04 -08:00
Abhishek Singh
b1954c63bc qcacld-3.0: Force P2PGO to SCC only if other beacon entity is active
In case SAP+P2PGO+STA interface are present, with SAP in down state
and STA in conencted state and P2PGO is started, it uses API
policy_mgr_concurrent_beaconing_sessions_running checks if multiple
beaconing interface are present to force the P2PGO to SCC or DBS
channel and as SAP and P2PGO interface are present it returns true.
Now the API to get concurrent channel get the channel of STA
which is active and thus P2PGO moves to STA channel.

Thus use the api to get channel for concurrent beaconing interface
instead of any interface to take care of beaconing interface
concurrency scenareos. With this concurrent channel will be non 0 only
if any other beaconing entity is present and in up state and thus
P2PGO will move to SCC or DBS only in case any other beaconing
interface is actually up and beaconing on a channel.

Change-Id: Ic4bacc8cc45386499c11e09e79d095e926318400
CRs-Fixed: 2395530
2019-02-15 18:28:24 -08:00
Jeff Johnson
6ed8018b5c qcacld-3.0: Remove eSAP_ASSOC_STA_CALLBACK_EVENT handling
Change Iea602a1da42d5eecafae1d00f2260f4930128f40 ("qcacld-3.0: Remove
eWNI_SME_GET_ASSOC_STAS_REQ handling") removed the logic that sent the
eSAP_ASSOC_STA_CALLBACK_EVENT event. Since this event is obsolete,
remove the handling code from SAP and HDD.

Change-Id: I49e169a1832845bac4e89cd832d72dec42d4ee09
CRs-Fixed: 2396058
2019-02-11 23:56:52 -08:00
Jeff Johnson
a7d5b54c7e qcacld-3.0: Replace typedef tSirSmeChanInfo
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 tSirSmeChanInfo typedef does
not meet any of those criteria, so replace it (and the "tp" variant)
with a reference to the underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names and
so-called Hungarian notation, so in conjunction rename the underlying
struct to be in compliance, as well as to be more specific on how the
struct is used.

Change-Id: Ic9a596d05a7c4c0727264c33e865edd4a9786dac
CRs-Fixed: 2394998
2019-02-09 18:02:47 -08:00
Kiran Kumar Lokere
47d0dacaf4 qcacld-3.0: Correct the key type value in set key request
Send correct key type parameter value to crypto component in
set key request.

Change-Id: I17554a72f62e356871cb0a684a066c7d794f4d02
CRs-Fixed: 2388032
2019-02-08 17:47:56 -08:00
Abhinav Kumar
338e57d779 qcacld-3.0: Avoid VDEV restart for SAP when roaming in progress
Currently, driver allows VDEV-RESTART on SAP interface in order to
channel switch or hidden ssid connection when roaming is in progress
on STA interface. This leads to two simultaneous vdev starts or
vdev-restart in FW which causes the FW to assert.

Add changes to reject the channel switch for SAP or in hidden ssid
connection if roaming is in progress on any STA interface.

Change-Id: I1cea389021049779b5aa00145e2470cd67158edd
CRs-Fixed: 2390235
2019-02-06 17:12:36 -08:00
Jeff Johnson
21aac3a788 qcacld-3.0: Rename addIeParams
Per the Linux Coding Style mixed-case names are frowned upon, so
rename addIeParams to add_ie_params everywhere it appears.

Change-Id: Id003bf004d42d5313a932309a47bf82f228eda0c
CRs-Fixed: 2393731
2019-02-06 07:27:39 -08:00
Jeff Johnson
ecd4f21b4a qcacld-3.0: Replace typedef tSirSupportedRates
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 tSirSupportedRates typedef does
not meet any of those criteria, so replace it (and the "tp" variant)
with a reference to the underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names
and so-called Hungarian notation, so in conjunction rename the
underlying struct to be in compliance.

Change-Id: I5007379a50223b6de85830e7ae389e65cdb8e4d3
CRs-Fixed: 2392398
2019-02-06 04:25:07 -08:00
Ashish Kumar Dhanotiya
c617106eea qcacld-3.0: Add support to cache peer capability info
Currently connected peer capability information is not getting
cached for SAP.

Add support to cache the capability info from assoc request

Change-Id: I0088bd20a98e2491f6ffb452417bc73f21e69e63
CRs-Fixed: 2392939
2019-02-05 06:29:30 -08:00
Bala Venkatesh
03b4f0cb34 qcacld-3.0: Delete the pe session only for STA role
While processing deuath notification in lim, PE session is deleted
without checking the session role. For AP case, if the deauth
notification is given to BSSID then also pe session will be deleted
and later clean up of the SAP will not be done properly.
Hence, for SAP case delete the pe session as part of del bss
response only.
Here the scenario is SAP's BSSID is blacklisted and acl command
is given via IOCTL. This triggered the deauth notification to lim,
and pe_session is deleted. Later, the del sta command is failed
because del bss has not happened and vdev delete also not done.

Hence delete pe session only for sta mode in lim_send_sme_deauth_ntf.
And return failure status for iwpriv softap.0 modify_acl command
if it is given for SAP's own mac address.

Change-Id: I2b394ae8676fe569537b416388a9566f2d35892a
CRs-Fixed: 2388404
2019-02-01 05:54:28 -08:00
Dustin Brown
b4260d5e38 qcacld-3.0: Simplify pre-cac flush prevention
Change I875c2f14ffd54272fc9ea0df1cecc6dd1171e310 introduced an elaborate
workaround to prevent the pre-cac work from flushing itself during stop
adapter. Introduce a less complicated work around by simply checking if
the current adapter is the pre-cac adapter before flushing the pre-cac
work.

Change-Id: Ib3e0716f8d088d124e960dcd724f579fb39a3d74
CRs-Fixed: 2387173
2019-01-28 01:57:10 -08:00
Abhishek Singh
d5cf22dffb qcacld-3.0: Change to include PDEV MLME component object
Changes to include PDEV MLME component object for VDEV SM.

Change-Id: I1f89e9bf5a4d5b17be7ec3c4fc52a5f8fe8f1862
CRs-Fixed: 2381858
2019-01-24 20:14:33 -08:00
Ashish Kumar Dhanotiya
aa9fdbb777 qcacld-3.0: Add support for new regulatory files
Regulatory component is getting updated to reduce the
code size based on different regulatory features. In this
process new regulatory files are getting added and some
of the files are getting removed.

To compile the newly added files update the required changes
in driver Kbuild file.

Some of the functins which are not supposed to be invoked from
outside the component directly, replace those function calls
with the appropriate wrapper functions.

Change-Id: I31a25268250b99f4f156c4f149966213746d999e
CRs-Fixed: 2373780
2019-01-23 15:14:09 -08:00
Wu Gao
eef680e4d0 qcacld-3.0: Exclude unused head file cfg_api.h
Since head file "cfg_api.h" is needn't, exclude it form these files.

Change-Id: Ic8f03b366eb9a20b153bbbafc778fab14340325a
CRs-Fixed: 2383295
2019-01-22 23:41:51 -08:00
Madhvapathi Sriram
3e6627a9f9 qcacld-3.0: Optimize schedule msg post error logging
Change-Id: Ieaddca5f141c99c42ed4a7c954dea2788e353640
CRs-Fixed: 2373015
2019-01-22 02:37:31 -08:00
Jeff Johnson
89748dc3d1 qcacld-3.0: Remove tSap_ManagementFrameInfo
Change Ib83700825112cc52dade594909bfa8993909ac29 ("qcacld-3.0: Send
management frame indication directly to HDD from PE") removed the
usage of tSap_ManagementFrameInfo. Since this struct is obsolete,
remove it.

Change-Id: Ic10c150286fe9f998884cdfcb8da2edadee7e156
CRs-Fixed: 2380771
2019-01-18 16:35:42 -08:00
Jeff Johnson
034649dbd7 qcacld-3.0: Remove requestedMCRate from tSap_AssocMacAddr
The requestedMCRate field in tSap_AssocMacAddr is unused,
so remove it.

Change-Id: If5ae0df5f84c99e3684df3cac75d32d63227d5ce
CRs-Fixed: 2380770
2019-01-18 16:35:38 -08:00