Commit Graph

2112 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
b035570f53 qcacld-3.0: Fill correct txpower information
As a part of 802.11ax amendment, 6GHz band operation is added.
Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement frequency attribute is added to the
struct sSirMacChanInfo, in driver some APIs directly copies this
structure info considering as every member of the structure as uint8_t,
as frequency is uint32_t this breaks above asumption and results into
corrupt info and gives undefined behaviour.

To address above issue, use the structure members individually and
give the information by member-by-member copy.

Change-Id: Ied6ad30d8a0800211f99371969ddd192ff40545c
CRs-Fixed: 2537975
2019-10-01 11:54:16 -07:00
bings
8551233fd6 qcacld-3.0: Send assoc ind to upper layer after assoc rsp tx complete
Do not send assoc indication to hostapd until tx is completed over the
air. This ensures on receiving assoc resp tx status, M1 is triggered
from hostapd.

Otherwise, race condition happens between assoc response and M1 packet.

Change-Id: I1da7d5b2abcc35dc39fd8e3d8b834e1481d369f3
CRs-Fixed: 2507446
2019-09-28 23:40:25 -07:00
Abhishek Ambure
e0fe68d2dd qcacld-3.0: Keep IBSS code under feature flag in SME
IBSS code is placed under QCA_IBSS_SUPPORT feature flag.

Change-Id: I501ad12155de2445824ca028295cfdec7940c6fd
CRs-Fixed: 2530205
2019-09-27 09:11:51 -07:00
Liangwei Dong
e2ac31beea qcacld-3.0: Use chan frequency for phy mode population
Use channel number will get invalid band.
Change csr_roam_get_phy_mode_band_for_bss API
and CSR_GET_BAND to use channel frequency as parameter.

Change-Id: I0c4d39f6b5689bc330e4e09302d84deaf209b9cb
CRs-Fixed: 2518428
2019-09-26 10:33:58 -07:00
gaurank kathpalia
7633dfcccb qcacld-3.0: Set chainmask for 2x2 dbs capable device
Set chainmask for 2x2 dbs capable device if enable2x2,
AS, and diversity are disabled.

Change-Id: I3ec8da95b868e79af1f44fdba63b2ee57e4365fa
CRs-Fixed: 2528035
2019-09-25 13:22:50 -07:00
Pragaspathi Thilagaraj
872bf8404f qcacld-3.0: Return correct status from csr_post_roam_state_change
Currently, sme_config_fast_roaming is called to set the
supplicant disabled roaming flag in the driver, which is
received over the vendor command
QCA_NL80211_VENDOR_SUBCMD_ROAMING. This supplicant disabled
roaming flag is used to toggle between RSO start and RSO stop.
When the driver is in disconnected state, the roaming module
would be in de-init state already. So the driver should return
success whenever a state change is received in disconnected
state. But currently the driver sends failure when its in
disconnected state. This results in sending failure status to
userspace.

Return QDF_SUCCESS status if any roam state change is requested
in disconnected state.

Change-Id: I520ab92b014eb1239e0164a39e0135e1bb4c2d70
CRs-Fixed: 2533019
2019-09-25 11:53:34 -07:00
bings
fe33a7c071 qcacld-3.0: Stop roam timer when receiving deauth roam event
Stop roam timer when receiving deauth roam event as FW suggests,
otherwise roam timer will be timeout.

Change-Id: I5dad9cea21b4b1c701904ec1efdc39b9b6a34bd8
CRs-Fixed: 2497029
2019-09-25 10:37:24 -07:00
Abhinav Kumar
523ca376a9 qcacld-3.0: Add support to dynamically enable roaming in STA+STA
Currently in STA+STA scenario roaming is enabled on the
first connected STA1 and is enabled on the other STA2 on
STA1 disconnection. This change adds support to dynamically
enable or disable roaming on any STA.

