Commit Graph

585 Commits

Author SHA1 Message Date
Bala Venkatesh
accb9ddbfc qcacld-3.0: Disable OCE in FW if SAP/ GO has any clients
Disable OCE in STA vdev if any sta gets associated to SAP/GO.
This will improve the scan results in STA interface.
Without this fix firmware will do probe request deferral for 15ms
out of 28 ms , so 15ms is gone and rest is not sufficient dwell
time to get all AP probe responses.

Change-Id: Ie6f79c86025c53360c792c740a963ed8a1d9b936
CRs-Fixed: 2443190
2019-05-03 05:45:18 -07:00
Pragaspathi Thilagaraj
1f3f99fd1f qcacld-3.0: Add support for adaptive 11r
Adaptive 11r feature that enables the AP to support FT-AKM
without configuring the FT-AKM in the network. The AP will
advertise non-FT akm with a vendor specific IE having Adaptive
11r bit set to 1 in the IE data. The AP also advertises the
MDE in beacon/probe response.

The STA should check the adaptive 11r capability if the AP
advertises MDE in beacon/probe and adaptive 11r capability in
vendor specific IE.  If adaptive 11r capability is found,
STA should advertise the FT equivalent of the non-FT AKM.

Introdue a compile time flag WLAN_ADAPTIVE_11R_ENABLED to
enable/disable adaptive 11r support.

If the AP is adaptive 11r capable, set the is_adaptive_11r_ap
flag in bss descrtiptor. This flag will be sent in join request
and populated to pe_session. Also mark the CSR session as
adaptive 11r session based on this flag.

Add changes to check for the adaptive 11r service capability
advertised by firmware. If the host driver connects to adaptive
11r AP, enable RSO only if the firmware advertises adaptive
11r capability, else RSO should be disabled.

If the connection is adaptive 11r connection and if the adaptive
11r ini is enabled, set the adaptive_11r flag in
wmi_roam_11r_offload_tlv_param sent over the wmi command
WMI_ROAM_SCAN_MODE to the firmware. This will enable firmware to
filter the adaptive 11r AP from roam scan results.

Change-Id: If27a2393e3f4bb68942f5ebcec0135f57627f16b
CRs-Fixed: 2437988
2019-05-02 08:15:49 -07:00
Abhishek Singh
f880a7df25 qcacld-3.0: Use peer to get the cipher to decide MIC length
Driver uses cipher stored in vdev to get the MIC length, which
may get updated if multiple peer(TDLS peer in STA case) get
connected to the vdev. Thus depending on latest peer cipher type
the MIC length will be calculated for all peers.

Add changes to store cipher info in peer and use it to calculate
MIC length for the frame if CRYPTO_SET_KEY_CONVERGED is defined.

Change-Id: I852e4b519f55d8020237989314f8506aa275f379
CRs-Fixed: 2444416
2019-05-01 23:41:43 -07:00
sheenam monga
4a3f34138c qcacld-3.0: Fix uninitialized subtype usage by policy manager
Currently, Updation of vdev related parameters
policy_mgr_vdev_entry_info is conditional. Conditional
updation can cause uninitialized usage of subtype of
policy_mgr_vdev_entry_info by policy manager to get concurrency
mode.

Fix is to initialize policy_mgr_vdev_entry_info with zero.

Change-Id: If1350bd66705defdea2e69d559de0a6578acde02
CRs-Fixed: 2423871
2019-05-01 16:21:03 -07:00
gaurank kathpalia
a3415ed80d qcacld-3.0: Remove check of hw mode from connect path
Currently the driver checks that whether DBS connection
is allowed in concurrency or not, and if it is not
allowed, MCC should happen.
But the check of policy_mgr_is_hwmode_set_for_given_chnl blocks
the connection in MCC, because it checks whether the DBS
mode is set or not, which should not be case always, for
example in MCC case scenarios, or SBS case scenarios in
future.
Lets take a case scenario to understand this :-
1. Keep the ini channel_select_logic_conc = 0
        this would disable the dbs for STA+STA/P2P-CLI
