Commit gráf

8492 Commit-ok

Szerző SHA1 Üzenet Dátum
Ramanathan Choodamani
1f9ff8a62c qcacmn: Add radiotap_num_to_freq() for correct Channel frequency
Function added to convert given channel number to correct
channel frequency using the Channel center frequency and
populate it correctly inside the radiotap header

Change-Id: Iea2a9ee7d496b2aa0dbf8d6741a32d2dbfa3503d
CRs-fixed: 2637424
2020-03-31 04:11:16 -07:00
aloksing
4b45241915 qcacmn: Add check for NULL pointer
Pointer rx_msdu_link_desc returned from call to function
dp_rx_cookie_2_mon_link_desc which may be NULL and may be
de-referenced latter

CR-Fixed: 2645199
Change-Id: I9ccba61df9571fcc99c5d5493194d5ae43a71a7f
2020-03-31 04:11:00 -07:00
Padma Raghunathan
e7d986e168 qcacmn: Avoid to use WIN only APIs
Avoid to use WIN only APIs. This is part of moving CFR to hostcmn.

Change-Id: Ib6be520657b5e6d42eaed4d9c3a3940c691e9d84
CRs-Fixed: 2637130
2020-03-31 00:43:55 -07:00
Wu Gao
ce9aa9088e qcacmn: Fix compilation issues
This is part of moving CFR component to hostcmn. Fix compilation
issues in this change.

Change-Id: Ia0a40da1e7e9201ffc5d1700cccea4181b358842
CRs-Fixed: 2637129
2020-03-30 22:56:08 -07:00
Srinivas Pitla
ebf2f5aa58 qcacmn: update ba_size only when ba_size is 0
For ACK completion, update ba_size, ba_bitmap, ba_seqno
only if these are not updated earlier.

This fix updates ba_size, ba_bitmap, ba_seqno for QOS TID frames
in ACK completion handler, if these are not updated earlier.

CRs-Fixed: 2650482
Change-Id: I1d5f4bdb29a3d5194cd4a1544b39d6aa42903b1b
2020-03-30 17:11:16 -07:00
Yeshwanth Sriram Guntuka
d3db10ec5b qcacmn: Add support to log ce hang event info
Add hif APIs to support logging of ce hang event
data.

Change-Id: I9b930d5f983d57a7359ba9f97ea65050c4f54a8a
CRs-Fixed: 2649148
2020-03-30 17:11:00 -07:00
bings
f5067f066b qcacmn: Return invalid agile detector ID if agile dfs is not supported
When QCA_SUPPORT_AGILE_DFS is not defined, dfs->dfs_agile_detector_id
will not be set and it will be 0, which is also a meaningful detector id.

Currently, if radar_found->detector_id is not set, or set as 0, the
detector ID is recognized as a valid agile detector which is incorrect.

Return invalid agile detector id if agile dfs is not supported.

Change-Id: I259fa6f3f9fbcb4a76567090a8f084e15ee6af93
CRs-Fixed: 2646946
2020-03-30 15:29:34 -07:00
Gurumoorthi Gnanasambandhan
806b7c72df qcacmn: Beacon protection support
Changes to support Beacon protection. Additional key ix 6 and 7
support BIGTK. Update beacon template for Beacon protection support.

CRs-Fixed: 2632290
Change-Id: Ic37d17f5076bb28d2e1f2430da039cc8b9f759b6
2020-03-30 13:40:07 -07:00
Wu Gao
a308b3e970 qcacmn: Add CFR files for QCA6490
Since there are chip differences about channel frequency response. Add
files for QCA6490. This change also adds CFR configure file

Change-Id: Ib200affe4c68dac5535c4a3d65109072559161ff
CRs-Fixed: 2637134
2020-03-30 13:39:43 -07:00
Hariharan Basuthkar
7165baf6ce qcacmn: Add BW macros and rename wlan_reg_country_opclass_freq_check
Add the macros BW_5_MHZ, BW_10_MHZ, BW_20_MHZ, BW_25_MHZ, BW_40_MHZ
to denote channel width and define them as 5, 10, 20, 25 and 40
respectively.

Also rename the API wlan_reg_country_opclass_freq_check to
wlan_reg_is_freq_in_country_opclass.