Change-Id: I34dc2730fb38193ea3dd0ec35c79df233f270913
CRs-Fixed: 2520827
2019-09-25 10:37:15 -07:00
Yeshwanth Sriram Guntuka
1669fc0508 qcacld-3.0: Add CSR APIs to maintain roam state machine
Add CSR APIs to maintain the roam state machine.

Change-Id: I68728cb657c5a492f141bea90b2da0d70cb61f08
CRs-Fixed: 2520826
2019-09-25 10:37:09 -07:00
Tushnim Bhattacharyya
ba6d1e030a qcacld-3.0: Replace channel with frequency in channel_info
Replace channel ID with frequency in struct hdd_channel_info
& oem_channel_info.

Change-Id: I1a14ab40da4824d2861a7ec862cc322a158f0cd1
CRs-Fixed: 2532299
2019-09-23 14:52:27 -07:00
Srinivas Dasari
240d327763 qcacld-3.0: Consider def roam scan periods only if not conf'd explicitly
Roam control enable sends default values for roam scan period and
full roam scan period to make sure undesirable values are not
used. But user might want to update values dynamically through
vendor cmd/DRIVER cmd before issuing roam control enable and
doesn't want to overwrite these values with default values.
So, consider default values sent only if user hasn't configured
already. This can be done by comparing configured value with
ini values.

Change-Id: I68ac6a9afbe4a45c1a1ade3286c57f36303c49e9
CRs-Fixed: 2530344
2019-09-23 09:26:00 -07:00
Srinivas Dasari
3a769ca362 qcacld-3.0: Reset inactivity params when roam control is enabled
When roam control is enabled, below inactivity params are expected
to be set 0,
1. roam_scan_inactivity_time
2. roam_inactive_data_packet_count
3. roam_scan_period_after_inactivity

Restore the same when roam scan control is disabled/CLEAR_ALL is
received.

Change-Id: Id9365895cdbccb3465b96ba6eec579da5014caa0
CRs-Fixed: 2529116
2019-09-23 09:25:53 -07:00
Srinivas Dasari
1ec7452b18 qcacld-3.0: Restore all control config params upon CLEAR_ALL
User might modify the roam control config params through
multiple commands as part of roam control config enable.
Currently, only the params which are modified as part of
SUBCMD_CONTROL_SET command are restored. Restore all of the roam
control config params from the default ini values when the
control config is disabled i.e when the CLEAR_ALL is received.

Change-Id: I59ebc2e3018b01889ffb2bcd19b72d6d20fd0517
CRs-Fixed: 2517854
2019-09-23 07:28:01 -07:00
Srinivas Dasari
a5a42fa0ce qcacld-3.0: Update scan_n_probes to neighbor roam info only
Currently, scan_n_probes is updated to global mac ctx when
it's changed through DRIVER command. But the update
should happen only to the neighbor roam info of the
corresponding vdev. Retrieval also should happen based on vdev.

Change-Id: I442eda44c6c0f6a66d86648bbe82bc0dc71422bd
CRs-Fixed: 2530341
2019-09-23 07:27:53 -07:00
Srinivas Dasari
7bedcd175d qcacld-3.0: Update home_away_time to neighbor roam info only
Currently, home scan away time is updated to global mac ctx
when it's updated through DRIVER command. But the update
should happen only to the neighbor roam info of the corresponding
vdev. Retrieval also should happen based on vdev.

Change-Id: I3e746f264c23454c1721a132d267b70157392894
CRs-Fixed: 2530338
2019-09-23 07:27:47 -07:00
Srinivas Dasari
e41d01d667 qcacld-3.0: Update scan max chan time and period to roam info only
Currently, neighbor scan max chan time and neighbor scan timer
period are updated to global mac ctx when it's updated through
DRIVER command. But the update should happen only to the neighbor
roam info of the corresponding vdev.

Change-Id: I264cf9ac7a1c7bf8c4fde25ad134993419db6052
CRs-Fixed: 2530337
2019-09-23 07:27:41 -07:00
Srinivas Dasari
456aa70f29 qcacld-3.0: Update empty scan refresh period to neighbor info only
Currently, roam empty scan refresh period is updated to global
mac ctx when it's updated through DRIVER command. But the update
should happen only to the neighbor roam info of the corresponding
vdev. Retrieval also should happen based on vdev.