2. Turn on the above concurrency combinations in diff band
3. The expectation should be MCC as DBS for this combination
is disabled, but this is not the observation.

here the vdev that comes up next, would fail as MCC is rejected
in policy_mgr_is_hwmode_set_for_given_chn, and DBS is not allowed
according to the check in policy_mgr_is_dbs_allowed_for_concurrency
hence the combination mentioned above cannot be achieved with
this check.

Fix is to remove the check of dbs from API
policy_mgr_is_hwmode_set_for_given_chnl.

Change-Id: I4260f3229658b753f98a106e5580b6c18f7ac0ff
CRs-Fixed: 2442533
2019-05-01 05:53:59 -07:00
Bala Venkatesh
51930d5a43 qcacld-3.0: Don't allow update peer command if peer not found
Do not allow tdls peer update command if tdls peer is not
found in lim. If peer assoc command is given to FW
without peer create, FW will assert.

Remove tdls peers in tdls component in case of roaming as
peers are deleted in lim as part of roaming.

Change-Id: Ie227da682e4d30c9b583881f7e2eaafe91826476
CRs-Fixed: 2441951
2019-04-30 08:41:12 -07:00
jiad
72b69a952e qcacld-3.0: Enable STA IPA offload for MDM platforms
In STA-SAP config, IPA offload is enabled only when first
client is connected to SAP. This is OK for MSM platforms.
But for MDM platforms, this is not the case. There's STA
tethering cases, where traffic is routed between STA and
USB tethering devices while SAP is idle and no wifi clients
are connected to SAP. In such case, IPA offload needs to
be enabled for STA to promote performance.

Fix is to use available MDM_PLATFORM marco and STA only IPA
support is decided upon driver build time.

Change-Id: If2bc016aa941f2c0651a2669f1169e631208326b
CRs-Fixed: 2433608
2019-04-30 02:13:14 -07:00
Wu Gao
18e788a176 qcacld-3.0: Update rssi when get all tdls peers
It doesn't update rssi of tdls peers. So add logic to update it when
get all tdls peers.

Change-Id: I81d4536b5cb2443b088ee4a5d425d548eac152d6
CRs-Fixed: 2435903
2019-04-29 04:17:25 -07:00
gaurank kathpalia
7b5efba296 qcacld-3.0: Modify scan type for RRM scan request
Currently in the case of concurrent sessions running,
the driver updates the active dwell time for the scan
request to the default value, overwriting the already
filled active dwell time which the DUT got from the
AP as part of RRM request, which results in violation
of protocol.

Fix is to not update the concurrency params if the scan
request is of type RRM.

Change-Id: I09ebfbee0d282391be17aed7eaf56e3c53c2a5e2
CRs-Fixed: 2438535
2019-04-27 01:01:42 -07:00
Pragaspathi Thilagaraj
eb367282fd qcacld-3.0: Handle wmi_key_material_ext tlv of ROAM_SYNCH event
With current design, firmware sends the kck, kek and replay
counters as part of wmi_key_material tlv over the
WMI_ROAM_SYNCH_EVENTID event. But the maximum supported kck key
length in wmi_key_material was 16 bytes. But for FT Suite-B
(akm 00:0f:ac:13), the kck_bits is 24 bytes long and cannot be
sent over wmi_key_material. So firmware sends kck, kek and
replay counter values over the new tlv wmi_key_material_ext.

Host driver copies the kck key with fixed 16 byte length to the
upper layers. Introduce kck_length parameter in csr_roam_info
and roam_offload_synch_ind structures and copy kck based on this
length.

Also fix maximum number of AKM suites supported to 5, as some
certification test cases advertise 5 akms.

