Commit Graph

1904 Commits

Author SHA1 Message Date
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
Pragaspathi Thilagaraj
ea180474cd qcacld-3.0: Update group management cipher suite in RSO command
The host driver updates the group management cipher suite to the
firmware as part of RSO commands over the WMI_AP_PROFILE
command. The group management cipher suite is updated from the
group cipher suite which is not correct. As part of join success
update the group management cipher suite from roam_profile
in the roam serialization command in
csr_roam_save_connected_information().

Update the group management cipher suite from the roam profile
to the roam_request and copy it to the WMI_AP_PROFILE command
params in wma.

Change-Id: Ic8dca6938c487396e0202202efbb44ff214ecdcc
CRs-Fixed: 2542225
2019-10-14 15:56:07 -07:00
Abhishek Singh
7b2fb960c3 qcacld-3.0: Fix enum wlan_phymode to include proper phymode value
Few phymode are missing from enum wlan_phymode and many are not
valid phymode, e.g for 5ghz 40minus and 40plus are not valid.

So add the missing enums and remove invalid enums from enum
wlan_phymode.

Change-Id: I56710c6a04ac365a54e2c4ba138e0e887fbdd960
CRs-Fixed: 2531859
2019-10-12 13:10:12 -07:00
Abhishek Singh
bf8f96fe77 qcacld-3.0: Fix STA connect for service_peer_assoc_conf not enabled
In case wmi_service_peer_assoc_conf is not enabled the add bss resp
return failure and thus the STA connection fails.

To fix this send proper status to add bss resp in case
wmi_service_peer_assoc_conf is not enabled.

Change-Id: I0aa1de8cfb739e31fc89265766f67fea070d3b17
CRs-Fixed: 2538753
2019-10-09 22:02:05 -07:00
Kiran Kumar Lokere
54819a39d8 qcacld-3.0: Re-enable TWT before host TWT trigger mode
Disable the current TWT session and re-enable the TWT if the
current session in FW trigger mode before changing the TWT mode
to host trigger mode.

Change-Id: I7de2126605685c85a240d38356d439cb4be8cce1
CRs-Fixed: 2539353
2019-10-09 16:16:43 -07:00
Amar Singhal
361023bf58 qcacld-3.0: Add check for PSC channels
6GHz channels that are PSC(preferred scanning channels) need to be
marked. Same information needs to be conveyed to firmware as well.

Change-Id: Ib4a59ae7859896704a06f6622f8f742e060b6ca1
CRs-Fixed: 2526783
2019-10-09 01:52:14 -07:00
Amruta Kulkarni
accea6e32b qcacld-3.0: Fix possible NULL dereference
Potential NULL pointer dereference in below function:
 wma_get_rx_chainmask()

Add wmi_handle NULL check in the above function.

Change-Id: I34965388a4782236c3bc5158098b5b066833c066
CRs-Fixed: 2536323
2019-10-04 17:05:26 -07:00
Kiran Kumar Lokere
c220a51edb qcacld-3.0: Add VHT extended Nss BW support for 160MHz
Add VHT extended Nss BW support for 160MHz connection.

Change-Id: I8e2833a48ca5de0301634a88eb1a66002b4c9c20
CRs-Fixed: 2531279
2019-10-02 02:48:04 -07:00
Abhishek Ambure
c00691687c qcacld-3.0: Fix dp handle mem leak during SSR
In SSR case the mlme_vdev_obj_destroy_handler for the vdev may
get called after the dp soc is uninitialized and thus the
cdp_vdev_detach will not get called to free dp vdev.

Thus free dp vdev before sending the vdev delete and
for force cleanup due to ssr try to free it before detaching
dp soc.

Change-Id: I6f1f95a4f8bbc4cb316e8fd59f6411a6c0c2c099
CRs-Fixed: 2538481
2019-10-01 10:01:27 -07:00
Abhishek Ambure
24cff9e863 qcacld-3.0: Add VDEV null check before calling wlan_vdev_get_dp_handle
On passing vdev as argument to "wlan_vdev_get_dp_handle", it returns
"dp_handle". "wlan_vdev_get_dp_handle" has BUG_ON check for NULL vdev,
so VDEV NULL check is added before calling "wlan_vdev_get_dp_handle".

