Commit Graph

9365 Commits

Author SHA1 Message Date
Bapiraju Alla
cc025bf48c qcacmn: Access scan_req_q under lock
Currently, list empty checks for scan_req_q is done outside the lock.
This is causing synchronization issue during scan and SSR/vdev delete
in parallel.

To avoid this, check for scan_req_q empty inside the lock.

This change also updates the return type of
wlan_schedule_scan_start_request to QDF_STATUS, which is expected by
caller API.

Change-Id: I8b6febdd98af7856fb047b1c9d852e4944a137b5
CRs-Fixed: 2763173
2020-08-31 17:21:33 -07:00
Hariharan Basuthkar
09a17690e8 qcacmn: Modify tx-power in Regdomain FCC15 and FCC16
The max txpower allowed in reg domain FCC15 (24dBm) and FCC16 (30 dBm)
as per the regulatory update #32 xls is applicable for 320 mhz. For
160 MHz,the powers need to be reduced by 3dbm.

This was missed in the change-id
I1b1bdaceb4fa48973fb33fca17465a25d05ae040, and the power values
applicable for 320MHz were added.

Therefore, modify the max txpower allowed in regdomain FCC15 as 21 dBm
and the max txpower allowed in regdomain FCC16 as 27 dBm.

Change-Id: I5f5fa4ce1ba17deedfd367d7d07ad6c27fe91aa0
CRs-Fixed: 2763480
2020-08-31 17:21:29 -07:00
Yeshwanth Sriram Guntuka
aefb2ac3d4 qcacmn: Free nbuf from htt misc list only when magic pattern is set
In the scenario where htt packets fail to be transmitted to
FW, they are added in both endpoint tx queue and misc list.
On receiving FW down indication before these packets are sent
to FW, endpoint tx queue is flushed and nbufs are freed. Post
this, the aforementioned nbufs would be unmapped/freed again in
htt_htc_misc_pkt_pool_free causing panic.

Fix is to free the nbuf via misc pool free only when the magic
pattern is set.

Change-Id: Ie523a7ca0054eb4104a107b3bddd50cb9b585275
CRs-Fixed: 2762829
2020-08-31 17:21:26 -07:00
Shivani Soni
466f147d05 qcacmn: Debugfs support for HTT stats
Debugfs support for HTT stats under compile
time flag "HTT_STATS_DEBUGFS_SUPPORT".

Change-Id: I44c4f11265fdb3b9d53a9ac545e2945854bb9a57
CRs-Fixed: 2760947
2020-08-31 17:21:22 -07:00
Pragaspathi Thilagaraj
4545f87402 qcacmn: Add support for num of chains configuration nl command
Add support to configure the number of chains over the nl
vendor command
QCA_WLAN_VENDOR_ATTR_CONFIG_NUM_TX_CHAINS
QCA_WLAN_VENDOR_ATTR_CONFIG_NUM_RX_CHAINS.

Change-Id: I81eeda348efe36e03620687e81c082d3869fcd35
CRs-Fixed: 2756676
2020-08-31 17:21:18 -07:00
Mohit Khanna
83aab371c4 qcacmn: Add support to use pre-alloc mem
Add logic to pre-allocate DP consistent memory and reuse later
on wifi on/off. This prevents memory fragmentation.

Change-Id: I1e5eb0da39950a5d028dd46d38ff715f283e53ff
CRs-Fixed: 2740889
2020-08-31 03:32:45 -07:00
Chaithanya Garrepalli
21787e51de qcacmn: remove the assert for DP peer state
Remove the ASSERTs added for DP peer state tranistion

Change-Id: I3fdf355fc6a79642b5527a35015f96d04e4272c0
2020-08-31 03:32:42 -07:00
Abhishek Ambure
4d5fb39e3e qcacmn: Add support for ocv support in RSN capability
WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED i.e. 0x4000 bit in RSN capability
is set to 1 to indicate that the STA supports operating channel
validation by including Operating Channel Information (OCI) in RSNA
exchanges and validates the information when received from another
STA that indicated this capability.