Change-Id: Ic0496c326bca459c6ef6da1d84f1fd4645373cb9
CRs-Fixed: 2530335
2019-09-23 07:27:32 -07:00
Srinivas Dasari
7f48ac026d qcacld-3.0: Update roam delta to neighbor roam info only
Currently, roam delta is updated to global mac ctx when it's
updated through DRIVER command. But the update should
happen only to the neighbor roam info of the corresponding vdev.
Retrieval also should happen based on vdev.

Change-Id: I355b9db2e142d4205088627672c3fb27c32d7fbd
CRs-Fixed: 2530333
2019-09-23 07:27:24 -07:00
Srinivas Dasari
9249a98bfa qcacld-3.0: Update lookup rssi threshold to neighbor info only
Currently, neighbor lookup threshold is updated to global mac ctx
when it's updated through DRIVER command. But the update should
happen only to the neighbor roam info of the corresponding vdev.
Retrieval also should happen based on vdev.

Change-Id: If0ad4855726bdc42d82852f413f7915892d3dfd6
CRs-Fixed: 2530332
2019-09-23 01:43:53 -07:00
Abhishek Singh
efe21e6b1f qcacld-3.0: Replace find pe session by sme session id with vdev id
Replace pe_find_session_by_sme_session_id with
pe_find_session_by_vdev_id as sme_session_id is vdev id.

Change-Id: I5fa537ff8e391fc18e568fd6f750334268faafa9
CRs-Fixed: 2531681
2019-09-23 01:43:38 -07:00
Gururaj Pandurangi
9a762e6d84 qcacld-3.0: Fix to update ROAMSCANPERIOD value
Fix GETROAMSCANPERIOD function to update the ROAMSCANPERIOD
value.

Change-Id: Ieda1f71b1210bf2a64c55c9aba06f86a91bdf271
CRs-Fixed: 2526740
2019-09-19 18:55:47 -07:00
Tushnim Bhattacharyya
da631543bd qcacld-3.0: Fix next scan command logic
If a candidate is found do not mark the next scan command
as failure.

Change-Id: If47befbac946941fdc73161a6dd48d36f3ef566e
CRs-Fixed: 2530378
2019-09-19 17:28:20 -07:00
Kiran Kumar Lokere
987377e3ea qcacld-3.0: Refactor start bss request to channel frequency
Refactor the start bss request to use channel frequency instead
of channel number.

Change-Id: Ic936fe060a5b2bc8d058709950417f3939a3c3d4
CRs-Fixed: 2518026
2019-09-19 12:12:39 -07:00
Ashish Kumar Dhanotiya
1a720e76ee qcacld-3.0: Decouple get channel command from extscan
Currently get valid channel vandor command is defined
under EXTSCAN feature and also depends on gExtScanEnable
ini. when Extscan feature is disabled by ini or by feature
flag this command doesn't work.

As this command is to get the valid channel list, this
should not depend on extscan feature.

To address above issue, decouple get valid channel command
from extscan feature.

Change-Id: I6496cb94e6330f071f8027607e7d55a8f5d3db8a
CRs-Fixed: 2518313
2019-09-19 10:54:56 -07:00
Srinivas Dasari
a7bc4ff953 qcacld-3.0: Update SAE status to SME in SAP mode as well
A check has been introduced while implementing SAE roaming to send
the SAE status to SME only when the STA is not in joined state.
But this doesn't handle the SAP case where the status is expected
to be updated always.

Update the status to SME in below cases
1. SAP mode: Always
2. STA mode: When the device is not in joined state

If the device is in joined state, send the status to WMA which
is meant for roaming.

Change-Id: I20c134a3eea7c65db1fe1950c02b8b9e1ee3a34d
CRs-Fixed: 2524973
2019-09-19 03:25:39 -07:00
Kiran Kumar Lokere
229212a653 qcacld-3.0: Refactor SAP module to use channel frequency
Update SAP data structures to use channel frequency values instead
of using the channel id values to support 6GHz channels in SAP.

