Commit Graph

5418 Commits

Author SHA1 Message Date
Manikandan Mohan
19f3609b21 qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:
policy_mgr_get_pcl
policy_mgr_update_with_safe_channel_list
policy_mgr_get_valid_chans_from_range
policy_mgr_get_valid_chans
policy_mgr_set_sap_mandatory_channels
policy_mgr_get_pcl_for_existing_conn
policy_mgr_get_mode_specific_conn_info

Change-Id: Ia21829345be2746cd3fc1f2337cfc90abf0c53f4
CRs-fixed: 2550092
2019-10-22 18:09:45 -07:00
Manikandan Mohan
a0bbb518fc qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:
policy_mgr_get_chan_by_session_id
policy_mgr_get_mcc_operating_channel
policy_mgr_check_and_set_hw_mode_for_channel_switch
policy_mgr_is_chan_ok_for_dnbs
policy_mgr_is_safe_channel
policy_mgr_valid_sap_conc_channel_check
policy_mgr_disallow_mcc
policy_mgr_add_sap_mandatory_chan
policy_mgr_remove_sap_mandatory_chan
policy_mgr_is_hwmode_set_for_given_chnl
policy_mgr_is_valid_for_channel_switch
policy_mgr_update_user_config_sap_chan
policy_mgr_is_sap_restart_required_after_sta_disconnect
policy_mgr_is_sta_sap_scc
policy_mgr_nan_sap_scc_on_unsafe_ch_chk

Change-Id: I682f8380d9dc41fc015d73f06b6e055d1d04ef97
CRs-fixed: 2545110
2019-10-22 18:09:31 -07:00
Manikandan Mohan
282c4b6f66 qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:

policy_mgr_allow_concurrency
policy_mgr_nan_sap_pre_enable_conc_check
policy_mgr_allow_concurrency_csa
policy_mgr_current_connections_update
policy_mgr_incr_connection_count_utfw
policy_mgr_update_connection_info_utfw
policy_mgr_get_channel_from_scan_result
policy_mgr_update_and_wait_for_connection_update
policy_mgr_get_sap_mandatory_channel
policy_mgr_checkn_update_hw_mode_single_mac_mode

Change-Id: I162c2b90a58539194907c5ecd6915eafecc635cc
CRs-fixed: 2545099
2019-10-22 18:09:25 -07:00
Manikandan Mohan
7fdb02592b qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:
policy_mgr_is_chnl_in_diff_band
policy_mgr_check_for_session_conc
policy_mgr_handle_conc_multiport
policy_mgr_change_sap_channel_with_csa
policy_mgr_get_channel
policy_mgr_get_nondfs_preferred_channel

Change-Id: I4a6673db3a02b6e8d7fa94ae452338db618e3883
CRs-fixed: 2545099
2019-10-22 18:09:18 -07:00
Yeshwanth Sriram Guntuka
4ac1584527 qcacld-3.0: Cleanup sta_index in TDLS structures and APIs
Remove sta index references in TDLS structures and APIs
and mac address would be used instead to refer the peer.

Change-Id: I861f7ce068f3f545598129b9f3955b84b2a6fbce
CRs-Fixed: 2524512
2019-10-22 09:05:33 -07:00
Yeshwanth Sriram Guntuka
3f26210aed qcacld-3.0: Do not use cdp API to get local id in wma
Remove usage of cdp APIs to fetch local id and cleanup
few sta index references in wma and lim.

Change-Id: I32633ef7491b3b91ee55dd813a009c4d8010a3f5
CRs-Fixed: 2524506
2019-10-22 09:05:17 -07:00
Sourav Mohapatra
3e1694a888 qcacld-3.0: Remove IOCTL for fetching ibss info
The IOCTL command WE_IBSS_GET_PEER_INFO used to fetch the IBSS peer info
is not used by any external entities. Also, as sta_id is being removed,
the implementation of the current ioctl is outdated.

Remove the IOCTL command all together.

Change-Id: Id4dfafb8d42f6c04af46a633df2a1d1e232da5e4
CRs-Fixed: 2532488
2019-10-22 09:05:08 -07:00
Sourav Mohapatra
a3cf12aee4 qcacld-3.0: Remove sta_id from hdd_connection_info
As a part of the sta_id clean up, remove the usage of the sta_id from
struct hdd_connection_info. Instead of the station id, use peer mac
address to interact with the protocol and DP layers.