Change-Id: I8cbe640772c95573461ef2ef54c9e86778fe970f
CRs-Fixed: 2765802
2020-08-31 03:32:38 -07:00
Surya Prakash Raajen
ca1a15192f qcacmn: Update format and index for CE latency buffer
Update formate and index to traverse CE Latency stats circular buffer
and print them in more user readable format.

CRs-Fixed: 2676241
Change-Id: I7b3464cd00227dfcf98bbfa63a407055dd7cbf57
2020-08-31 03:32:35 -07:00
Jia Ding
e26d537266 qcacmn: Properly remove affinity hint for CE irqs
IRQ affinity for CE IRQs has been set to gold cores.
But affinity hint is not removed when freeing CE irqs.

Therefore remove affinity hint for CE irqs before freeing
them.

Change-Id: I7385a90955bc7e357badcd784e40d89022542d1a
CRs-Fixed: 2765373
2020-08-29 07:07:34 -07:00
Hariharan Basuthkar
fa89410007 qcacmn: Add dispatcher functions for band overlap APIs
Add dispatcher functions for wlan_reg_is_range_overlap_2g and
wlan_reg_is_range_overlap_5g.

Change-Id: Ib5dc1728227117ea271ef8efa1290e7e5d711757
CRs-Fixed: 2765562
2020-08-29 01:27:10 -07:00
Yeshwanth Sriram Guntuka
32a9cc93a8 qcacmn: Avoid logging few hif events in case of IRQ storm
In IRQ storm scenario, the events are logged to hif
event desc history even though the SRNG is empty
resulting in overwriting of older entries useful for
debugging.

Fix is to avoid recording hif events if the SRNG is
empty in IRQ storm scenario.

Change-Id: Id4161198c60f5fae31123c936f0f4acc1082a78b
CRs-Fixed: 2753675
2020-08-28 23:31:16 -07:00
Jhalak Naik
8e4491a9ac qcacmn: Hex dump generation for WMI events and cmds
Support WHUNT FW simulation feature.
Records all the WMI events and commands, for all PDEVs.
Set WMI_EXT_DBG flag to enable this.

Change-Id: I18e46f683e35912cad717ca3b9cc3d1885315362
CRs-Fixed: 2762266
2020-08-28 13:03:54 -07:00
Jingxiang Ge
759cd74c04 qcacmn: Add wakeup source tracker
Enable debug for wakeup source tracker.

Change-Id: I28983b5b6cbc15e71753264504e28fccba8a79cc
CRs-Fixed: 2760401
2020-08-28 13:03:51 -07:00
Shashikala Prabhu
28cecde000 qcacmn: Use ktime_get_ts64 for logging time stamp
Use ktime_get_ts64 instead of ktime_get_real_ts64 to display logging time
stamp. ktime_get_real_ts64 displays the time of day in a timespec64.
Whereas, ktime_get_ts64 gets the monotonic clock in timespec64 format.

Change-Id: Id6646a2d60c5d049b0d777f58c9ac332ffb52437
CRs-Fixed: 2764048
2020-08-28 08:54:16 -07:00
Rakesh Pillai
351a71f1d3 qcacmn: Destroy rx tid spinlock when peer is freed
Currently the rx tid spinlock is destroyed from
peer delete (based on peer state) or peer unmap handler.
This can lead to a race condition when the peer is
deleted before the peer map command is processed/received.

Fix the above race condition by destroying the rx tid
spinlock only when the peer handle is destroyed/freed.

Change-Id: Iaf7ccea11a95732c1aa20e66af6dd4a9a66517c5
CRs-Fixed: 2763533
2020-08-28 08:54:13 -07:00
Sandeep Puligilla
00a2d6550f qcacmn: Add interface manager module
- Add interface manager module files
- Add start_connect event processing
- Add stubs for start_connect_complete and start_bss
event processing API's