Change-Id: I9ef5857e8dcf3f7d879495d3f3c3ead083fe0bf0
CRs-Fixed: 2513083
2019-09-18 22:53:37 -07:00
Jianmin Zhu
e9fbc3f7b8 qcacld-3.0: Refactor channel switch
When channel switch, don't use tpSwitchChannelParams, fill
wma_vdev_start_req directly in LIM lim_send_switch_chnl_params.
Update wma_set_channel(struct wma_vdev_start_req *req)
PE/LIM call wma API directly for channel switch, don't post msg.
Clean up useless tpSwitchChannelParams.

Change-Id: I876207909ff0bc50f9ec1fbff639c0e9b7d03907
CRs-Fixed: 2529018
2019-09-18 04:18:46 -07:00
gaurank kathpalia
9d1acaff4a qcacld-3.0: Convert channel to chan freq for 6ghz support
Convert channel to chan freq for 6ghz support in
wma structures.

Change-Id: Ice52995968b06d974b115ec3eda6c7ab42657c73
CRs-Fixed: 2514449
2019-09-17 10:20:14 -07:00
Kiran Kumar Lokere
5e5c1d06ff qcacld-3.0: Fix vendor VHT IE config support in SAP
Use the correct configuration parameter to enable the
vendor VHT IE support in SAP mode.

Change-Id: I15330d372fe2b83bb229aa967bea5d43813ada95
CRs-Fixed: 2526798
2019-09-17 02:20:03 -07:00
gaurank kathpalia
12eacc2c93 qcacld-3.0: Verify the channel before adding BSSID to connect list
Currently the driver does not verify the channel of the
AP and adds that to the connect list.
If a connect comes to the driver for this BSSID, then the
driver sends the same channel to the FW to start the vdev
which results in an assert due to channel not valid.

Fix is to check the validity of the channel and send a
vdev start only with a valid channel frequency.

Change-Id: Ic5c8c446f8731b32123051126503b071428f122c
CRs-Fixed: 2515158
2019-09-16 18:32:18 -07:00
gaurank kathpalia
88f78ec8d8 qcacld-3.0: Change chan to freq in csr structures
Change chan to freq in csr structures for 6ghz

Change-Id: I6dc962175d95b202e647f55cfcb1f3d849fef6e2
CRs-Fixed: 2522212
2019-09-13 04:33:17 -07:00
Abhishek Singh
a25efe524d qcacld-3.0: Use static const initializers for IE array
The qcn and ese arrays are dynamically recreated on every call of the
functions sme_add_qcn_ie and csr_append_assoc_ies.

Change the initializers to static const to avoid dynamic recreation.

Change-Id: Ib3ae9a1b753c4dcfb6d8fd440050977253f3e720
CRs-Fixed: 2522716
2019-09-06 16:25:40 -07:00
Abhishek Singh
74d06cf802 qcacld-3.0: Fix improper QCN IE length filled
While filling the QCN IE the IE length filled is 11 while actual
length is 8 and thus this lead to improper IE length in scan
additional ie while copying the default_scan_ies.

So fix the QCN IE length and add check for improper IE length check
while copying IE in scan additional ie.

Change-Id: I372af8c206d8f7ce0e93bc9c0fb14e222c6eb87e
CRs-Fixed: 2522208
2019-09-06 07:40:13 -07:00
Tushnim Bhattacharyya
42299b8780 qcacld-3.0: Replace channel with frequency in csr_channel
Replace channel ID with frequency in struct csr_channel.

Change-Id: Id86aacfd6dc9b0c65184bf046a7ee27b9c1fb5e5
CRs-Fixed: 2519204
2019-09-04 18:53:48 -07:00
Tushnim Bhattacharyya
1b11154a62 qcacld-3.0: Replace channel with frequency in csr_channel_powerinfo
Replace channel ID with frequency in struct csr_channel_powerinfo.