Change-Id: I60b939c37ff49b50579791f45e3e81ed81b86967
CRs-Fixed: 2524514
2019-10-22 09:04:56 -07:00
Visweswara Tanuku
2f35318e60 qcacld-3.0: In SAP mode, use thermal cfg cmd string similar to STA
In SAP mode use thermal cfg cmd string similar to STA, as
"set_thermal_cfg"

CRs-Fixed: 2542936
Change-Id: I2449f880c7254dcd4abe79e2c896e48edbc6b107
2019-10-22 09:04:51 -07:00
Naman Padhiar
c52e7fd605 qcacld-3.0: Add PLD layer for WHUNT
WHUNT is host unit testing framework which simulates
firmware. Add a PLD wrapper layer for this virtual device.

Change-Id: I1d09b8a18a25b414b0c1d56723cc5687f2bfe297
2019-10-22 03:36:46 -07:00
guangde
7bd92e6075 qcacld-3.0: modify the assignment method of tstamp
Based on the current, Host driver assign a int value to tstamp directly.
But it is not compatible with previous kernel version.
Use function "ktime_set" to assign the value.

Change-Id: Id5fb5001e22aea8503c2dafbfef3fc8d27de1166
CRs-Fixed: 2549495
2019-10-22 01:50:39 -07:00
gaurank kathpalia
7aed85ed22 qcacld-3.0: Wait for ACS rather than iface change fail
Currently the driver checks for the ACS in progress
in change iface and returns fail if the ACS is in
progress. The return status is not checked by the
kernel and it assumes that the interface change is
successfull, which may lead to out of sync between
driver and kernel.

Fix is to wait for ACS completion if the iface change
or interface down is triggered in between ACS.

Change-Id: Iaabd42fc959a533041b18b181e1b63493f17e0a5
CRs-Fixed: 2541325
2019-10-22 01:50:27 -07:00
Manikandan Mohan
01d71c3f79 qcacld-3.0: Use regulatory module API to get valid channel list
Update policy manager to use regulatory module API to get valid
channel list instead of MLME config item.

Change-Id: I2fa24c73892746de68ece00e50fd55d6135b7753
CRs-fixed: 2545120
2019-10-19 22:11:36 -07:00
Manikandan Mohan
932c11e3b3 qcacld-3.0: Policy manager update for channel to frequency usage
Update policy manager data structures and APIs to use frequency
instead of channels. This is done to address channel number
ambiguity with introduction of 6GHZ band. Fix all references of
channel and add temporary internal functions for frequency
usage as replacement for public APIs using channels. Also modify
the channel list handling to frequency list in associated modules.

Change-Id: I11dff14a5fbe6d49cf411f8fce6863994ffccd75
CRs-fixed: 2540000
2019-10-19 22:11:30 -07:00
Tiger Yu
80fbbe1347 qcacld-3.0: Add synchronization between unloading & SSR recovering
There is no sync between driver unloading & SSR recovering.
If SSR is in progress, need to wait when driver unloading.

Change-Id: I81b935f9d8d6336b68abd6aecbdc7d28f4762be9
CRs-Fixed: 2534890
2019-10-19 19:25:31 -07:00
Kiran Kumar Lokere
fae3181e4a qcacld-3.0: Do not check for center frequency seg2 in 160MHz
Do not check for center frequency segment 2 with 160MHz bandwidth
in set channel as hostapd does not set it for 160MHz mode.

Change-Id: I43a7a30b5f6e1c5916ddc2c72e18b82fc6814b06
CRs-Fixed: 2545967
2019-10-19 17:46:13 -07:00
Sravan Goud
0158814ea9 qcacld-3.0: Initialize uninitialized variable
Current code in __hdd_bus_bw_work_handler function there is a
possibility of variables sta_tx_bytes and sap_tx_bytes uninitialized.
Improve the code by initializing the variable.

Change-Id: I6e21350267e9ff7a5b3a5cb5b3f3166d26121c8a
CRs-Fixed: 2536318
2019-10-19 17:46:07 -07:00
Sravan Kumar Kairam
3bc886df40 qcacld-3.0: Support stats quota for sta + sap ipa offload
Implement metering stats quota to support ipa offload sta plus
sap wifi sharing use cases.