Change-Id: I91a2bf38755abef38b6a9348d3eb69983217916c
CRs-Fixed: 2759226
2020-08-28 06:35:52 -07:00
Deeksha Gupta
eaf0cf59d0 qcacmn: Remove redundant print from scm_update_rnr_info()
Whenever there is a scm_update_rnr_info() function call,
print is flooded in each scan.
It is not giving any additional information.

Remove the print "scm_debug("Failed to get meta, freq %d", freq)"

Change-Id: Id6adda855e1d181704d8c69c10e4d041af758e43
CRs-Fixed: 2761408
2020-08-28 06:35:48 -07:00
Pavankumar Nandeshwar
f0d2f53e32 qcacmn: stats VoW IGMP improvements
Add stats VoW IGMP improvements feature

Change-Id: I86b803e67f2cc3cfc01750f261f06590ff2b97c2
2020-08-28 02:01:25 -07:00
Chaithanya Garrepalli
7db23eeca2 qcacmn: use batch peer reference in TX path
In Tx data path get the peer reference and use
until there is a peer_id mismatch. This is to avoid
per packet atomic operations

Change-Id: I59cdbef19001c694654f0967381a9242788d9cbc
2020-08-28 02:01:20 -07:00
Srinivas Girigowda
d5f803a63e qcacmn: dp: Remove duplicate log line
Remove duplicate log line.

CRs-Fixed: 2763028
Change-Id: Ic7c5325ba43b9b3117f997576fa2fa9a00c3d1fc
2020-08-28 02:01:15 -07:00
Srinivas Girigowda
a2d910900d qcacmn: iot_sim: Replace %pM/QDF_MAC_ADDR_STR/ARRAY with QDF_FULL_MAC_FMT/REF
Replace %pM/QDF_MAC_ADDR_STR/ARRAY with QDF_FULL_MAC_FMT/REF.

Change-Id: I96502ebff1a05c259d83d085c80a6f1c4486a7a1
CRs-Fixed: 2763028
2020-08-28 02:01:11 -07:00
Srinivas Girigowda
a4dbe43acf qcacmn: os_if: Replace QDF_MAC_ADR_STR/ARRAY with QDF_FULL_MAC_FMT/REF
Replace QDF_MAC_ADR_STR/ARRAY with QDF_FULL_MAC_FMT/REF.

CRs-Fixed: 2763028
Change-Id: Ife19dea018bd50d60ef9450fd65bdc39a32ab729
2020-08-28 02:01:07 -07:00
Srinivas Girigowda
6ad9002f62 qcacmn: umac: Replace %pM/QDF_MAC_ADR_STR/ARRAY with proper macros
For kernel and driver logs, replace %pM and QDF_MAC_ADDR_STR/ARRAY
with QDF_MAC_ADDR_FMT.
For tx/rx mask, use QDF_FULL_MAC_FMT.

CRs-Fixed: 2763028
Change-Id: I6c56c2040967b279dd31100c4f376f2452146742
2020-08-28 02:01:02 -07:00
Srinivas Girigowda
db57434d37 qcacmn: qdf: Replace QDF_MAC_ADR_STR/ARRAY with QDF_FULL_MAC_FMT/REF
Replace QDF_MAC_ADR_STR/ARRAY with QDF_FULL_MAC_FMT/REF.

Change-Id: Ief66fa40105e399fedee96cfaf142547cc6b3a2c
CRs-Fixed: 2763028
2020-08-28 02:00:58 -07:00
Srinivas Girigowda
738be5f561 qcacmn: qdf: Introduce QDF_FULL_MAC_FMT and QDF_FULL_MAC_REF
The idea behind introducing these macros is, if the feature
CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS is enabled, then the
requirement is to hide 2nd, 3rd and 4th octet of the
MAC address in the kernel logs and driver logs.
But other management interfaces like ioctl, debugfs, sysfs,
wext, unit test code or non-production simulator sw (iot_sim)
should continue to log the full mac address.

If the developer directly introduces %pM in the code, it becomes
difficult to catch this in the code review and may end up breaking
the feature CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS if enabled.