Change-Id: I68ffab078fb35d47e1e771215de610290455b7d7
CRs-Fixed: 2538435
2019-10-01 08:01:26 -07:00
Abhishek Ambure
e9af5b563a qcacld-3.0: Flush target_if vdev timers while shutdown
While wlan driver is shutting down and target_if response timer for
vdev is running then, target_if response timers for vdev are flushed.

Change-Id: Idecd5a54c5d824e3dafa992529ca54564bb73c93
CRs-Fixed: 2529278
2019-09-27 05:20:11 -07:00
Abhishek Ambure
0b2ea32256 qcacld-3.0: Cleanup handle & rate_flags from struct wma_txrx_node
As a part of vdev convergence, struct wma_tx_rx_node's handle &
rate_flags members are no more unused. These values are derived
from mlme_obj.

So no more used members of struct wma_txrx_node are cleaned.

Change-Id: I0b536c50717edc293ab27e5d520eb490266ba2ce
CRs-Fixed: 2534222
2019-09-27 05:20:02 -07:00
Abhishek Singh
89c367457b qcacld-3.0: Fix peer phymode for STA while updating opmode
In STA use iface->chanmode which is updated during vdev restart to
set the bss peer channel width.

Also remove the API to set phymode during this as the phymode is
already set during vdev start or restart, so no need to set the
phymode again.

So just check if the new BW is valid for the current phymode
and if so set the BW for the peer.

Change-Id: Ic258703acbab0a97629ff4e1945f6729b3fe517f
CRs-Fixed: 2535576
2019-09-27 02:46:35 -07:00
Abhishek Singh
52dc8abc44 qcacld-3.0: Cleanup unused params from struct bss_params part 2
Cleanup unused params from struct bss_params after moving to
vdev target if for add bss request.

Change-Id: Ib3cf3726b4b4c692a0323669770632f2031d4e9a
CRs-Fixed: 2535156
2019-09-27 02:46:30 -07:00
Jianmin Zhu
21f1628c26 qcacld-3.0: Fix WEP share mode LFR3 roaming failed
If AP auth type is WEP eCSR_AUTH_TYPE_SHARED_KEY, auth mode
set to firmware becomes 0:WMI_AUTH_NONE, while firmware expect
2:WMI_AUTH_SHARED, so can't roam to AP of WEP auth mode
eCSR_AUTH_TYPE_SHARED_KEY by LFR3 offload roaming.

Change-Id: Ib674d36fd27d759a6fca443a13d0cf7fec108837
CRs-Fixed: 2534703
2019-09-26 22:05:07 -07:00
Abhishek Singh
cf340dd8e7 qcacld-3.0: Move common code for set channel and add bss to new api
Some of the code in set channel and add bss API is duplicate so move
it to a API which can be called from both place.

Change-Id: I73f1f7b06034cff88589f6818a94a202604287e1
CRs-Fixed: 2535158
2019-09-26 09:07:43 -07:00
Jianmin Zhu
9c35741281 qcacld-3.0: Refactor LFR2 and OCB vdev start
Refactor LFR2 and OCB vdev start, fill vdev mlme directly,
don't use wma_vdev_start_req.

Clean up wma_vdev_start_req
Clean up wma_vdev_start

Change-Id: Ic647271dee8c69f8cb9500fa3b5388ce7ef39ace
CRs-Fixed: 2534828
2019-09-26 21:32:45 +05:30
Abhishek Ambure
27f9830104 qcacld-3.0: Add dummy function for wma_set_ibss_pwrsave_params
In the legacy code, "wma_set_ibss_pwrsave_params" was called from
code protected under "QCA_IBSS_SUPPORT". Refactor ap vdev start
change call this function, hence dummy definition for
"wma_set_ibss_pwrsave_params" is added.

Inline dummy function "wma_set_ibss_pwrsave_params" is added to
overcome compilation errors if QCA_IBSS_SUPPORT is disabled.

Change-Id: Idff86469480d607c9ce1cc4f65fcd65b01a83308
CRs-Fixed: 2535135
2019-09-25 23:57:35 -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
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
Jianmin Zhu
58e929c24c qcacld-3.0: Refactor ap vdev start
1. When AP/IBSS/NAN vdev start, fill parameters into
vdev mlme directly.
2. LIM call wma API directly instead of post msg.
3. Add pre/post vdev start handlers
4. Remove following functions:
	wma_add_bss
	wma_add_bss_ap_mode
	wma_add_bss_ibss_mode
	wma_add_bss_ndi_mode
	mlm_add_sta