Change-Id: Ibe6bb41345f01f7898e91d75f2c5730d88e33717
CRs-Fixed: 2519117
2019-09-04 18:53:43 -07:00
Tushnim Bhattacharyya
d1d0db9db2 qcacld-3.0: Replace channel with frequency in wlan_mlme_reg
Replace channel ID with frequency in struct wlan_mlme_reg.

Change-Id: I71fcec5014e451cf912f187c79a1939d2d7e54ad
CRs-Fixed: 2518897
2019-09-04 18:53:38 -07:00
Kiran Kumar Lokere
89f01f0fac qcacld-3.0: Add support for VHT MCS 10&11
Add support to advertise the VHT MCS 10&11 support using vendor
specific IE to enable the MCS 10 and 11 support in VHT mode.

Change-Id: I2d197dcce20ab4aec617ca8a7f4a54b438fae635
CRs-Fixed: 2465662
2019-09-04 16:22:53 -07:00
Tushnim Bhattacharyya
9f94d78a66 qcacld-3.0: Replace channel with frequency in csr_roamstart_bssparams
Replace channel ID with frequency in struct csr_roamstart_bssparams.

Change-Id: I826db5eea09fd7b5789c4907168d30186e5d5435
CRs-Fixed: 2518017
2019-08-31 02:13:01 -07:00
Bala Venkatesh
a5c1eb8b36 qcacld-3.0: Reduce the log level
Reduce the log level from err or info to debug so that logs
are not printed on console.

Change-Id: I0d33c2a8f5b4bb4974656ac0d1eb6713a74cb5f4
CRs-Fixed: 2516281
2019-08-28 06:29:04 -07:00
Abhinav Kumar
18285936bc qcacld-3.0: Don't Issue disconnect on roaming timer expiry
Currently Host issue a disconnect and cleanup for current AP,
even if the offloaded roaming feature has started, but has not
completed for some reason. This results in connection loss with
the current AP.

Fix is to call abort event SIR_ROAMING_ABORT in case of roaming
offload timeout in order to maintain the connection with the
current AP.

Change-Id: I4168f8aeb7a759896a5d93e1918ce6542e61b37e
CRs-Fixed: 2508449
2019-08-26 12:26:44 -07:00
Abhinav Kumar
364c0cb339 qcacld-3.0: Dont process SYNC IND if ROAM STOP cmd already posted to WMA
Currently, HOST sets discon_in_progress flag after posting
ROAM_SCAN_OFFLOAD_STOP command to WMA for a session. In case of
disconnection in HOST while roaming in FW if ROAM SYNC IND from fw comes
to host after posting ROAM_SCAN_OFFLOAD_STOP command to WMA, host start
processing SYNC IND and FW start processing ROAM_SCAN_OFFLOAD_STOP
which will cause to cleanup/disconnect with new AP to which it has just
roamed. After this cleanup fw will send HO_FAIL.

Now host as part of roam sync indication sends PEER_REORDER_QUEUE_SETUP
for the deleted peer which results in firmware assert.

Fix is to set discon_in_progress flag to true before posting
ROAM_SCAN_OFFLOAD_STOP command to WMA in order to ignore ROAM SYNC IND
and return status as failure to fw.

Change-Id: Id5c787d5489a6c0722b090951db388484f94f2e9
CRs-Fixed: 2505851
2019-08-26 06:35:42 -07:00
Abhishek Singh
5606ee0fca qcacld-3.0: Use vdev cmd resp timer from vdev target if
As part of vdev target if convergence the new vdev command
resp time are defined in target if layer.

So use the vdev timer values from target if.

Change-Id: Ib74f91331e4cb470233e678ded9159e17045467e
CRs-fixed: 2513794
2019-08-23 12:31:17 -07:00
bings
3d18e556d0 qcacld-3.0: Select dfs channel sap to handle radar event
If radar event is indicated in station vdev, it may be dropped by
station vdev since station does not support DFS master.

Select first sap vdev started in dfs channel to handle radar event.