Hence the plan is to introduce meaningful macros to help code
audit easy and with the help of automation, block the developer
from directly introducing %pM in the code.

Change-Id: Id28663eb6e750febba07ed9bdad168187df3248f
CRs-Fixed: 2763028
2020-08-28 02:00:52 -07:00
Pavankumar Nandeshwar
0eeac59b4e qcacmn: VoW IGMP improvements
As part of the VoW IGMP improvements, which deals with
conversion of igmp packets to unicast packets, the
following changes are done when the new feature is enabled:

1. IGMP/MLD packets with special addresses (addresses not
   part of any multicast group) will be converted to all
   existing clients of the AP. These packets will be
   directly fed to igmp multicast to unicast conversion
   module.
2. The IGMP/MLD packets with group specific addresses will
   first go to multicast enhancement module, where they
   will be allowed to pass and will be converted to unicast.
3. The new feature will be enabled only when multicast
   enhancement feature is enabled, which will be ensured
   at the configuration level.
FR : 61063

Change-Id: I2fd5a67766c806432fbe1a12cb9654a3600100f5
2020-08-28 02:00:48 -07:00
Yeshwanth Sriram Guntuka
4c12885407 qcacmn: Delete peer AST entries as part of peer unmap
In roam HO failure, peer unmap indication is processed
even before Host initiates the peer cleanup. In the cleanup,
as part of cdp_peer_teardown, AST entries are freed up without
removing it from the peer AST list since get_peer_by_ref_id
returns NULL peer pointer as peer is moved to inactive state.

Fix is to delete peer AST entries as part of peer unmap
indication so that the entries are removed from the AST list.

Change-Id: I1b04517e8cc392b33bb439501e61e3d5534d8307
CRs-Fixed: 2763825
2020-08-27 23:52:36 -07:00
Srinivas Dasari
6812dd9d09 qcacmn: Inform fw if NAN is disabled on an SRD channel
Firmware expects the channel property WMI_CHAN_FLAG_NAN_DISABLED
to be set if NAN is not allowed on any channel. Firmware shall
check the flag and decides whether to enable NAN/NDP on that
channel.

Change-Id: I8e283d2cd0f83a43e04dad142b09d519ef7f0db3
CRs-Fixed: 2760348
2020-08-27 18:37:18 -07:00
gaurank kathpalia
8b761b0a66 qcacmn: Enable/Disable SRD support for vdev
Currently the driver enables the SRD channels
support for both P2P_GO and SAP if the SRD master
mode is enabled.

Have individual ini values to enable/disable
the SRD channel for each op-mode as required.
The ini etsi13_srd_chan_in_master_mode has the
following config for individual master modes:-
Bit map for enabling the SRD mode in various modes are as follows:-
BIT 0:- Enable/Disable SRD channels for SAP.
BIT 1:- Enable/Disable SRD channels for P2P-GO.
BIT 2:- Enable/Disable SRD channels for NAN.

Change-Id: Ia9ca9d49102405b307a410cbf28e3f8896114cac
CRs-Fixed: 2760002
2020-08-27 18:37:15 -07:00
Rhythm Patwa
3a1d8d64f7 qcacmn: Add support for Punctured Preamble PPDU count in tx stats
Add support to update the count of number of Punctured Preamble
PPDU's transmitted by the AP.

Change-Id: Id85a490e9e80566e639f48190a96d3107c6e5c61
CRs-fixed: 2755288
2020-08-27 18:37:12 -07:00
Chaithanya Garrepalli
58b018079f qcacmn: add vendor command for wifistats
Add new vendor command QCA_NL80211_VENDOR_SUBCMD_WIFI_FW_STATS
which is used for wifistats. Also remove
QCA_NL80211_VENDOR_SUBCMD_HTT_STATS which is wrongly used
in place of QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING

Change-Id: Ia73a09419c22c1206f8f933b9cf4b7f22b0399fd
2020-08-27 18:37:07 -07:00
Madhvapathi Sriram
904b8cb53b qcacmn: Add support to configure rate mask to cap phy rate
This will help to configure desired rate mask. It can be
used to optimize link performance.