Change-Id: I6838bd87a9b8d0754909cea414ada4b09ed01643
CRs-Fixed: 2646416
2020-03-30 01:14:51 -07:00
Naga
b805e1fa7b qcacmn: Remove redundant data structure for wmi response extraction
Remove redundant data structure at wmi for vdev delete
response extraction, instead use mlme host data structure.

Change-Id: Iedb4280fb47d6567bc4d7b663ecd6af5e769ddfc
CRs-Fixed: 2641197
2020-03-29 23:02:40 -07:00
Naresh Parat
0e1692f8e7 qcacmn: Add third argument to WMI_DBGLOG_CFG_CMDID
This will allow dbglog_cmd in non-tlv path
Since the fw_header structure "struct dbglog_config_msg_s" variable
"cfgvalid" increased size by one

Change-Id: I0ea9782895083b88250e9187e95456f57fa948b9
CRs-Fixed: 2626544
2020-03-29 07:29:11 -07:00
Pragaspathi Thilagaraj
d449534d0b qcacmn: Fix null pointer dereference at extract_11kv_stats_tlv
In function extract_roam_11kv_stats_tlv, the 11kv channels
tlv is read from the roam_neighbor_report_chan_info tlv if the
neighbor_report_channel_count in roam_neighbor_report_info tlv
is greater than 0. But in some cases, firmware sends value
in the roam_neighbor_report_info->neighbor_report_channel_count
but the roam_neighbor_report_chan_info tlv is not present.

Log error and return if
roam_neighbor_report_info->neighbor_report_channel_count is not
0 and roam_neighbor_report_chan_info tlv is null.

Change-Id: I7fa17d3afaf9d7e6736ad96c60bc5013197480f3
CRs-Fixed: 2644308
2020-03-28 22:00:10 -07:00
Saket Jha
07622e4108 qcacmn: Fix double unmap issue in HTC misc list
Add mutex protection while freeing pkts in HTC misc list to prevent
double unmap of netbuf.

Change-Id: I5c52324e382f8047037ca1d1a50367bc6052b737
CRs-Fixed: 2646771
2020-03-28 12:16:24 -07:00
Jinwei Chen
248f7bd35a qcacmn: fix invalid net_dev fetched from gro queue skb
Dp_rx_vdev_detach() will flush all gro skb to make sure the
net_dev stored in skb is valid before this vdev is down, but
dp_rx_vdev_detach() is only invoked at the end of function
dp_vdev_detach_wifi3(). for some case, if there is still dp_peer
pending when execute dp_vdev_detach_wifi3(), dp_rx_vdev_detach()
won't be invoked.
  Move dp_rx_vdev_detach() before pending peer detection in
dp_vdev_detach_wifi3() so that gro queue skb flushing can be
executed each time.

Change-Id: I0feea5b77de7efab884c0e5822c8671119892f7d
CRs-fixed: 2649385
2020-03-27 22:40:43 -07:00
Vignesh U
c91b3875a7 qcacmn: Assign bin5 radars to MKKN DFS domain
MKKN domain should detect the bin5 radars of MKK4 DFS domain.

Add the bin5 radars to the MKKN domain's bin5 radar table.

Change-Id: I0d0fbe91e56f4a290a675832fe4b9974f9afbf0d
CRs-Fixed: 2645168
2020-03-27 16:43:18 -07:00
Shashikala Prabhu
ee42cb1f26 qcacmn: Use chan freq for restricted 80+80 MHz boundary check
Instead of channel number, use channel frequency for restricted 80+80MHz
boundary  check.

Change-Id: I2fa65c3b1d102acd6b64b4c6e1583d2bc29484d1
CRs-Fixed: 2645155
2020-03-27 15:00:05 -07:00
Wu Gao
cd6291c3a0 qcacmn: Add addition CFR capture type to filter all NDPA NDP frames
Add QCA_WLAN_VENDOR_CFR_NDPA_NDP_ALL in enum
qca_wlan_vendor_cfr_capture_type. This capture type requests all NDPA
NDP frames to be filtered.

Change-Id: I2003975012ad1c486b18a460c8ef2e691379d3d9
CRs-Fixed: 2649260
2020-03-27 12:29:01 -07:00
Wu Gao
bea94af394 qcacmn: Change CFR attributes from required to optional
Some CFR attributes are used frequently with conditions, so change them
from required to optional.