Change-Id: Iab050e3e3f7efead8070a02094998d15f7ffcbd0
CRs-Fixed: 2400770
2019-04-24 20:23:59 -07:00
Will Huang
b9cb12421a qcacld-3.0: Add missed calling of wlan_hdd_get_station_remote
Propagation from qcacld-2.0 to qcacld-3.0

For the sap role, .get_station would invoke
wlan_hdd_get_station_remote() or wlan_hdd_get_sap_stats(), depends on
"gSapGetPeerInfo" ini setting. And fix the logic of determine sap get
peer info enable or not by target capability.

CRs-Fixed: 2427627
Change-Id: I3162950a6a7202d55b64ff9c60a26971d3a31555
2019-04-24 11:38:31 -07:00
Paul Zhang
a25f75a841 qcacld-3.0: Add INI to config tx retry threshold
Add gTxAggSwRetry for tx aggregation case, and
Add gTxNonAggSwRetry for non tx aggregation case.

Change-Id: I92265fb4e279eaf63c45f0134f997df02bca8737
CRs-Fixed: 2436305
2019-04-24 04:05:41 -07:00
gaurank kathpalia
37e4ff877f qcacld-3.0: Modify PCL based on SRD ini for P2P-GO
Currently the driver does not update the PCL
channel list based upon the SRD ini, and thus
adds the SRD channels in the PCL for p2p-go,
which can lead to p2p-go operation on a channel
not expected.

Fix is to remove the SRD channels from the PCL
channel list, if the SRD ini is set.

Change-Id: I8824fa38ef59976816a5e230982c551263da0c9c
CRs-Fixed: 2437795
2019-04-23 16:18:39 -07:00
Abhishek Ambure
afe03c50c1 qcacld-3.0: Add debug stats for sta, ap and ext mlme ops
MLME debug stats are added to the sta, ap and ext mlme ops
functions. This will help in debugging.

Change-Id: I55a3a91c6daf98a77557175447798c670be5709a
CRs-Fixed: 2439436
2019-04-23 16:18:27 -07:00
Mohit Khanna
e1b8602571 qcacld-3.0: Check vdev from CDP vdev_id API
Check for validity of vdev obtained from the CDP
cdp_get_vdev_from_vdev_id API.

Change-Id: Ie7fb99a0e08135bd3f2cc6b63070a4bd72df943a
CRs-Fixed: 2434583
2019-04-22 00:30:32 -07:00
Jianmin Zhu
0423e33f55 qcacld-3.0: Disable adaptive dwell scan for Roaming by default
1. There is a need for STA to find better AP to connect to, so
this becomes priority over total scan duration.
2. Typically there are very few channel numbers to scan (with FW
CHAN MAP) therefore any penalty with higher dwell time is
compensated with the lesser number of channel. Only in case of
not finding a candidate FW does full scan but that probability
might reduce if AP is found in first CHAN map scan.

Change-Id: Ib923c2af9b92a1465730a861a2b56393dc3d8668
CRs-Fixed: 2431846
2019-04-21 18:11:07 -07:00
jiad
90b1725a4f qcacld-3.0: Support WDI 3.0 SW path intra-bss forwarding
Support WDI 3.0 SW path intra-bss forwarding. Major
difference for WDI 3.0 is the metadata info passed
from ipa driver in skb->cb[].

Previously intra-bss fwd decision is done by FW and
it passes fw_desc to IPA where IPA driver passes onto
WLAN driver. Now for WDI 3.0, FW is not involved in RX
path and SW path intra-bss fwd decision has to be done
in wlan driver.

Change-Id: I0b4b9bbf16440dd47b6f97460f8931ea3a79303c
CRs-Fixed: 2426857
2019-04-21 06:17:29 -07:00
Wu Gao
eb2aa7885f qcacld-3.0: Remove the codes about TDLS low rssi teardown
Both FW and host support TDLS low rssi teardown, so remove the host
logic. In addition, host trigger low rssi teardown wrongly since
doesn't update rssi of tdls peer on time.

