Commit Graph

2132 Commits

Author SHA1 Message Date
Abhishek Singh
623603404e qcacld-3.0: Avoid using struct csr_roam_session in lim
struct csr_roam_session is used in LIM in func
lim_get_session_by_macaddr to get if SA is same as one of the vdev.

struct csr_roam_session should not be used by LIM, so raise change
to used vdev obj manager to find a vdev with same MAC address.

Change-Id: I13bf65a65023a2a8dc82013e2668a075883c111a
CRs-Fixed: 2544552
2019-10-14 05:47:10 -07:00
Yu Wang
36d5210686 qcacld-3.0: set BA buffer size according to he cap of sta
In SAP mode, if he is enabled, the BA buffer size will be
set to 256 in addba response, some STAs can not handle it
properly, which may result in data transmition failure on
these STAs. Then they can not send out DHCP request and so
failed to obtain IP address.
To fix this issue, check the he capability of both STA and
the session, set the buffer size to 256 only when both are
he capable.

Change-Id: If55619d598bb9603cf7ce3bc116d80cf718676d6
CRs-Fixed: 2515183
2019-10-11 04:30:51 -07:00
Jianmin Zhu
90469212be qcacld-3.0: Use generic freq to chan API
In lim_set_ch_phy_mode, use generic freq to chan API.

Change-Id: I7b35bc2ac31aaf02f8fea94b99312b93e8af13d7
CRs-Fixed: 2542975
2019-10-11 02:58:34 -07:00
Abhishek Ambure
dddf428b7a qcacld-3.0: Keep IBSS code under feature flag in LIM
IBSS code is placed under QCA_IBSS_SUPPORT feature flag.

Change-Id: Ib19f955daea1ccfee860fcbd36a0cfb8392906aa
CRs-Fixed: 2537006
2019-10-03 08:36:45 -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
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
Pragaspathi Thilagaraj
3548a66560 qcacld-3.0: Fix integer overflow in rrm_fill_beacon_ies()
In rrm_fill_beacon_ies(), the len is the total length of
IE + 2 bytes for element ID (1 byte) and length of the
IE(1 byte). Length is defined of type uint8_t and can have
only values upto 255. When the IE content length is 254,
adding 2 bytes to this will cause the len to overflow
resulting in continuous loop in rrm_fill_beacon_ies.

Change the len type to uint16_t to avoid integer overflow.

Change-Id: Id6a6bcce150f778e24316ccc5fb51c6e2a95fc5e
CRs-Fixed: 2537774
2019-10-01 11:54:10 -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
Srinivas Dasari
fffa0b4131 qcacld-3.0: Free the cached assoc request if a new assoc req rcvd
Driver caches the assoc request received from an SAE STA if it's
received before getting external auth(SAE) status from hostapd.
Station might retry the assoc frame(ex: if it doesn't get assoc
response within a specific interval) and the cached assoc request
is overwritten with new assoc request, but the cached assoc
request is not freed. Free the same to avoid memleaks.

Change-Id: I576f3b8b05d17afc66481419d1b5bdc0765c84aa
CRs-Fixed: 2535425
2019-09-27 17:12:15 -07:00
Pragaspathi Thilagaraj
9f23038aaa qcacld-3.0: Rename limTimers
Linux coding style doesn't allow camel case notations. So
rename limTimers to be in compliance.

Change-Id: I83807e8e5318cfad300365780f8cf9dc29037312
CRs-Fixed: 2482564
2019-09-27 14:56:39 -07:00
Abhishek Singh
69c773d121 qcacld-3.0: Update channel width after sanity check
After sanity check in lim_set_ch_phy_mode the channel width is
updated but is not copied to des_chan.

So copy the new channel width to des_chan.

Change-Id: Iffdcabaa3bfe25083e9c4368621f8df71c152806
CRs-Fixed: 2536201
2019-09-27 06:40:57 -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
Liangwei Dong
a96e0027c1 qcacld-3.0: Populate channel flags for vdev_mlme.des_chan
When vdev_mgr_start_send is introduced, the Dfs->dfs_curchan
will be filled from mlme "des_chan" by tgt_dfs_set_current_channel.
Set correct channel flags to des_chan so that dfs radar functions
can get correct channel information.

Change-Id: I643acadb97c3924261b45f598a50fa82d9a224e6
CRs-Fixed: 2529996
2019-09-26 14:53:32 -07:00
Pragaspathi Thilagaraj
b3d5253c22 qcacld-3.0: Replace typedef tLimMlmStaContext
Linux coding style doesn't allow camel case notations. So
replace tLimMlmStaContext with the original structure.

Change-Id: Iea2968d9cf993c405390f0ff9712755137cebc07
CRs-Fixed: 2482105
2019-09-26 14:53:13 -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
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
Pragaspathi Thilagaraj
683c1cfe6c qcacld-3.0: Fix invalid vdev_id value while sending link report frame
In lim_send_link_report_action_frame(), the link report action
frame is filled in response to the link measurement request from
the AP. wma_tx_frame() is called to send the frame to the firmware.
But the vdev_id is initialized to 0 in
lim_send_link_report_action_frame(), but is not updated from
pe_session before passing it in wma_tx_frame. SO when STA comes
up on vdev 1, the vdev value is still sent as 0. This results in
the action frame dropped in firmware.

Fill the vdev_id from pe_session before sending it to firmware.

Change-Id: I5ee830fc6ca542c29f555bce63a77c3309777d3b
CRs-Fixed: 2530258
2019-09-25 04:58:45 -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
Srinivas Dasari
603d497636 qcacld-3.0: Include MBO IE in assoc req only if peer supports PMF
Currently, MBO IE is included in assoc request if the peer
advertizes MBO IE and DUT is of MBO capability. But PMF (11w) is
a mandatory requirement for MBO. So include the MBO IE in assoc
request only if peer supports MBO along with PMF.