Change-Id: I15b6fbc512d9b0869a6ad6a6f24f1593abf14dae
CRs-Fixed: 2758871
2020-08-27 02:05:47 -07:00
Srinivas Pitla
bf0f1c90b3 qcacmn: Dynamic Tx VDEV config
This change allow Tx VDEV of MBSS mode to configured
dynamically by reset the VDEVs.

This change includes FW service bit parsing, checking
VDEV state of all VDEVs, sending MBSS information in
VDEV start command

Change-Id: I46b13629bd1c07be86b408d72c2967642ce8542e
CRs-Fixed: 2759229
2020-08-26 23:57:44 -07:00
Amir
376724d4f9 qcacmn: Add WAR to skip status ring entry
STATUS_BUFFER_DONE tlv written in first word for a status
buffer indicates that DMA is done for that status ring entry.

In existing implementation, for a status ring entry if
STATUS_BUFFER_DONE tlv is not written by HW, we poll on to status ring
entry until DMA is done by HW.

During lmac reset it may happnen that HW will not write STATUS_BUFFER_DONE
tlv in status buffer, in that case we end up polling infinitely leading
to backpressure on monitor status ring.

As per MAC team's suggestion, when HP + 1 entry is peeked and if DMA
is not done and if HP + 2 entry's DMA done is set,
replenish HP + 1 entry and start processing in next interrupt.
If HP + 2 entry's DMA done is not set,
poll onto HP + 1 entry DMA done to be set.

CRs-Fixed: 2740988
Change-Id: Ieef667f0bb4a47e74fc320c93243c637409f47f0
2020-08-26 14:32:13 -07:00
Amir
f6f16ac551 qcacmn: Fix full monitor support enable issue
For QCN9000, full monitor is controlled through,
	a. full_mon_mode ini param
	b. QCA_SUPPORT_FULL_MON compile time macro

Currently enabling full monitor is not taken care under
macro QCA_SUPPORT_FULL_MON.

As monitor mode is not supported for 256M profile,
QCA_SUPPORT_FULL_MON is disabled.

Enable full monitor mode when both ini and macro are enabled.

Change-Id: Id5be5f7edc4739423fd74e28bb71a8f3339d87b3
CRs-Fixed: 2744622
2020-08-26 12:13:40 -07:00
Abhishek Ambure
f17e8207ac qcacmn: Add support to get pmf bcn protect stats from fw
To get the pmf beacon stats from firmware, host sets
WMI_REQUEST_PMF_BCN_PROTECT_STAT bit in stats_id param of
WMI_REQUEST_STATS_CMDID command. Firmware supporting pmf beacon
protection stats responds host with stats in wmi_update_stats_id
event.
Hence add support to get PMF beacon protect stats from firmware.

Change-Id: I99efd94ce5367da1312f60251ce7106997dd8bc8
CRs-Fixed: 2705084
2020-08-26 12:13:37 -07:00
Yu Tian
62339dcb9c qcacmn: Change feature flag name
Change feature flag name due to address alignment is
required from HW design perspective

Change-Id: I8418c7778f92031b11f0bb80bf9af307a61f45ff
CRs-Fixed: 2757537
2020-08-26 03:56:12 -07:00
Rakesh Pillai
66b1bf9608 qcacmn: Fix NULL pointer access for mac address logging
The mac address is tried to be logged from a NULL
bss data pointer, which leads to unwanted behavior.

Remove the logging of mac address from the NULL
bss data pointer.

Change-Id: I83a9e8b1dac0bd4983bf074863987d39187f9db9
CRs-Fixed: 2761731
2020-08-26 03:56:09 -07:00
Rajeev Kumar
bd9610f11b qcacmn: Remove obsolete HIF runtime pm prevent timeout API
hif_pm_runtime_prevent_suspend_timeout is no longer supported
and hence delete this obsolete API.