Change-Id: I93d7957e01ba805b73558a5ced7a1dc8cc2681c1
CRs-Fixed: 2437166
2019-04-19 09:25:45 -07:00
bings
6c4672b657 qcacld-3.0: Select valid channel after pcl selection fails
When SAP works in ACS mode, it needs to restart with a safe channel
if current channel is unsafe. Sometimes no channel is selected from
pcl channels. SAP can't just pick up one safe channel because the
channel may be DFS channel while SAP may disable DFS master capability.
SAP should select one valid channel for LTE COEX.

Change-Id: I303165f82b5c2a8d06447df4ba23fdcba5b1083c
CRs-Fixed: 2415007
2019-04-19 06:12:48 -07:00
Pragaspathi Thilagaraj
2b8ea35e71 qcacld-3.0: Introduce new INI to configure roam trigger parameters
Add new ini to configure various roam trigger parameters:
1. "minimum_btm_candidate_score"
   Consider the AP as roam candidate only if its score is greater
   than minimum_btm_candidate_score. This value will be sent over
   the WMI_BTM_OFFLOAD_CONFIG command.

2. "roam_scan_inactivity_time"
   Device inactivity monitoring time in  milliseconds for which
   the device is considered to be inactive with data packets
   count is less than configured roam_inactive_count.

3. "roam_inactive_data_packet_count"
   Maximum allowed data packets count during
   roam_scan_inactivity_time.

4. "roam_scan_period_after_inactivity"
   Roam scan period in ms after device was in inactive state.

5. "btm_roam_score_delta"
   Roam scan delta value for btm triggered roam scan. This value
   will be sent to firmware over the WMI_ROAM_AP_PROFILE wmi
   command.

6. "idle_roam_score_delta"
   Roam scan delta value for Idle roam scan trigger reason. This
   value will be sent to firmware over the WMI_ROAM_AP_PROFILE
   wmi commnd in the roam_score_delta_param_list tlv.

7. "disconnect_roam_trigger_min_rssi"
   Candidate minimum rssi value for disconnect roam trigger. This
   value will be sent to firmware over the WMI_ROAM_AP_PROFILE
   wmi commnd in the roam_score_min_rssi_param_list tlv.

8. "beacon_miss_roam_min_rssi"
   Candidate minimum rssi value for BTM triggered roam. This
   value will be sent to firmware over the WMI_ROAM_AP_PROFILE
   wmi commnd in the roam_score_min_rssi_param_list tlv.

9. "bss_load_trigger_5g_rssi_threshold"
   If connected AP is in 5GHz band, then consider bss load roam
   triggered only if load % > bss_load_threshold && connected AP
   rssi is worse than bss_load_trigger_5g_rssi_threshold.

10. "bss_load_trigger_2g_rssi_threshold"
   If connected AP is in 2GHz band, then consider bss load roam
   triggered only if load % > bss_load_threshold && connected AP
   rssi is worse than bss_load_trigger_2g_rssi_threshold.

Change-Id: Ib026251a8ec403f4376a16a91ff1b5d969336816
CRs-Fixed: 2434922
2019-04-19 04:08:32 -07:00
Will Huang
79af29fd46 qcacld-3.0: Fix smmu fault when inject deauth frame
1. The original mgmt send path changed by converged p2p component, now
wma_tx_packet() will not invoke when sending station mode action
frames, it invokes p2p_mgmt_tx() instead. But for tx buffers of PMF
frames sending to some target require to do bi-direction dma map to
pass smmu sanity check, which is missed in p2p_mgmt_tx() path.
2. The offchan flag passed to wlan_hdd_mgmt_tx() is not always accurate.
There have been cases where the flag is set even though the operation is
taking place on the home channel, and blindly following the flag leads
to an unnecessary ROC.

Fix it by adding QDF_NBUF_CB_TX_DMA_BI_MAP to new p2p mgmt tx path and
bring back home channel check to override the offchan flag if
necessary.