Change-Id: Ic0b542acdd8fc5011e7a2a4555973129c474100f
CRs-Fixed: 2528148
2019-09-24 16:50:13 -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
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
Pragaspathi Thilagaraj
7e30ce86c4 qcacld-3.0: Update vdev mlme object nss after pe_session nss update
The nss value in the "iw <dev_name> link" command and
"iw <dev_name> dump station" is updated from the vdev mlme
object vdev_mlme->proto.generic.nss. This nss value is
updated only from lim_process_assoc_rsp_frame() and
lim_extract_ap_capability() only is the ap nss is less than
the session_nss. In roaming case the session_nss is updated
with the AP nss in lim_populate_peer_rate_set() so in assoc
response path the the global mlme vdev nss is not updated.

Update the vdev mlme object nss in lim_process_assoc_rsp_frame()
from the pe_session.

Change-Id: I2575a591f73ee172a83d4681e5f3134d5c9c60b0
CRs-Fixed: 2525710
2019-09-20 02:48:53 -07:00
Abhishek Singh
c70afa3f53 qcacld-3.0: Remove duplicate bss_idx from struct pe_session
The bss_idx represent vdev id in pe session. pe session already
have smeSessionId/vdev_id to represent this.

Thus remove duplicate bss_idx from struct pe_session.

Change-Id: I18c59d49233dd547f38d7f8a23be5ebbe7d72c30
CRs-Fixed: 2531014
2019-09-19 16:07:14 -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
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
Kiran Kumar Lokere
b2ea027c0e qcacld-3.0: Add 6GHz support in SAP mode
Add support to populate 6GHz IE in SAP mode.

Change-Id: Ib9ec2e571bc8c6bb7e591fca191eda208efdcdbd
CRs-Fixed: 2516531
2019-09-19 12:12:29 -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
Manikandan Mohan
5953215f9b qcacld-3.0: Update dot11f frame spec files for 6Ghz support
Add 6GHZ operation information element structure and HE extended
capabilities for 6GHZ information element structure to dot11f frame
specification and parsing files. Also add them as optional IE in
required managment frames.

Change-Id: I5da20543c245e3e02806a20fbfe3ff4326db61f4
CRs-fixed: 2530409
2019-09-18 22:53:44 -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
Amar Singhal
2e4ccccf54 qcacld-3.0: Use frequency based channel enumerations
CONFIG_LEGACY_CHAN_ENUM has been removed. That macro needs channel number
based enumeration. Use channel frequency going forward. So change to
frequency based channel enumeration.

Change-Id: I234eb070a6dcfaf3325bbd523c19188d5b2bbd24
CRs-Fixed: 2513098
2019-09-16 15:14:10 -07:00
Tushnim Bhattacharyya
bb1285966a qcacld-3.0: Do not enable AMSDU Rx in ADD BA session for 2.4Ghz
Do not enable AMSDU Rx by advertising advertises AMSDUSUPPPORTED=0
in ADD_BA response if the connection is on 2.4Ghz.

Change-Id: I1c61ce9f3824a600fbd5123680b7d00ae7659438
CRs-Fixed: 2519746
2019-09-13 18:54:16 -07:00
Li Feng
9a7ee6c492 qcacld-3.0: Assign third octet of country string field
Assign third octet of country string field as 0x04 to support MBO AP.

Change-Id: I639d713e05c9408915071d233bfd433d98606aff
CRs-Fixed: 2518536
2019-09-12 07:30:13 -07:00
Kiran Kumar Lokere
e54ed6cdeb qcacld-3.0: Rename the vendor IE attributes
Rename the vendor IE attributes.

Change-Id: I952578efe9e23552eb57e9a902cc22641b6d7656
CRs-Fixed: 2525188
2019-09-12 01:46:10 -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
Yu Ouyang
228afe9d1d qcacld-3.0: Fix ANI_AKM_TYPE_SAE undeclared issue
ANI_AKM_TYPE_SAE is defined only when WLAN_FEATURE_SAE defined.
But it is used without any checking in function lim_check_wpa_rsn_ie().
If WLAN_FEATURE_SAE is disabled, build error will occur.

It is easy to fix it to add '#ifdef WLAN_FEATURE_SAE' in function
lim_check_wpa_rsn_ie(). But coding rule, '#ifdef WLAN_FEATURE_SAE' isn't
allowed to occur in function. So, move '(*akm_type == ANI_AKM_TYPE_SAE)'
to function lim_check_sae_pmf_cap().

Change-Id: Id62bc69d770dbd4e470d8fa379b4cb3f7447d9dc
CRs-Fixed: 2508071
2019-09-08 01:07:24 -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
160d364672 qcacld-3.0: Refactor channel switch resp in lim
Use vdev_start_response to replace tpSwitchChannelParams
parameter in channel switch response handler.

Lim channel switch resp handler will be called directly, don't
use post msg.

Use vdev id to replace tpHalHiddenSsidVdevRestart in hidden
ssid response handler.

Change-Id: Ida0bfed3fea1cc0ff28ed15832765d446296f3be
CRs-Fixed: 2516582
2019-09-06 12:25:55 -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
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
Rajeev Kumar Sirasanagandla
e796a60fd0 qcacld-3.0: Use frequency for channel operation
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: I3853d6e64e63eb219282afac4f56ccf398b0a04f
CRs-Fixed: 2517897
2019-08-30 16:02:55 -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