Change-Id: Ic9d5ad817ffb4d671a43f3f3aebb2d8cce293873
CRs-Fixed: 2517696
2019-10-19 17:46:02 -07:00
guangde
44f9ab7ee1 qcacld-3.0: use hwtstamp to pass HW timestamp info
Based on the current codes, Host driver use "tstamp" of skb buffer
structure to store HW timestamp info. But this parameter is designed
for SW timestamp. If host driver fill the value to "tstamp", it will
affect other functions, for example, NTP, PING etc.
The host driver use "hwtstamp" of skb buffer structure to store
the HW timestamp info now.

Change-Id: I8d92e0afe212bc4a5cdad1b30cd12f36ab9a0ebc
CRs-Fixed: 2547514
2019-10-19 17:45:51 -07:00
Kai Liu
cdc307f6a4 qcacld-3.0: change peer search to mac address based in monitor mode
Commit 9e02e1e104 ("qcacmn: Cleanup dp_register_peer [PEER_ID_PHASE1]")
of qca-wifi-host-cmn changes peer search from peer id based to mac address
based, this change makes corresponding fix for monitor mode, otherwise it
will fail to get wlan interface up, since can't find peer.

Change-Id: Ife031b9e9b856850e08ef8c195e1a99c6dee80c5
2019-10-19 09:37:01 -07:00
CNSS_WLAN Service
7ff488ca01 Merge "qcacld-3.0: Process rx_mgmt_pkt based on frequency" into wlan-cld3.driver.lnx.2.0 2019-10-18 09:09:14 -07:00
CNSS_WLAN Service
9f385bab4c Merge "qcacld-3.0: Clear registered peers in SAP mode after SSR" into wlan-cld3.driver.lnx.2.0 2019-10-18 09:09:13 -07:00
CNSS_WLAN Service
350eb0af15 Merge "qcacld-3.0: Add changes to support qca6490" into wlan-cld3.driver.lnx.2.0 2019-10-18 05:15:43 -07:00
CNSS_WLAN Service
dfa45eb53d Merge "qcacld-3.0: Add proper rates for MCS9 in host table" into wlan-cld3.driver.lnx.2.0 2019-10-18 05:15:40 -07:00
Ashish Kumar Dhanotiya
ca5d922263 qcacld-3.0: Process rx_mgmt_pkt based on frequency
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 part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: Ib063070738ecdb4f83379eafe50629778a490aae
CRs-fixed: 2522693
2019-10-18 02:55:17 -07:00
Sourav Mohapatra
0203b6d254 qcacld-3.0: Clear registered peers in SAP mode after SSR
Currently, the SAP peers are not cleared after an SSR in shutdown path
inside hdd_reset_all_adapters. This can lead to mem leak in the case
the device undergoes SSR with connected SAP clients.

To prevent this memleak, rectify the existing check to include SAP
mode also while cleaning up the registered peers.

Change-Id: I8faf54d420cd9198e257a3d93bbf1b37da2f3eb8
CRs-Fixed: 2546805
2019-10-18 02:55:12 -07:00
CNSS_WLAN Service
2f91765e9f Merge "qcacld-3.0: Move stack allocations to heap" into wlan-cld3.driver.lnx.2.0 2019-10-17 20:27:02 -07:00
CNSS_WLAN Service
5691eb30a4 Merge "qcacld-3.0: fix compile error in cdp_fc_get_tx_resource API" into wlan-cld3.driver.lnx.2.0 2019-10-17 20:27:00 -07:00
CNSS_WLAN Service
bd06ef44f8 Merge "qcacld-3.0: Add ini to disable aggressive EDCA config" into wlan-cld3.driver.lnx.2.0 2019-10-17 20:26:59 -07:00
Manjunathappa Prakash
458f6fe460 qcacld-3.0: Add changes to support qca6490
Add changes to support qca6490 chip.

Change-Id: I861d88f6c9aba5285eff17c188bf335d50839d56
CRs-Fixed: 2522129
2019-10-17 15:06:24 -07:00
Sourav Mohapatra
9a6d5e5e7c qcacld-3.0: Add proper rates for MCS9 in host table
Currently the MCS9 rates are not populated correctly in the host stored
MCS tables. The current rates entered are (1560, 1733) which is incorrect.

Since MCS9 is not defined in the spec but rather an internal
implementation, rectify the rates by confirmation from firmware team.
The new rates entered are (1730, 1920)