Change-Id: I9589157e57e95d0c61a432f87a07630c4b77f757
CRs-Fixed: 2423341
2019-04-19 01:56:32 -07:00
Jingxiang Ge
2a67be508a qcacld-3.0: Pass hang reason to qdf_trigger_self_recovery
Pass hang reason to qdf_trigger_self_recovery

Change-Id: I9930731d0a565e021eb472163de7fb5190c39f35
CRs-Fixed: 2432834
2019-04-19 01:56:27 -07:00
Pragaspathi Thilagaraj
aa8320e1c6 qcacld-3.0: Send idle roam trigger monitor command to firmware
Send idle roam trigger monitor command to firmware based on
the SET SUSPEND mode command received from the user space.
The set suspend mode value sent will be used by firmware as
one of the parameters in determining if the device is in
idle state. When set suspend mode is 1, device is not in
idle state else the device is considered idle if idle state
data packet count, idle rssi, inactivity time criteria are met.

Add changes to send the suspend mode value over the wmi
command WMI_IDLE_TRIGGER_MONITOR_CMDID.

Change-Id: Ia4531fdab140334dbb830e0d7486db07bbdfc7e8
CRs-Fixed: 2436221
2019-04-18 17:02:14 -07:00
Bala Venkatesh
4a3de4526f qcacld-3.0: Do not reset the TDLS peer link status to idle
As part of every scan, TDLS component is notified.
TDLS component takes decision to allow the scan or not.
But after rejecting the scan for max no of times.
TDLS peer link status is set to idle which is not expected.
Overwriting this link status can lead to not finding the
peers to cleanup while 2nd interface is added.

Change-Id: I1a0120399118ef7e9168dbcb7b5009a88e000d5c
CRs-Fixed: 2435694
2019-04-18 17:02:01 -07:00
Lin Bai
003e4fbe23 qcacld-3.0: Disable dsc_debug log in perf-build
dsc_debug() is impacting IPA tput, as
introduced by Ib8e1fc1e16785dfe3c5f8273e4ad8d5d6ecdb6e6.

Disable debug level DSC log in perf-build.

Change-Id: I2a18e44879b9301067844cfc6e56f57bb5588c74
CRs-Fixed: 2435880
2019-04-18 02:33:16 -07:00
Rajeev Kumar Sirasanagandla
02cf4c9c2f qcacld-3.0: Avoid STA plus STA concurrent connections
Add policy manager support to avoid simultaneous connections on
STA plus STA concurrent interfaces when
WMI_SERVICE_STA_PLUS_STA_SUPPORT is not set.

Change-Id: I73e65c56a98908128d56af2f4fba8ced5210fff1
CRs-Fixed: 2427828
2019-04-18 00:28:17 -07:00
Bala Venkatesh
c59b7a1c0c qcacld-3.0: Free rx_mgmt in function tdls_process_rx_frame
Currently, in function tdls_process_rx_frame. If vdev is
NULL then rx_mgmt memory is not freed.

Free the rx_mgmt memory before returning from function
tdls_process_rx_frame.

Change-Id: I5be27a7fa8a9417f578e406f3f9e8c7394439fa8
CRs-Fixed: 2436241
2019-04-18 00:28:08 -07:00
Srinivas Girigowda
d1e45b8dc7 qcacld-3.0: Replace multiple IPv4/v6 address len macros with QDF macro
Replace multiple IPv4/v6 address len macros with QDF macro.

Change-Id: Id8ee0e1a4d6057f74ea5b7122a33f5137ea533e4
CRs-Fixed: 2435753
2019-04-16 19:57:47 -07:00
Rakshith Suresh Patkar
8009443ffd qcacld-3.0: Remove vdev sanity while sending IPA evt
When vdev is logically deleted, vdev reference will
be returned as NULL by objmgr.

Remove vdev sanity from QDF_BUG while sending IPA evt
in __wlan_ipa_wlan_evt.