5. Add lim_set_ch_phy_mode to set phy mode for all vdev start
cases.

Change-Id: I0dc32e399dc9b49c9bbca16fbc4bd0f44eab284d
CRs-Fixed: 2533714
2019-09-25 01:08:40 -07:00
Abhishek Ambure
3ee80888e3 qcacld-3.0: Clean up struct wma_txrx_node unused members
As a part of vdev convergence, struct wma_tx_rx_node's bssid & addr
members are no more unused. These values are derived from mlme_obj.

So no more used members of struct wma_txrx_node are cleaned.

Change-Id: I2462a25f91b66b9efac42935a599f1362cb268f1
CRs-Fixed: 2532061
2019-09-24 13:59:50 -07:00
Abhishek Ambure
23beaf5925 qcacld-3.0: Keep wma_set_ibsskey_helper under CRYPTO_SET_KEY_CONVERGED
Fix compilation error caused if "CRYPTO_SET_KEY_CONVERGED" is enabled.

Keeping WMA IBSS code under "QCA_IBSS_SUPPORT" change i.e. 2861885
pulled "wma_set_ibsskey_helper" function outof macro protected code
"#ifndef CRYPTO_SET_KEY_CONVERGED", that caused compilation error
on enabling "CRYPTO_SET_KEY_CONVERGED".

Change-Id: I87650d094f5f39ffff94e1cce58cbb20e0aa0520
CRs-Fixed: 2533784
2019-09-24 13:59:43 -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
Abhishek Singh
78b974008a qcacld-3.0: Remove unused bssId from struct sDphHashNode
The bssId in struct sDphHashNode represent vdev_id and same can
be used from pe session which already has this info so remove
bssId param.

Change-Id: I47a7f27e95bfaa9ecd617cb531895601a27dfbf5
CRs-Fixed: 2530965
2019-09-19 14:52:52 -07:00
Abhishek Singh
6243a002ea qcacld-3.0: Cleanup unused params from tpAddStaParams
Many legacy params of tpAddStaParams are unused, thus
cleanup the unused params from tpAddStaParams.

Change-Id: I1be957d2f34d2202bcc1d44e69ad5cba0812c60b
CRs-Fixed: 2530961
2019-09-19 13:36:43 -07:00
Jianmin Zhu
054c27318a qcacld-3.0: Remove wma_vdev_start_req from channel switch
1. Remove wma_vdev_start_req from channel switch, fill vdev mlme
directly.
2. Add channel switch pre/post handler.

lim_send_switch_chnl_params:
   1. Fill vdev mlme
   2. wma_pre_chan_switch_setup->wma_vdev_pre_start
   3. vdev_mgr_start_send
   4. wma_post_chan_switch_setup

Change-Id: I88301a39ba45b6092c4483554e1e738fac92cc94
CRs-Fixed: 2530906
2019-09-19 09:21:20 -07:00
Abhishek Singh
7944c9aef9 qcacld-3.0: Remove unused params from struct bss_params
struct bss_params has many legacy params which are not used. So
remove the unused params from struct bss_params.

Change-Id: I7d930e83ff0ce56bf8fb07789f9fca9f94fb6f74
CRs-Fixed: 2530215
2019-09-18 22:53:58 -07:00
Abhishek Singh
6e5c7a6f42 qcacld-3.0: Use add_bss_resp structure while handling add bss resp
The add_bss_req struct is used while handling add bss resp,
and is stored in vdev priv mlme.

The resp path require the info which can be filled from vdev resp
and thus no need to store the add_bss_req. From response fill and
use the add_bss_resp in add bss response handling path

Change-Id: I7ec1189c7d399e181f451a442a2578964eb4e47d
CRs-Fixed: 2529289
2019-09-18 22:53:52 -07:00
Ashish Kumar Dhanotiya
285213c6cb qcacld-3.0: Convert channel to frequency in rx mgmt handler
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, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I757f60cef414d206b275b4fbd192d5d22bbc93d7
CRs-Fixed: 2517901
2019-09-18 11:22:51 -07:00
wadesong
d3f8d3a927 qcacld-3.0: Fix a peer phy mode update discrepancy
In function wma_process_update_opmode, interface phy mode
is used to update peer phy mode to FW, which will cause
a mis-behavior in FW during channel switch.

Use peer phy mode, instead of interface phy mode when
driver is sending WMI_PEER_PHYMODE cmd to FW.