Change-Id: I74229eb02c6ae6d81042df6b736d231db26253b5
CRs-Fixed: 2512836
2019-08-23 03:48:13 -07:00
Srinivas Dasari
a33fdd8376 qcacld-3.0: Send full roam scan period to userspace upon querying
Userspace may query for current configured full roam scan period
through the vendor cmd QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_GET
and the attribute QCA_ATTR_ROAM_CONTROL_FULL_SCAN_PERIOD.
Fill the full scan period in the same attribute and send as reply

Change-Id: I0ab8b3d7b469515244ce27accc852c6d93514b2d
CRs-Fixed: 2508804
2019-08-23 01:43:00 -07:00
Srinivas Dasari
9ad9e25ed6 qcacld-3.0: Send roam control status to userspace upon querying
Userspace may configure and enable roam control and query for
the status. Add provision to send the same as vendor cmd reply

Change-Id: I7b82f85fa560c974eedc5115276bd87a84f9d3a0
CRs-Fixed: 2508802
2019-08-23 01:42:55 -07:00
Srinivas Dasari
b6798ec303 qcacld-3.0: Restore the params upon roam control config disable
Userspace disables the roam control config once it's done with
the controlled roaming. Driver should restore the params changed
by roam control config enable and proceed with roaming as per
its default behavior.
Restore the below params which are getting modified as per
the current implementation,
1. Roam trigger bitmap
2. Scoring
3. Scan period
4. Full scan period

Change-Id: I1be699825bdd798f20a3432ebccb922ade67f89b
CRs-Fixed: 2508780
2019-08-22 12:34:47 -07:00
Srinivas Dasari
5fb8190eca qcacld-3.0: Enable/disable scoring based on vendor command
Userspace can disable/enable scoring for roam candidate
selection through roam subcmd and the attribute
QCA_ATTR_ROAM_CAND_SEL_CRITERIA_SCORE_ENABLE.

Firmware supports the below configurations currently,
1. Default selection criteria where all selection criteria
   are enabled and different weightages/scores are given to
   different criteria.
   This will be enabled when userspace doesn't specify any
   candidate selection criteria.
2. Legacy candidate selection criteria where scoring
   algorithm is disabled and only RSSI is considered for
   roam candidate selection.
   this will be enabled when userspace specify 100% weightage
   for RSSI.
Rest of the combinations are not supported for now.

Update the RSO config whenever scoring is enabled/disabled

Change-Id: Ibb787ef5433eebbdd3633748135ba6e314c931b6
CRs-Fixed: 2508778
2019-08-22 12:34:42 -07:00
Srinivas Dasari
391692d2da qcacld-3.0: Cache the status of roam control enable/disable in CSR
Userspace enables the roam control config and may query for it
later. In order to indicate the current status to userspace,
cache the same in struct sCsrNeighborRoamControlInfo

Change-Id: Ib535d6940df48305bda74a624604217d1f968861
CRs-Fixed: 2508777
2019-08-22 12:34:38 -07:00
Srinivas Dasari
f4e1b1208c qcacld-3.0: Send roam triggers from vendor cmd to firmware
Userspace can configure different roam triggers as defined
in qca_vendor_roam_triggers through the roam subcmd
QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_SET and the
attribute QCA_ATTR_ROAM_CONTROL_TRIGGERS. Send the roam trigger
bitmap to firmware

Change-Id: I692110a2ae1ee5a35bb248b9138080a7dfb02cf6
CRs-Fixed: 2508776
2019-08-22 12:34:34 -07:00
Srinivas Dasari
0628e84a29 qcacld-3.0: Configure full scan period from vendor cmd to firmware
Userspace can update the full scan period through the roam subcmd
QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_SET and the attribute
QCA_ATTR_ROAM_CONTROL_FULL_SCAN_PERIOD. Send the same to firmware
as part of roam scan offload command

Change-Id: I7c1046763d693faa3340b655848d3306ef92e06c
CRs-Fixed: 2508775
2019-08-22 12:34:29 -07:00