Change-Id: Ie7f9697768d53c71a6bead377c35bbc3f62e808a
CRs-Fixed: 2433521
2019-04-16 19:57:43 -07:00
Bala Venkatesh
1c66bfb5fd qcacld-3.0: Revert back the default INI values
Enable the below INI values by default
enable_esp_for_roam
oce_enable_probe_req_deferral
oce_enable_probe_req_rate

Change-Id: Ie707e9707e3cbdbc2f6bef17b35d6d74513daba7
CRs-Fixed: 2434825
2019-04-15 17:44:05 -07:00
Pragaspathi Thilagaraj
14f72de820 qcacld-3.0: Introduce new ini to configure disconnect/idle roam scans
Add new ini to configure required parameters to trigger
disconnect/idle roam scan:
1.enable_disconnect_roam_offload
	When this ini is enabled firmware will trigger roam scan
	and roam to a new ap if candidate is found and it will
	not forward the deauth frame to the host driver. If
	roaming fails after this deauth, then firmware will
	forward the deauth frame to the host. If roaming is
	successful, we will follow the normal roam synch event
	path.
2.enable_idle_roam
	When this ini is enabled firmware will trigger roam scan
	and roam to a new ap if current connected AP rssi falls
	below the threshold. To consider the connection as idle,
	the following conditions should be met:
		1. When user space sends "SET SUSPENDMODE"
		   command with value 0.
		2. No TX/RX data for idle time configured
		3. Connected AP rssi change doesn't exceed the
		   threshold
		4. Connected AP rssi false below minimum rssi.
3. idle_roam_rssi_delta
	RSSI change in current connected AP above/below which
	idle roam scan will be triggered if other criteria is
	met.
4. idle_roam_inactive_time
	Time duration in milliseconds for which the connection is
	to be considered idle.
5. idle_data_packet_count
	number of tx/rx packets below which the connection is
	idle.

Change-Id: Ibd1c91656ecd681f8dc83bc77197668a7f3bfa3f
CRs-Fixed: 2427132
2019-04-15 15:20:59 -07:00
Manikandan Mohan
a1f29a9bfe qcacld-3.0: NAN component updates for SAP concurrency
Add NAN+SAP concurrency related changes to NAN component. This
handles NAN discovery and SAP SCC design constraint.

Change-Id: Ief0d6735d9f011eb3bac22d813b2d2ef41f3fe7c
CRs-fixed: 2431539
2019-04-11 01:13:13 -07:00
Manikandan Mohan
7ba3608afc qcacld-3.0: Add NAN+SAP concurrency config to policy manager
Add NAN+SAP concurrency config in 2x2 DBS table for design constraints.

Change-Id: I89ad35e862c8e0bc9b96dba35d9f2ad66144e5b1
CRs-fixed: 2431539
2019-04-11 01:12:56 -07:00
Manikandan Mohan
ad93a751b5 qcacld-3.0: Add policy manager changes for NAN+SAP concurrency
Add policy manager changes for NAN discovery interface and SAP
mode concurrency setup related constraints. This handles NAN enable,
disable, SAP bringup and PCL related configuration for NAN+SAP
concurrency.

Change-Id: I04564e80e62189e2e6c0f810856b961b61ef70b4
CRs-fixed: 2431539
2019-04-11 01:12:45 -07:00
Bala Venkatesh
c697313c30 qcacld-3.0: Revert the default value of INI gfine_time_meas_cap
Revert the default value of gfine_time_meas_cap from 0x00BD
to 0x000D

Change-Id: Ie13a5d369f652346bcefed886c7d5c693e88ef37
CRs-Fixed: 2432009
2019-04-09 22:20:43 -07:00
Subrat Dash
5f36fbef77 qcacld-3.0: Add gettime of PTP for NON-QC platform
Implement NON-QC platform TSF and TSF PLUS.
Implement gettime of PTP.
Implement TSF PLUS for SAP/GO