Also to make peer phy mode population to FW possible,
add the following APIs to do host to FW phy mode
conversion:

	wma_host_to_fw_phymode_160
	wma_host_to_fw_phymode_11ax
	wma_host_to_fw_phymode

Fix some kernel-doc discrepancies for the following
existing functions:

	wma_fw_to_host_phymode
	wma_fw_to_host_phymode_160
	wma_fw_to_host_phymode_11ax

Change-Id: I6184a1735d37f648763b149795ac7930bce45346
CRs-Fixed: 2497684
2019-09-18 11:22:44 -07:00
Abhishek Singh
ac3df1e582 qcacld-3.0: Add flush callback for wma_cleanup_vdev_resp_and_hold_req
When wma_shutdown_notifier_cb post wma_cleanup_vdev_resp_and_hold_req
the msg.bodyptr is wma. Now during flush the drive will try to free
the msg.bodyptr and may lead to assert.

Fix this by adding dummy flush callback so that driver will not try
to free msg.bodyptr for this msg.

Change-Id: I0734a2ee80dff1d9d4437a009c4c0061485b4de5
CRs-Fixed: 2529950
2019-09-18 11:22: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
Abhishek Ambure
8ed62cb4f0 qcacld-3.0: Keep IBSS code under feature flag in WMA
IBSS code is placed under QCA_IBSS_SUPPORT feature flag.

Change-Id: I08248985dc1a61ce8dce4eea9a6a6b8c01a93ec1
CRs-Fixed: 2525652
2019-09-17 23:40:47 -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
wadesong
70ebc4e9ff qcacld-3.0: Add db2dbm conversion check
When WMI_IFACE_LINK_STATS_EVENTID is received, WMA layer should
check FW service bit to confirm if HW db2dbm conversion is
enabled or not, or the final results indicated to HDD layer
will be inaccurate.

Add FW service bit checking to make sure db2dbm conversion is
done by driver when HW doesn't support it.

Change-Id: Id369999e4d5a6805200de82d1e8caf3121582c40
CRs-Fixed: 2506620
2019-09-16 06:38:34 -07:00
Wu Gao
aa3ab36be6 qcacld-3.0: Set rx chainmask before start spectral scan
It need rx chainmask to select noise floor when start spectral gen3
scan and rx data by DMA. So set rx chainmask before start spectral
scan.

Change-Id: I63efd8f5384537b5697ba809bb05fdd17e243210
CRs-Fixed: 2519366
2019-09-14 21:25:56 -07:00
Jianmin Zhu
e224e5f3bd qcacld-3.0: Populate vdev mlme with vdev start req
Populate vdev mlme obj and dest chain with vdev start req for
vdev_mgr_start_send.
Remove vdev_start_params from wma_vdev_start.
Remove vdev_mgr_start_param_populate.

Change-Id: I8606441341344fbcd181facf4000942ff94ac00d
CRs-Fixed: 2516590
2019-09-13 20:21:38 -07:00
Abhishek Singh
7a4d17a2de qcacld-3.0: Fix Vdev start failure handling in SAP and STA
Vdev start failure handling in SAP and STA and not handled
properly and thus VDEV SM doesn't move to INIT state and
lead to asserts.

Change-Id: I5ea09f9c6e84a2e1c7f9254319aaa1a11e2f97e8
CRs-Fixed: 2526179
2019-09-12 20:23:57 -07:00
Jianmin Zhu
9ab41552f9 qcacld-3.0: Fix host/target hirssi_upper_bound mismatch
On HST,  service bit wmi_service_hw_db2dbm_support is set, need
send target hirssi_upper_bound as RSSI format instead of SNR.

Change-Id: Ie9029e9c26f84456722ca2864a28c7ba3a2be52d
CRs-Fixed: 2485833
2019-09-12 19:12:52 -07:00
Jianmin Zhu
9772c4a321 qcacld-3.0: Refactor sta add bss in wma and lim
Devide wma_add_bss_sta_mode into 4 functions for 4 cases:
1. wma_pre_assoc_req, called before sta assoc, config vdev
params.
2. wma_send_peer_assoc_req, called after sta associated, send
peer assoc cmd to F/W.
3. LFR3 add bss
4. LFR2 add bss and vdev start

Lim will call these functions directly instead of post msg to
wma.

Replace lim_set_link_state with wma_add_bss_peer_sta to create
peer for LFR2 roaming.

Clean up all link state usless code now.