Change-Id: Idebc3afae8b1f251ea843b6578170e74f7152629
CRs-Fixed: 2517704
2019-10-17 05:56:05 -07:00
Sourav Mohapatra
b8e24b5b44 qcacld-3.0: Move stack allocations to heap
In function hdd_association_completion_handler, there are couple of
large stack allocated arrays defined. This leads to issues of stack
overflow in cases when the stack across the call stack exceeds limit.

Dynamically allocate and deallocate the variables to ensure that they
take no space in the stack.

Change-Id: Ia077e44d7458f160581e3e75564a77d25d20311a
CRs-Fixed: 2515106
2019-10-16 12:55:37 -07:00
Vevek Venkatesan
b8e96629e3 qcacld-3.0: fix compile error in cdp_fc_get_tx_resource API
cdp_fc_get_tx_resource API is being called without passing
pdev handle, which mis-matches the prototype. Adding a fix
to include right arguments to passed, also removing static
from function ol_txrx_get_vdev_by_peer_addr to expose scope
outside the file, to fix compile errors.

Change-Id: I8089aa5df3a127b85236e69f8a84de7ebd09ec3f
CRs-Fixed: 2545857
2019-10-16 11:18:15 -07:00
Paul Zhang
d34b575fc5 qcacld-3.0: Add ini to disable aggressive EDCA config
Add action_oui ini gActionOUIDisableAggressiveEDCA to identify peers for
which aggressive EDCA configuration causes some IOT issues.

Change-Id: Ifea0c224cef2378727c9f78d8b571ea9c57bb662
CRs-Fixed: 2507191
2019-10-15 23:17:55 -07:00
Will Huang
4b097f5add qcacld-3.0: Replace channel number by channel frequency
To support 6Ghz channel, update channel number of struct
sap_StartBssCompleteEvent_s, hdd_ap_ctx and sap_ch_selected_s.

Change-Id: I19e6d7d03072135abed25e077e8573b5326ddba8
CRs-Fixed: 2519308
2019-10-16 10:07:17 +08:00
Liangwei Dong
8ffc0cc3ec qcacld-3.0: Use wlan_reg_set_channel_params_for_freq for SAP
Use wlan_reg_set_channel_params_for_freq to update SAP channel
parameters. The "freq" version API can handle 6GHz channel properly.

Change-Id: I519de47d4ec1fa1351b120f2faa9f23de1064493
CRs-Fixed: 2536568
2019-10-15 08:10:08 -07:00
Abhishek Singh
41776ce6b4 qcacld-3.0: Add vdev info in connect and disconnect info logs
Connect and disconnect info logs doesn't have vdev related info
and thus it become difficult to know for which interface the
req is received from logs in STA+STA case.

Change-Id: I8a8e83e1ee82614c06d736542e9be5f93308a6a1
CRs-Fixed: 2545444
2019-10-15 06:44:44 -07:00
hqu
37c8b81fc3 qcacld-3.0: Add 11ax mode to non legacy phymode
Driver will set 11ax mode to legacy phymode currently, so it
will report no HT capability to hostapd, it's wrong.

11ax mode can support HT capability, fix is to set 11ax phymode
to non legacy.

Change-Id: Id8dce7eba9f5d986c57242242a7376d19e98eb3f
CRs-Fixed: 2503202
2019-10-15 05:16:25 -07:00
Abhishek Ambure
6a2773e4a4 qcacld-3.0: Replace WLAN_PHY_MODE with enum wlan_phymode
enum wlan_phymode is the enum to store the phymode in host
and thus replace WLAN_PHY_MODE with enum wlan_phymode
and add the corresponding change in the code to use
enum wlan_phymode.

Change-Id: I6c7990255f193eb3afdeeb278d3cc159ef8503b1
CRs-Fixed: 2544822
2019-10-15 05:16:19 -07:00
Lin Bai
7c3d0c45db qcacld-3.0: Fix CFG_RX_MODE_DEFAULT redefined error
SDX55 defined both MDM_PLATFORM and FEATURE_WLAN_DP_RX_THREADS,
and this is causing redefined issue.

Change-Id: I1427be477dd3832b98332c9edaa4063b8c573ae4
CRs-Fixed: 2542264
2019-10-15 05:16:12 -07:00
Mohit Khanna
58a898ba9e qcacld-3.0: Use pm_qos only at high bandwidth
Currently we use PM qos apis to set masks and latency values at
PLD_BUS_WIDTH_LOW throughput level. As per experiments and power
measurements, this can also be done at the PLD_BUS_WIDTH_MEDIUM level
without any throughput impact and can help CPU enter C4 states at this
level.