CRs-Fixed: 2399624
Change-Id: Id4f41a94256a8f035ae408c168c246569185c534
2019-04-09 11:56:39 -07:00
Rajeev Kumar
359c3baf20 qcacld-3.0: fix wlan_ipa_send_to_nw type
The only function called through this pointer type doesn't return
a value and the caller doesn't check for a return value. Change
the function pointer type to return void to fix a CFI failure due
to a type mismatch:

  CFI failure (target: [<ffffff853ba7cee8>]
      hdd_ipa_send_skb_to_network+0x0/0x4 [wlan]):
  ...
  Call trace:
    __ubsan_handle_cfi_check_fail+0x50/0x58
    __cfi_check+0x31fa0/0x3d5a4 [wlan]
    wlan_ipa_w2i_cb+0x5fc/0x8fc [wlan]
    ...

Change-Id: I94f6bb0fc06acebde12cf80294999d9419296c4a
CRs-Fixed: 2431600
2019-04-09 01:53:22 -07:00
Jianmin Zhu
465c348898 qcacld-3.0: Fix Wlan Tx failed when bt-coex for Rome
Current gTxChainMask1ss is 1 by default, only chain 1 can be used
by wifi when bt co-ex, if only chain0 exist or green AP switch to
1x1 mode, wifi tx will fail, connect will fail.

Add clear comment for gTxChainMask1ss to avoid confusing.
gTxChainMask1ss is only used by Rome, not by Helium and HST.

NOTE WELL: This change will have an adverse impact on products
which implicitly expect gTxChainMask1ss=1 behavior. Any such
products must update their INI file to add an explicit
"gTxChainMask1ss=1" entry.

Change-Id: I44f34f80200d057188a77f6f564a13c768fc727e
CRs-Fixed: 2426623
2019-04-07 22:24:58 -07:00
Harprit Chhabada
74007cf168 qcacld-3.0: Check range for pcl_count in policy_mgr_trim_acs_channel_list
In policy_mgr_trim_acs_channel_list(), check the range for
pcl to ensure it is less than QDF_MAX_NUM_CHAN

Change-Id: I1326e229e93edef6ac5963c7cc48557cc22e76ba
CRs-Fixed: 2424007
2019-04-06 00:16:04 -07:00
Harprit Chhabada
be221e6ed9 qcacld-3.0: Populate CFG values in SAP module
Currently HDD is populating SAP configuration values and
sending it down to SAP module instead use the respective
MLME CFG public API's to get the configuration values.
Move following CFG values:
1. auto_channel_select_weight
2. reduced_beacon_interval
3. dfs_preferred_channel_location

Change-Id: Ic0936a9d96d0587d927ea4d906bd659969415847
CRs-Fixed: 2425524
2019-04-06 00:16:00 -07:00
Srinivas Girigowda
d462f3b993 qcacld-3.0: Multiple cleanup regarding access category
1. Replace TX_WMM_AC_NUM/OL_TX_NUM_WMM_AC with QCA_WLAN_AC_ALL
2. Replace SIR_QOS_NUM_AC_MAX with QCA_WLAN_AC_ALL
3. Replace WME_NUM_AC with QCA_WLAN_AC_ALL
4. Fix the typo sme_qos_u_pto_ac_map

CRs-Fixed: 2430527
Change-Id: Id2b4624d60a2bd7dd1471c65699ef0de1b88aecf
2019-04-06 00:15:56 -07:00
Ajit Pal Singh
775bf3ae4b qcacld-3.0: pmo: Add API to get target suspend state
In USB devices even if the driver returns an error from bus_suspend,
still the kernel/platform goes into suspend as any error from USB
bus_suspend is ignored.
During suspend, if WoW or suspend was NACked by FW, we should not
send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, WMI_PDEV_RESUME_CMDID to disable
WoW or resume device (in the next system resume)
Add new PMO API to get target suspend state and use it to check if
device should be resumed.