Change-Id: I835906d314bfb4d94100ba7794603de1c2dbcc8d
CRs-Fixed: 2649263
2020-03-27 12:28:44 -07:00
Wu Gao
7c9caaf417 qcacmn: Extend attributes to support enhanced CFR capture
Enhanced channel frequency response supports to capture channel status
information based on RX. Define previous CFR as version 1 and enhanced
CFR as version 2. If target supports both versions, two versions can't
be enabled at same time. Extend attributes for enhanced CFR capture in
enum qca_wlan_vendor_peer_cfr_capture_attr.

Change-Id: If9a5e387f03981eb75f98138fe555f4489ccb377
CRs-Fixed: 2641774
2020-03-27 12:28:28 -07:00
Wu Gao
2b64dc198a qcacmn: QCA vendor subcommand and attributes to configure capture of CFR
Add a subcommand for Channel Frequency Response (CFG) Capture
Configuration and define attributes for configuring CFR capture
parameters per peer and enabling/disabling CFR capture.

Change-Id: I94869b06f8e7eb499ebed8d49e99b342907a9aa1
CRs-Fixed: 2647239
2020-03-27 12:28:12 -07:00
Sourav Mohapatra
bdcd6ce25e qcacmn: Add appropriate hang reason codes for various scenarios
Presently, the reason codes for driver to trigger recovery on are
limited in their scope; most of the scenarios are not correctly
capture.

Add new reason codes to cover all the possible scenarios where the
driver has need to trigger recovery.

Change-Id: Ia257855bc30cd0bc7e81b9d0e21e4b84427d546b
CRs-Fixed: 2630951
2020-03-27 10:20:02 -07:00
Sourav Mohapatra
1f21eadadf qcacmn: Extend qdf_trigger_self_recovery to include psoc granularity
To undergo self recovery, the driver uses qdf_trigger_self_recovery to
initiate the sequence. Currently, this framework is valid for only a
single psoc driver.

Extend this framework to include support for multiple psoc driver by
providing the psoc on which the recovery has to be undertaken.

Change-Id: I782b505c03819223a914dabe7673b369aa175b7c
CRs-Fixed: 2617707
2020-03-27 10:19:41 -07:00
Sourav Mohapatra
1b11ea9161 qcacmn: Add hang reason codes to QCA_NL80211_VENDOR_SUBCMD_HANG
Add more hang reason codes for the hang reason in the
QCA_NL80211_VENDOR_SUBCMD_HANG events. This also introduces the
attribute QCA_WLAN_VENDOR_ATTR_HANG_REASON_DATA to carry the required
data for the respective hang reason. This data is expected to contain
the required dump to analyze the reason for the hang

Change-Id: I4912f896d394667055937faf68c9ceb32a469978
CRs-Fixed: 2650292
2020-03-27 10:19:24 -07:00
Ashish Kumar Dhanotiya
18d4b6fe84 qcacmn: Update the mc timer state after its deleted
Currently qdf mc timer stop api updates mc timer state
to QDF_TIMER_STATE_STOPPED before it deletes the timer which
may lead to race condition where if any other thread tries to
read the state of the timer and re-start the timer considering
it is stopped which may get deleted after that.

To address above issue, update the timer state after timer
delete.

Change-Id: I302b89bdedf23f8277eacb6d42b5bd8e6daa4d05
CRs-Fixed: 2643254
2020-03-27 06:29:16 -07:00
sheenam monga
c50efb4f56 qcacmn: Add Support for ACTION_CATEGORY_RVS
Currently, mgmt_txrx_get_action_frm_subtype does not handle
ACTION_CATEGORY_RVS. In case action_category is
ACTION_CATEGORY_RVS, mgmt_txrx_get_action_frm_subtype
returns MGMT_FRM_UNSPECIFIED due to default handling. Function
tgt_mgmt_txrx_rx_frame_handler returns QDF_STATUS_E_FAILURE
on receiving MGMT_FRM_UNSPECIFIED frame type and drops mgmt
frames.