Change-Id: I2c01105219adb198bbf27aee5f2d5c7e357c1e34
CRs-Fixed: 2761022
2020-08-25 20:26:08 -07:00
Sandeep Puligilla
cb6735ac35 qcacmn: Release wakelock in response path
Release delete wakelock in delete response handler.
Release stop wakelock after sending the down command to
firmware so that it completes the disconnect sequence.

Change-Id: I0f47be04652178494d9cf0475af74ea573978005
CRs-Fixed: 2760116
2020-08-25 16:10:42 -07:00
Rhythm Patwa
360f0419df qcacmn: Add support to handle frames with HT/VHT/HE control field
Add support to handle the case where the peer transmits a frame
with HT/VHT/HE control field included.

Change-Id: I2b0d04ffa12a983a6c22e0a0bcbdfffa8fd48dcb
CRs-fixed: 2754234
2020-08-25 14:09:23 -07:00
Pragaspathi Thilagaraj
63c499059f qcacmn: Add support to send rssi change command in connection manager
Add support in connection manager to send rssi change cmd

Change-Id: Ic24820b4bec6926f5c4f38bf9c19bec2b3fb85a3
CRs-Fixed: 2761045
2020-08-25 05:41:33 -07:00
Madhvapathi Sriram
e55a45596f qcacmn: Add support to parse a string into uint32 array
Currently there is no api to parse a string to uint32 array.

Write an api to parse a string to uint32 array.

Change-Id: I54ab4ba1009f6efeb535df1ad43c56e1c3e56d2b
CRs-Fixed: 2758878
2020-08-25 05:41:29 -07:00
Utkarsh Bhatnagar
10ea93ec1d qcacmn: update SAP and P2P Go dwell time seperately
For SAP, the dwell time cannot exceed 32 ms as it can't go
offchannel more than 32 ms. For Go, since it advertise NOA
to annouce the absense period, it can have regular dwell
time which is 40 ms.
This was done increased scan latency was seen across
different targets.

Change-Id: I59a827380dbd76780eaebd8fff25a2eff2ef5107
CRs-Fixed: 2730638
2020-08-25 03:33:28 -07:00
Amar Singhal
c846a2e0e3 qcacmn: Update regulatory database to version 32
Regulatory domain changes for regdomain.xls 32.
Add Low power indoor for AP and STA, for 6 ghz.
Modify FCC15 and FCC16 for the same.
Remove FCC17 6ghz definition.
Add world mode for 6 ghz.
Add country Curacao to APL10_WORLD.
Change Antigua/Barbuda to FCC3_WORLD.
Create ETSI16_WORLD reg-domain.

Change-Id: I1b1bdaceb4fa48973fb33fca17465a25d05ae040
CRs-Fixed: 2731336
2020-08-24 22:04:04 -07:00
Gyanranjan Hazarika
7c67032493 qcacmn: Add Support for 802.11ax Draft 3 Compatible BSS Color macros
Currently, the WMI definitions for BSS Color are not draft specific.
Update the BSS Color macros to be compatible with changes in
802.11ax Draft 3 and newer. 

Change-Id: I20c842ff11ab449024c4fc1a0ef822c525ff40ec
CRs-Fixed: 2753170
2020-08-24 17:52:47 -07:00
Abhishek Ambure
fb27821b98 qcacmn: Enable CFR support for target QCA6750
Host enables CFR support for QCA6750 target.

Change-Id: I3e68d3984eef7faa94739a71124315336922e417
CRs-Fixed: 2754922
2020-08-24 12:40:16 -07:00
Neha Bisht
8ae1b8a9e3 qcacmn: Provide SON with per peer qos stats
Providing per peer QoS stats to SON via WDI event

Change-Id: Idd3cfbfec332269fdc8ad0ef273674e81d6ee92f
2020-08-24 05:55:22 -07:00
Srinivas Girigowda
8ea15d977b qcacmn: utils: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: I13d35cc81a4a3fdb8c798947845aca4f9e3fa97c
2020-08-23 23:09:54 -07:00