Change-Id: Ic6be05f4f2d36ffe174774b6cd55c6da6b1ea1b8
CRs-Fixed: 2421591
2019-04-05 08:37:19 -07:00
Abhishek Singh
7c1c7431da qcacld-3.0: Use peer to get the cipher to decide MIC length
Driver uses cipher stored in vdev to get the MIC length, which
may get updated if multiple peer(TDLS peer in STA case) get
connected to the vdev. Thus depending on latest peer cipher type
the MIC length will be calculated for all peers.

To fix store cipher info in peer and use it to calculate MIC length
for the frame.

Change-Id: I8afbf9a3bb43c294dbacbbaa7fa0746600937d11
CRs-Fixed: 2428482
2019-04-05 03:33:17 -07:00
Rajeev Kumar
f48aca2517 qcacld-3.0: Remove DSC VDEV OP enter/exit log
Remove DSC VDEV OP enter/exit log as it can flood
debug log messages.

Change-Id: I1302b77515abb8d8c4ce1f24e612d00bf23167a1
CRs-Fixed: 2427389
2019-04-04 20:58:40 -07:00
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
Bala Venkatesh
0f74545bb3 qcacld-3.0: Replace duplicate api's of vdev_connected
Currently, the vdev connection status is checked by getting
the bss peer of that vdev, and if the bss peer is in associated
state then vdev connected status is sent as true. It can happen
vdev is present and bss peer is deleted after getting the bss peer
from vdev pointer. Then bss peer can not be dereferenced to get the
its status.

Instead remove all the duplicate api's tdls_is_vdev_connected,
pmo_core_is_vdev_connected, and wlan_vdev_is_connected with
wlan_vdev_is_up. wlan_vdev_is_up gives success status
if associated.

Change-Id: I863c3c0689f329870bd08c813813c16956135209
CRs-Fixed: 2424996
2019-03-29 15:26:58 -07:00
Srinivas Girigowda
a47b45f94f qcacld-3.0: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
PMO_80211_ADDR_LEN
IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HTT_MAC_ADDR_LEN
ETHERNET_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
QCSAP_ADDR_LEN

CRs-Fixed: 2406592
Change-Id: I829c5799e4724f81af996b23fdd4ea03f4728bc4
2019-03-28 16:49:58 -07:00
Rajeev Kumar
5f863eec8d qcacld-3.0: Disable periodic time sync feature from mainline
Periodic time sync feature is not needed on mainline hence
disable this feature by setting gRemoveTimeStampSyncCmd = 1.

Change-Id: Ifbffc02c61af3be8300a97d9be7b2c7dceaf263d
CRs-Fixed: 2422866
2019-03-28 04:36:15 -07:00
Abhishek Singh
424ca57742 qcacld-3.0: Hold lock while temporary deleting the connection entry
If two thread are trying to access the connection entry and one of them
Is modifying it by temporarily deleting an entry, the other thread may
get the invalid connection entry and decision made using that connection
table will be invalid.

Thus acquire the lock before the entry is temporarily deleted and release
only after its added back.

Change-Id: I83b9d7a77045d8bddd6cf3e4b1af80bded116e2f
CRs-Fixed: 2422611
2019-03-27 06:09:44 -07:00
Rakshith Suresh Patkar
785b8450b5 qcacld-3.0: Add flag for ipa pipes_down_in_progress
ipa disable pipes request is honoured based on
ipa_pipes_down flag. However, there is a possible
synchronization issue if disable pipes request is
initiated from different contexts, as there is no
locking to protect this flag.

Add pipes_down_in_progress flag in ipa_ctx and
use this flag to ignore disable pipes requests if
one request is already in progress.

Change-Id: Iabf01249d4b6a551e03cea2ae96a0c6096f43ff8
CRs-Fixed: 2423155
2019-03-27 02:53:34 -07:00