Fix is to add support for ACTION_CATEGORY_RVS in
mgmt_txrx_get_action_frm_subtype to avoid drop of MCSC
frames. Add new management frames MGMT_ACTION_SCS_REQ,
MGMT_ACTION_SCS_RSP, MGMT_ACTION_GROUP_MEMBERSHIP_REQ,
MGMT_ACTION_GROUP_MEMBERSHIP_RSP, MGMT_ACTION_MCSC_REQ,
MGMT_ACTION_MCSC_RSP and new element ACTION_CATEGORY_RVS
in mgmt_action_category. mgmt_txrx_get_action_frm_subtype
Finds rvs frame subtype and returns subtype instead of returning
MGMT_FRM_UNSPECIFIED.

Change-Id: Iad1abac120770724f9ae6d86f524c4d722fb0aaa
CRs-Fixed: 2649900
2020-03-27 06:28:59 -07:00
Yeshwanth Sriram Guntuka
4326a54376 qcacmn: Add qdf API to check for configured packet types
Add qdf API support to check if the packet should be
tracked as per the configured protocol types.

Change-Id: Ia9e937865d3d440f1350307a67e32b20ea218e54
CRs-Fixed: 2642156
2020-03-27 01:21:14 -07:00
Manoj Ekbote
1c1ef8c2bd qcacmn: Print re-queue message based on threshold
When packet tx fails at transport layer, packet is re-queued and given to
HIF layer again. In this change, print the warning message about re-queue
only when tx fails for 5 consecutive attempts due to no resources
available at HIF layer.
Since re-queuing is not fatal, it need not be printed on every attempt.

Change-Id: I00082470420e29dfe4fb7a745ac709a682ba032e
CRs-Fixed: 2621763
2020-03-26 20:18:56 -07:00
Naga
c6e9bd033c qcacmn: Remove redundant data structure for wmi response extraction
Remove redundant data structure at wmi for vdev delete all peer
response extraction, instead use mlme host data structure.

Change-Id: Ice91f55e0bf8a23ea1a639a74f6a8ac3b2779a7b
CRs-Fixed: 2641261
2020-03-26 14:26:57 -07:00
sheenam monga
06869dc028 qcacmn: Send oce_ap_tx_pwr_weightage_pcnt to firmware
In struct weight_config, "oce_ap_tx_pwr_weightage" added newly.
Station uses "oce_ap_tx_pwr_weightage" as one of the parameter for
selecting AP candidate during initial connection. Host sends
"oce_ap_tx_pwr_weightage" ini value to firmware over WMI command
WMI_ROAM_AP_PROFILE.

Add oce_ap_tx_pwr_weightage in scan object scoring param to calculate
weightage based on AP tx power and select candidate accordingly.

Change-Id: I7f717e9cc398e8b9307f2f464f972b095c06364b
CRs-Fixed: 2647116
2020-03-26 07:13:13 -07:00
aloksing
d201c0e789 qcacmn: Add NULL check for regulatory psoc
reg_get_psoc_obj may return NULL.
Add check if regulatory psoc is NULL and return QDF_STATUS_FAILURE.

CR-Fixed:2648152
Change-Id: I9637fa367873cd62fa18d1f5ecd80f6fe454558b
2020-03-26 07:12:59 -07:00
Wu Gao
8940e61395 qcacmn: Use qdf streamfs APIs to replace qal streamfs APIs
Use qdf streamfs APIs to indicate data to user space. This is part of
moving CFR component to hostmn.

Change-Id: I2abc46fdfb36d24eef201ab21f5744d951595ea1
CRs-Fixed: 2637128
2020-03-26 05:26:21 -07:00
Nisha Menon
df7fb3627f qcacmn: Disable the PCIE scratch reg write for wake req handshake
Disable the PCIE scratch reg read/write to wake up PCI bus.
This fixes the PCNOC error seen during boot up on writing to
the PCIE scratch register.
Enable DEVICE_FORCE_WAKE_ENABLE feature flag to enable
PCIE sracth reg read/write.