Change-Id: I6ad19bb92e7b0334704ac9c930277e9c35abbee2
CRs-Fixed: 2510119
2019-09-10 01:02:43 -07:00
Jianmin Zhu
dd405695cd qcacld-3.0: Switch to target if vdev up
Switch legacy vdev up to vdev mgr/target if vdev up

Remove wakelock since it is handled in target if.
Clean up legacy vdev up API.

Change-Id: I125b202e9a18ee3bf279fe4df7bc17b9ec7bf999
CRs-Fixed: 2516586
2019-09-09 05:35:11 -07:00
Abhishek Singh
989f8b8709 qcacld-3.0: Remove unused members of struct wma_txrx_node
Some struct wma_txrx_node members are not used so remove them.

Change-Id: I900a0898e448dfc363aad1d157de74557bb982f6
CRs-Fixed: 2523105
2019-09-08 02:24:09 -07:00
Abhishek Singh
850476c541 qcacld-3.0: Cleanup unused vdev request hold framework
With vdev operations moved to target if from the wma, the vdev
request hold framework is not used.

Thus remove the unused functions and structures

Change-Id: I6e609735ad0bdc8b929cfffa6f13915f0ad6823d
CRs-Fixed: 2523104
2019-09-07 17:56:13 +05:30
Srinivas Dasari
cc863f0b26 qcacld-3.0: Consider PMF capa of peer also for rmf frame processing
Cache the PMF capability of peer in peer_mlme_priv_obj while
adding bss for both station and AP modes. Process the mgmt frames
received from the peer as rmf frames only if the peer is of PMF
capable.
Move mlme_peer_object creation and deletion out of the define
CRYPTO_SET_KEY_CONVERGED to make it generic.
Remove the check where WEP bit is validated and modified based on
PMF capability of the peer. This is already taken care while
setting WEP bit in lim.

Change-Id: I0c93bb25db6a866e4c1793c9ba4c60773c0f019d
CRs-Fixed: 2520249
2019-09-06 20:26:35 -07:00
Abhishek Singh
356781e02f qcacld-3.0: Use Vdev mlme target if for hidden ssid restart
Use Vdev mlme target if for hidden ssid restart.

Change-Id: I915f7911a1f3e01fd6579ed3e33d65bfe8a6c413
CRs-Fixed: 2522556
2019-09-06 13:42:52 -07:00
Jianmin Zhu
b4203ad3dc qcacld-3.0: Switch to target if vdev start req
Populate vdev mlme in wma vdev start.
Call vdev mgr/target if vdev start API in wma vdev start.

Change-Id: Icbf82c8af320d0b2a19a72db94ad6abfa373b7e6
CRs-Fixed: 2516589
2019-09-06 12:26:09 -07:00
Jianmin Zhu
48ccbd05d0 qcacld-3.0: Don't fill vdev start req in wma rsp queue
Vdev start req timeout is moved to target if.
Req msg type can be got from vdev mlme instead of wma rsp queue
in vdev start rsp handler.

Set bss params into vdev mlme priv when start vdev with add bss.
then can get bss params from vdev mlme priv when handle start
vdev add bss rsp.

Free hidden ssid vdev req after vdev restart return, don't need
it when handle rsp.

Change-Id: I956fc5a9164d5961513dfa922aee27af28483807
CRs-Fixed: 2516587
2019-09-06 12:26:05 -07:00
Jianmin Zhu
7658df6386 qcacld-3.0: Refactor vdev resp handler
Add target_if vdev start resp handler: target_if->vdev_mgr->
	mlme legacy(wma->lim).

Replace channel switch parameter by vdev resp event

Wma call lim API directly, don't post message

Get add bss from vdev mlme obj priv data.

Change-Id: Iba8f70e22639e0ec9ec3db04e08b24655b2f0057
CRs-Fixed: 2516585
2019-09-06 12:26:00 -07:00
Abhishek Ambure
968f1515a5 qcacld-3.0: Clean up struct del_bss_params
As a part of vdev convergence, legacy vdev code for vdev delete/stop/
down is removed. WMA timer for vdev manager operations are deleted,
now target_if takes care of it.

Structure del_bss_params is no more used to store bss delete request
params, hence struct del_bss_params is cleaned up from legacy code.

Change-Id: I487d2683908b705176ff8064dd3ce7cd49a3ce47
CRs-Fixed: 2517880
2019-09-06 00:46:06 -07:00