Hence, donot use pm-qos APIs at less than high throughput levels.

Change-Id: I8bebb3b593b9d26aa6764b16b218814979bcd322
CRs-Fixed: 2507386
2019-10-15 02:30:09 -07:00
Arun Kumar Khandavalli
378b7ee6a4 qcacld-3.0: Remove block/unblock shutdown cb
Modem block/unblock shutdown callbacks are added to synchronize
modem shutdown when the driver is in deinit sequence.

With new changes everything is synchronized via the platform driver,
So remove the the block/unblock shutdown callback's.

Change-Id: If66eed5b51bbce64f024edf49e37a21b222a6a4c
CRs-Fixed: 2489733
2019-10-15 02:30:04 -07:00
Liangwei Dong
1f41f4f984 qcacld-3.0: Extract and add Advertisement Protocol IE
Extract and add Advertisement Protocol IE from hostapd.
MBO AP needs to report the ANQP supported in Advertisement
Protocol IE.

Change-Id: I5d7bb650de7626f568c1868775a665eff2305647
CRs-Fixed: 2530870
2019-10-15 00:49:06 -07:00
Sourav Mohapatra
c320ada27c qcacld-3.0: Move cache sta info to hash based
Currently in hdd_adapter, the variable cache_sta_info is an array of
hdd_station_info structured indexed by the sta_id. As sta_id is no
longer used, this array based implementation becomes unnecessary.

Move the sta_info implementation to a hash table implementation.

Change-Id: Iac11ecd2ae4a454649235cf8763e9a5f80e7eb38
CRs-Fixed: 2515316
2019-10-15 00:48:59 -07:00
Sourav Mohapatra
43e6dea453 qcacld-3.0: Move sta_info from array based to hash based
Currently in hdd_adapter, the variable sta_info is an array of
hdd_station_info structured indexed by the sta_id. As sta_id is no
longer used this array based implementation becomes unnecessary.

Move the sta_info implementation to a hash table implementation.

Change-Id: I7d6fe04b7e0ab22615d431de9a10a4ad38ed65ba
CRs-Fixed: 2514280
2019-10-15 00:48:54 -07:00
Bala Venkatesh
805a4a6f02 qcacld-3.0: Return success status for stop_ap
After SSR the vdev id in P2P GO adapter can become invalid.
So return success status in stop_ap to kernel for proper
cleanup.

Change-Id: I20aa0873e6aa199749c1cbabd098a581500bebce
CRs-Fixed: 2527535
2019-10-14 19:12:14 -07:00
Manikandan Mohan
8773b5ccc7 qcacld-3.0: Update HDD channel validation for frequency
Due to channel number duplication with introduction of 6Ghz band
support update hdd channel validation function to check channel
frequency instead of channel number. Also remove channel references
in start_bss path.

Change-Id: I5f37524b71a2b224ca79b0f67f871e50523e16be
CRs-fixed: 2545103
2019-10-14 17:44:49 -07:00
Rajeev Kumar
d097ea1836 qcacld-3.0: Add OS_IF DSC vdev op protection to indicate mgmt frame api
HDD indicate mgmt frame API is called from scheduler context to send mgmt
frames to user which can happen in parallel to del virtual interface which
can lead to race conditions and stale netdev pointer usage and hence add
OS_IF DSC vdev op protection to indicate mgmt frame API such that when
management frames are getting indicated to user space del virtual interface
transaction is synchronized.

Change-Id: I620225f7a0a46efa6da6d615e3014a8f4f5e43cf
CRs-Fixed: 2543244
2019-10-14 05:46:53 -07:00
Alan Chen
4bc1c117ad qcacld-3.0: Use dsc vdev start wait api for hdd open
HDD open can come in the middle of idle shutdown and if the vdev start
wait API is not in use, HDD open will fail which will result into WIFI
on failure. Hence, use dsc vdev start wait api for HDD open.

Change-Id: I398879d9669d0a9124e844fc325065299a1d7259
CRs-Fixed: 2540661
2019-10-12 20:36:19 -07:00
Alan Chen
df858ef763 qcacld-3.0: Add new runtime pm wakelock for user
Add new runtime pm wakelock for user such that runtime PM can be
disabled for certain scenarios.

Change-Id: Ibaa64f351393b63559b55827f77cdf126e7038b3
CRs-Fixed: 2534535
2019-10-12 20:35:50 -07:00