Change-Id: If4efd0afbddf97462bf9d0f06d0085c0a5b37a64
CRs-Fixed: 2636160
2020-03-25 22:30:43 -07:00
Ashish Kumar Dhanotiya
ec326a7ae8 qcacmn: Address synchronization issue in 11d state machine
Currently whenever host gets an indication for the cc event
list, it starts 11d machine and inside 11d state machine,
it decides that whether host needs to send start 11d scan
command to fw or stop 11d scan command to fw, based on that it
updates the enable_11d_supp variable of regulatory psoc private
object and posts the message to scheduler.
FW expects that host should not send back to back 11d start
scan command, there should be one 11d stop scan command before
next 11d start scan command is sent if already one 11d start
scan command is sent.
Host 11d state machine takes care of the above sequence
of 11d scan command by using enable_11d_supp. 11d state machine
sets enable_11d_supp whenever 11d scan start command needs to
be sent and resets enable_11d_supp whenever 11d scan stop
command needs to be sent and posts the message in the scheduler.
There is a case where if host receives the 11d cc event from FW
it sends the set country command to FW and at the same time if
user command comes to set the country, host again sends the set
country command to FW. FW processes both of these commands and
sends the cc list event to host. when host receives cc events
it starts the 11d machine. For the first cc event which is for
11d country which is processed as user country because of
incorrect logic in reg process master channel list where it is
assumed that at a time only one type of country set command can
be pending and first priority is given to the user country pending,
host resets enable_11d_supp and post the command to scheduler.
When host receives the cc list event for the user country it is
processed as 11d country and inside 11d state machine it sets
enable_11d_supp and posts the command to scheduler.
Now if scheduler schedules these commands it treats both the
commands as start 11d scan commands as enable_11d_supp is set
and sends start 11d scan command back to back.
To avoid above issue, add enable_11d_supp also as part of
the scheduler msg body pointer along with the psoc, in she
scheduler callback use this local variable to decide whether
11d start scan needs to be sent or 11d stop scan needs to be
sent.

Change-Id: I60150da1475251a1c22778a0f924bdfbe1bb1140
CRs-Fixed: 2641803
2020-03-25 22:30:17 -07:00
sumedh baikady
e7e15e5d88 qcacmn: Convert GI and LTF to radiotap defined values
The HE GI and HE LTF values are obtained from phy
TLVs in monitor path. The stats used in host have an
enum defined used by other upper layer code.

The radiotap spec defines different set of enums.

Add translation function to convert host stats enum
to radiotap defined enum for sniffer capture purpose.

Change-Id: I8c76adb42b0623e83958f7a37147b74e72b1ce74
CRs-Fixed: 2636051
2020-03-25 22:29:56 -07:00
Srinivas Dasari
04e3179b45 qcacmn: Add NAN and TDLS cases for qdf_opmode_str
Add cases for NAN and TDLS in qdf_opmode_str to return the mode
in string format.

Change-Id: Ibdc22a337005d56485e5ee3b392f4d5d0089304a
CRs-Fixed: 2648590
2020-03-25 19:11:14 -07:00
Qun Zhang
4bc614dd0c qcacmn: Replace QDF_MAX_NUM_CHAN with NUM_CHANNELS to aviod OOB access
Currently QDF_MAX_NUM_CHAN and NUM_CHANNELS aren't aligned, this unalignment
may cause many potential OOB access. So replace QDF_MAX_NUM_CHAN with
NUM_CHANNELS to keep unified.

Change-Id: I7bf7829d776f7caf5b2afbd2c9fd0c20d608e630
CRs-Fixed: 2644073
2020-03-25 07:09:34 -07:00
Padma Raghunathan
cd48f1cca3 qcacmn: DBR: Fix macros used to get/set entries in DBR ring
Fix incorrect usage of WMI_HOST_F_MS and WMI_HOST_F_RMW APIs
in DBR layer.

Change-Id: Ia0f8ebd2d24ca9648b34440f0197473243441951
CRs-Fixed: 2643586
2020-03-25 02:05:56 -07:00
Padma Raghunathan
cf4f404f0f qcacmn: Add new file to hold CFR specific configuration
Add new file to exchange CFR config with userspace

Change-Id: Ia66dfdcd1f121699f04b579c9867a9f78286a4f8
CRs-Fixed: 2639069
2020-03-24 23:58:08 -07:00
Naga
c0cb57c6fc qcacmn: Remove redundant data structure for wmi response extraction
Remove redundant data structure at wmi for vdev start
response extraction, instead use mlme host data structure.

Change-Id: Ie0d3e6fa0acb1fea8bc0f50095491dbe803f6810
CRs-Fixed: 2641085
2020-03-24 21:38:47 -07:00
Jinwei Chen
b3e587db52 qcacmn: Support RX 2K jump/OOR frame handling from REO2TCL ring
Support RX 2K jump/OOR frame handling from REO2TCL ring.
(a) configure REO error destination ring register to route 2K jump
/OOR frame to REO2TCL ring.
(b) for 2K jump RX frame, only accept ARP frame and drop others,
meanwhile, send delba action frame to remote peer once receive first
2K jump data.
(c) for OOR RX frame, accept ARP/EAPOL/DHCP/IPV6_DHCP frame, otherwise
drop it.

Change-Id: I7cb33279a8ba543686da4eba547e40f86813e057
CRs-Fixed: 2631949
2020-03-24 19:58:16 -07:00
Aniruddha Paul
b869cb0dde qcacmn: Add jitter stats to per tid Object
Add average jitter, average delay, and total success
packet count stats to per TID object.

Change-Id: Ic3ae6d4c090a5fe82e09c085e92cd5eaea4d2056
2020-03-24 19:57:54 -07:00
Linux Build Service Account
546df98c1c Merge "qcacmn: Use right macro to enable delayed register writes" 2020-03-24 15:13:08 -07:00
Linux Build Service Account
1d3f03598b Merge "qcacmn: Confirm HP register init when enabling IPA pipes" 2020-03-24 15:13:07 -07:00
Gerrit - the friendly Code Review server
b406d8b014 Merge changes into wlan-cmn.driver.lnx.2.0 2020-03-24 14:39:44 -07:00
Mohit Khanna
db3f6a4b8c qcacmn: Use right macro to enable delayed register writes
Fix macro name to enable delayed register writes.
Donot use delayed register writes for non fastpath access.

Change-Id: I235116ab3df5cb26bbfbb72de4ac6ed4b363a13a
CRs-Fixed: 2645865
2020-03-24 14:39:10 -07:00
Rakesh Pillai
99e3c8b80e qcacmn: Confirm HP register init when enabling IPA pipes
As a part of enabling IPA pipes, the WBM2SW2 head
pointer register is written with the number of
buffers which have been allocated initially. This
register write is a critical one and failure in
writing this register can be fatal.

Confirm the written value, when initializing
the HP register for WBM2SW2 (for IPA).

Change-Id: Ib2da3a7aa6096375cf64857721619f47c50658de
CRs-Fixed: 2620750
2020-03-24 14:38:55 -07:00
Lihua Liu
286b038d12 qcacmn: Add workaround for TXDMA HW limitation
Per HW team's analysis, we find a TXDMA HW limitation:
ADDR0&0x1FFFFFFF8 should not equal ADDR1&0x1FFFFFFF8.
Otherwise, TXDMA will run into exception, which cause TX fail.
ADDR0: the address of last words in previous buffer;
ADDR1: the address of first words in next buffer;

We hit this limitation in NAT forward TSO jumbo case whose buffer
address of two fragments like below:
tso_frags = (
(length = 0x42, vaddr = 0xFFFFFFD0F5FA2F82, paddr = 0x1F5FA2F82),
(length = 0x05A8, vaddr = 0xFFFFFFD0F5FA2FC4, paddr = 0x1F5FA2FC4)
In this case, ADDR0 = 0x1F5FA2F82 + 0x42 -2 = 0x1F5FA2FC2,
ADDR1 = 0x1F5FA2FC4, then
ADDR0&0x1FFFFFFF8 = ADDR1&0x1FFFFFFF8.
To avoid this, shift server bytes for ADDR0.

Change-Id: Ib09afd7e4c14a33bb5347c68b602b360a9e36619
CRs-Fixed: 2585868
2020-03-24 10:25:14 -07:00
Wu Gao
577bdfe20e qcacmn: Add dp interface to enable/disable reap timer
Enhanced channel frequency response (CFR) based on monitor status
ring, need to enable mon reap timer before starting CFR and disable
the timer after stopping CFR capture. This change adds interface to
enable/disable monitor status ring's reap timer.

Change-Id: I843433ac07c4d55e14b42855ee22779eb7ecb678
CRs-Fixed: 2639307
2020-03-24 10:24:50 -07:00
aloksing
c359013b26 qcacmn: fix oob array issue
Array oob due unsigned and signed compare.
Release ref only if vdev id is less than num vdev.

Change-Id: I9a48d7bb9f64539b4974a5323ab1df35d4bc0228
2020-03-24 06:43:22 -07:00