Commit Graph

8364 Commits

Author SHA1 Message Date
Vulupala Shashank Reddy
616976e2ce qcacmn: Add support to include ACK status and tx retry count
Extend radiotap header to append ACK status and tx retry count
for packets sent to virtual mon interface.

Change-Id: I51037ffd11dfdee49278d43643fb7861a514ee18
CRs-Fixed: 2627710
2020-02-26 22:39:17 -08:00
Nirav Shah
5ad9b66679 qcacmn: Disallow TKIP/WEP with HT supported client
As softap, send assoc failure if HT supported client try to associate
as WEP/TKIP pairwise key.

Change-Id: Ie33e5d83ec18e10aae51a4cc3515f754bd24774e
CRs-Fixed: 2623660
2020-02-26 20:47:06 -08:00
Amar Singhal
c0de18fdc6 qcacmn: Fix maximum bandwidth in regulatory rules
Regulatory rules cannot have maximum bandwidth more than the
width of the rule. Fix this logic for six ghz regulatory rules.

Change-Id: Icbd4eb95d4de54acaef0aa635c293451ba4e1987
CRs-Fixed: 2620699
2020-02-26 14:57:06 -08:00
Yeshwanth Sriram Guntuka
e71aeae1bd qcacmn: Set FIXUP_NBUF flag only on successful nbuf map
In the scenario where nbuf_map fails during packet
send in htc_issue_packets, restore_tx_packet done
as part of cleanup, does nbuf unmap even though map
failed.

Fix is to set the fixup_netbuf flag only if nbuf map
is successful.

Change-Id: I642eff15792a7e374434e5a7a05ad546af376b3a
CRs-Fixed: 2625765
2020-02-26 13:31:07 -08:00
hqu
e6d0730c6b qcacmn: Rename is_target_pdev_id to is_host_pdev_id
It's more suitable that rename is_target_pdev_id to is_host_pdev_id.

Change-Id: I5ec8971ac564e1a26f1b544f9bc2cc08e29f949d
CRs-Fixed: 2627802
2020-02-26 11:40:32 -08:00
Sumedh Baikady
d188789876 qcacmn: Enhancement in Minidump feature
Handle minidump logging using dynamic
configurablity options. Data structures
to be logged in minidump can be configured
using internal INI file.

Change-Id: I99f12b3f98c4a9c0e15c3e5d611019e6b8d0909a
2020-02-26 08:35:46 -08:00
Liangwei Dong
5d64a83690 qcacmn: Add pmksa based on SSID and cache id
For FILS pmksa cache, the pmksa add/del/query is based on SSID
and cache id. The current crypto pmksa cache API dosn't support
SSID and cache ID.

1. Add SSID/Cache ID support to pmksa API
2. Add RSN IE pmkid field based on SSID/cache ID

Change-Id: I1577c6293b75d6f8e6210f314dd83462e06d8190
CRs-Fixed: 2621860
2020-02-26 06:42:56 -08:00
Abhinav Kumar
edda5aa847 qcacmn: Send WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID flag to FW
Send new flag WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID through
11i offload param to indicate fw whether WLAN_SAE_SINGLE_PMK
feature is enable or not.

If flag is set, fw should use single PMKID for SAE roaming
between VSIE AP(s), else fw should complete roaming by
doing full SAE authentication.

Change-Id: I9c88772c9571230c38e2cfa41c8a0c79663572ab
CRs-Fixed: 2616046
2020-02-26 06:42:37 -08:00
Ananya Barat
cbee232e21 qcacmn: Do not allocate memory of size zero
In a few scenarios, the number of reg rules can be 0.  For example,
for  a  2Ghz-only radio  there are no 5Ghz reg rules.  In such cases,
if we try to allocate memory (0 bytes) the allocation function prints
an error message. Also, the allocation is not required. Therefore, avoid
the allocation when the number of rules is zero.

Change-Id: Ic9caf578541970e9cf12cdde181f23762f137db8
CRs-Fixed: 2622109
2020-02-26 04:54:08 -08:00
nobelj
d3a6d13d9f qcacmn: Fix to support ack ba status tlv comes twice
Sometimes ack ba status tlv comes twice which cause ppdu desc to be hold
as waiting for some more tlv as mpdu ack ba tlv is not matching with
completion common tlv mpdu count.

Change-Id: Id946ecd53018ee7abe93aa6c5f62e69d41b750e8
2020-02-25 21:59:08 -08:00
Liangwei Dong
4f2b0feab6 qcacmn: Fix memory leak in get_station_stats_cb
There is memory leak in get_station_stats_cb:
priv->vdev_summary_stats, priv->vdev_chain_rssi,
priv->peer_adv_stats. But the “request” is not leaked,
that means the “.dealloc” should be called.
The suspect is the get_station_stats_cb was called two
times with same cookie (request) before the "request"
was freed, that caused the priv->vdev_summary_stats
and the others two member of "priv" were overwritten,
and then memory leaks.

From the cp stats components there are multiple places
to call ucfg_mc_cp_stats_reset_pending_req to reset the
unused pending.req(has a cookie) to zero.  The zero
cookie may be used in again.

Change the ucfg_mc_cp_stats_reset_pending_req API to do
atomic operation of "reset" and "get" last pending
request.

Change-Id: I5efb7efec4da1edc0aab33b940dc126012a3f12e
CRs-Fixed: 2622444
2020-02-25 21:58:50 -08:00
Amit Shukla
28432f1195 qcacmn: Fix crash in frag path by using correct API to obtain PDEV
PDEV was being obtained using lmac_id by directly indexing the
pdev_list array. Instead, we need to use dp_get_pdev_for_lmac_id.

Change-Id: I1c4a0f3df5db59390e17666a5f712c5412e22bb1
CRs-Fixed: 2627909
2020-02-25 20:26:22 -08:00
Amar Singhal
c749787a01 qcacmn: Fix definition of function reg_freq_width_to_chan_op_class_auto
Fix definition of function reg_freq_width_to_chan_op_class_auto

Change-Id: I92504d992153f6ee2dd6d31b2d2976822505856a
CRs-Fixed: 2626433
2020-02-25 15:32:54 -08:00
Abhinav Kumar
0cb7296478 qcacmn: Optimize logs for roaming and tdls
Optimize logs for roaming and tdls

Change-Id: I55d3f1242c240064fe34dbfe6552ee5bae6522f6
CRs-Fixed: 2627699
2020-02-25 15:32:37 -08:00
Chaoli Zhou
588021e773 qcacmn: Pass shadow register address for IPA
Since it support PCIe shadow register for QCN7605,
and these shadow register also falls below 512K,
which can be used for IPA write directly without
windowing. So don't use the temporary PCIE_PCIE_SCRATCH_2
for IPA GSI write now, insteadly, passing the correct shadow
register of copy engine 5 to IPA.

Change-Id: Ica3a502b96e98ee6c07c1032760b5dcb512957d8
2020-02-25 14:03:43 -08:00
Ruben Columbus
e792f8bab3 qcacmn: adding doppler/SR for he information
Add doppler and spatial reuse in ppdu descriptor to be able to use it on
HE information for tx capture

Change-Id: Id87a692a89d00c64929624c22c2efc27bc873e43
2020-02-25 12:39:44 -08:00
Ashish Kumar Dhanotiya
48934773cd qcacmn: Reduce regulatory logging
As part of logging optimization, reduce the
logging from regulatory component.

Change-Id: If81f87b06e111cffb9189cae20a1acc66849678d
CRs-Fixed: 2624108
2020-02-25 10:59:06 -08:00
sheenam monga
d0a73c7a81 qcacmn: Introduce QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON
This attribute enables/disables the host driver to send roam reason
information in the reassoc request to the AP in the same ESS.

Change-Id: Ie2606012c0487936dd0b436f0d6a75d2e115f4b4
CRs-Fixed: 2627261
2020-02-25 08:03:56 -08:00
Alok Kumar
9cc180ec26 qcacmn: Avoid NULL pointer dereference in send_packet_completion
If cds_dp_open fails during driver load time, cds_close is
called in clean up path. During cds_close, HTC cleanup happens
which makes target->hif_dev = NULL and in send_packet_completion
target->hif_dev is dereferenced without NULL check.

Add NULL check before dereferencing target->hif_dev during
send_packet_completion.

Change-Id: I236a083e194bf1f16d261e6334ac512c4f6bcd94
CRs-Fixed: 2625690
2020-02-25 06:23:56 -08:00
guangde
7b4e341e81 qcacmn: HIF changes to support Genova
Add HIF changes for supporting the newly added USB bus type
for Genova.
FW team need athdiag tool to operate FW information. Host
driver need to pass the command and result between athdiag
tool and FW.

Change-Id: I6158a9f8c723a797d39beca09a913c7cb9e10025
CRs-Fixed: 2595515
2020-02-25 06:23:43 -08:00
Santosh Anbu
fdd3a5b314 qcacmn: Increase vdev id bitmap size
Add change to increase vdev id bitmap size to the number of vdev ids
bitmap as sent by the FW to avoid memory overflow on host.

Change-Id: I92a2ae31cf0079c989b1788afc61e7f3153dc426
CRs-Fixed: 2626887
2020-02-25 04:48:49 -08:00
Rakesh Pillai
8e01014b7d qcacmn: Add history for register write failure
Maintain a history of the register writes which
have failed. The failure of register write is
determined by reading back the register after
writing a value to that register. If the read
value does not match the value which was written
then it is termed as a failed register write.

Change-Id: Ic3423c2cbd74bf498c0d3dd8ee7ce4231054541a
CRs-Fixed: 2624475
2020-02-25 03:01:36 -08:00
Karthik Kantamneni
dfdfce1e58 qcacmn: Fix compilation error in vipertooth build
Fix compilation error in reg_country_opclass_freq_check
return false when HOST_OPCLASS is disabled.

Change-Id: Ib03e544311ae0a6c3496711f303ad17d490900ba
CRs-Fixed: 2624546
2020-02-24 23:37:15 -08:00
Vivek
10d8aff10e qcacmn: Use right API for retrieving pdev based on id
We are seeing a invalid memory access crash
in the dp_get_pdev_for_mac_id call from
dp_rx_process_invalid_peer, due to invalid mac id passed,
probably due to some stack correction.

We should instead use dp_get_pdev_for_lmac_id from
dp_rx_process_invalid_peer, where for invalid
mac id, we assert.

Change-Id: I0737132b5bbdd2fcbdb714d4643a69184ae3821e
CRs-Fixed: 2618432
2020-02-24 22:02:03 -08:00
Yu Tian
0108c7d032 qcacmn: update REO SSN when TX compl of ADDBA resp
There is possibility that DUT receives non-aggr frames
with non-aggr SN during BA setup during BA session
setup. SSN updates when ADDBA req is processed, should
also update REO SSN one more time when ADDBA resp sends
This will let REO to be able to receive frames in BA
session with new SN.

Change-Id: I4791bcd6f1ede90615c883d31426fcdecd50a631
CRs-Fixed: 2623505
2020-02-24 22:01:46 -08:00
Linux Build Service Account
be01c0d348 Merge "qcacmn: Add corresponding host wmi for roam reason vsie vdev param" 2020-02-24 08:43:32 -08:00
Srinivas Dasari
1be34597a9 qcacmn: New get_sta_info attrs for Beacon IE/disconnect reason
Add new attributes for getting the Beacon frame IEs and the
disconnection reason codes through get_sta_info vendor command.
Host driver provides this information in STA mode.
Add new attribute to get assoc request IEs of the disconnected
peer. Host driver provides this information in SAP mode.

The host driver shall give these attributes as a response to the
vendor command QCA_NL80211_VENDOR_SUBCMD_GET_STATION.

Add the below attributes in to be in sync with userspace,

QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_FAILURE
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_AVG_RSSI_PER_CHAIN
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_RETRY_SUCCEED
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_LAST_PKT_RSSI
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_RETRY
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_RETRY_EXHAUST
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_TOTAL_FW
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_RETRY_FW
QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_TX_RETRY_EXHAUST_FW

Change-Id: If2727ea4ecbb157035c0f4a989a1a936a5bca64c
CRs-Fixed: 2624843
2020-02-24 04:33:41 -08:00
Srinivas Dasari
83f9333682 qcacmn: Introduce QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON
This acts as an event from the host driver to the user space to notify
the driver specific reason for a disconnection. The host driver
initiates the disconnection for various scenarios (beacon miss, Tx
Failures, gateway unreachability, etc.) and the reason codes from
cfg80211_disconnected() do not carry these driver specific reason codes.
Host drivers should trigger this event immediately prior to triggering
cfg80211_disconnected() to allow the user space to correlate the driver
specific reason code with the disconnect indication.

Change-Id: I6337c02a3508c7ce282f0e3e947d7592e8550308
CRs-Fixed: 2624841
2020-02-24 04:33:27 -08:00
Venkata Sharath Chandra Manchala
607f32711f qcacmn: Increase the CE2 source entry buffer size
Allocate a buffer of size 4096 bytes for each buffer
posted to CE2 source/destination ring.

Change-Id: I0beb1e4e87c19508917e8564b441819031be2065
CRs-Fixed: 2619899
2020-02-23 22:43:30 -08:00
Hariharan Basuthkar
a6d77e7dbd qcacmn: Start Host wait timer and then send radar_params to FW
When radar is detected on a channel and the radar parameters are sent to
FW, the Host Wait Timer expires even though the action status is
received from FW. At this point, the VAP state machine sends a
multivdev restart on the target channel, and is in restart progress
substate.

Since the Host Timer expires due to some reason, radar detect event is
posted to vdev state machine, that is currently in restart progress
state and, this causes a target assert and leads to kernel panic.

This issue is solved by the following 2 ways:
1) Start the host wait timer first, and then send the radar found
   params to the target.
2) Check if dfs_is_host_wait_running is true, in the Host Wait Timer's
   timeout, and only then call the radar_found_action_generic API.

Change-Id: I9b93c7c1822966f7d6bc00c00229849fdb5627d9
CRs-Fixed: 2604173
2020-02-21 21:27:51 -08:00
Linux Build Service Account
b5bc05ee3f Merge "qcacmn: Ignore rx hw stats reo command status callback" 2020-02-21 15:10:09 -08:00
Nirav Shah
47fdeadbd1 qcacmn: Enable Shadow register from PCIe block in QCN7605
QCN7605 has 2 set of shadow registers, WCSS block and PCIe block.
As PCIe shadow register are at power domain boundary, enabling
PCIe shadow register for QCN7605.
Also PCIe shadow register falls below 512KB, no need to use register
windowing which is required to get it access from IPA FW

Change-Id: If18d2d0a3f16f492b3c32449695e70c2b9942375
CRs-Fixed: 2623853
2020-02-21 06:08:41 -08:00
Dundi Raviteja
459060642c qcacmn: Add wmi interface changes to extract mgmt offload event
Add wmi interface changes to extract mgmt offload event params
when WLAN_FEATURE_PKT_CAPTURE is enabled.

Change-Id: Icacd65a99953fdc77b2c6823e9d26baaed3737c8
CRs-Fixed: 2619316
2020-02-20 21:36:26 -08:00
Abhinav Kumar
90d227ce32 qcacmn: Support sae single pmk roaming BSS in scan
"WPA3-SAE Single PMK" is a feature by which STA can
complete SAE roaming to specific group of AP(s) using
single PMK. This is done with the help of advertising
vendor specific SAE single PMK IE in the beacon/probe.

When vendor specific sae single pmk IE (oui 0x00 40 96,
type 0x03) is present in the beacon/probe of AP then the
BSS supports WPA3-SAE roaming using Single PMK.

Add changes in scan module to parse the Vendor specific
SAE single PMK IE and copy it to the scan_entry ie_list.

Change-Id: I5b7096d1360c624ce1c47e56e8cad37adbdda1e3
CRs-Fixed: 2616099
2020-02-20 18:11:53 -08:00
Nandha Kishore Easwaran
f5bf6a10e8 qcacmn: Donot deinit timer if it expired
Do not deinit timer if it has expired since expired timers are
automatically removed from timer list. Only deiniit and delete timer
if it is still running and FW response has been received

Change-Id: I0eb839ba152a20d9da37e1249aa0e4c0543eb494
2020-02-20 14:49:15 -08:00
sheenam monga
5e4030f6c3 qcacmn: Introduce QCA_WLAN_VENDOR_ATTR_BEACON_REPORT_FAIL
This attribute aims the STA to send the Beacon Report response
with failure reason for the scenarios where the Beacon Report
Request cannot be handled.

Change-Id: I1b57d1c810deee4545c9a3b84b45ab5bd539d9bb
Crs-Fixed: 2622023
2020-02-20 12:25:30 -08:00
Jeevan Kukkalli
e795cc17aa qcacmn: Add NULL check for peer mac
Add NULL check for peer mac before accessing it.

Change-Id: I039aa22d81c0e6a192c816c395cebefa4eaf3b82
CRs-Fixed: 2622011
2020-02-20 12:25:14 -08:00
Ananya Barat
9a4c328738 qcacmn: Populate the correct opclass for 6G channels
For the 6G band, the only valid opclass_table is the global_op_class
as per the current specification. Therefore, if the band is 6G set the
opclass to global_op_class instead of the default us_op_class.

As per specification for chan width 40 MHz, there is no behav limit
for both Low Primary and High Primary channels. Hence, set behav limit
as BIT(BEHAV_NONE) if channel width is 40 MHz.

Change-Id: I534f5b898e10cf21042a117aa71e824a85d73fb3
CRs-Fixed: 2608059
2020-02-20 08:33:03 -08:00
Himanshu Batra
7e8e1a229c qcacmn: Move _ol_ath_param_t enum out from CDP
Add code to move enum _ol_ath_param_t out from common DP code
and move it into OL layer

Change-Id: I92fa5f52c581a18449ab42da41ff5f6f1a2bc595
Crs-Fixed: 2560866
2020-02-20 08:32:47 -08:00
Aditya Sathish
6287db0784 qcacmn: Add 6GHz support for chan/freq/band usage in scan
Currently the conversion APIs used doesn't take into account
the overloading of channel numbers between 6GHz, 5GHz and 2.4GHz
bands.

Add support to obtain the correct channel number (and auxiliary
information like band and frequency) through the new APIs that
support all three bands.

Change-Id: Ic2c8dfa4cc845d701dfd07df61c9ae1ee3d8bdef
CRs-Fixed: 2610378
2020-02-20 08:32:32 -08:00
Aditya Sathish
14e285e95c qcacmn: Add 6GHz support for chan/freq/band usage in dfs/reg
Currently the conversion APIs used doesn't take into account
the overloading of channel numbers between 6GHz, 5GHz and 2.4GHz
bands.

Add support to obtain the correct channel number (and auxiliary
information like band and frequency) through the new APIs that
support all three bands.

Change-Id: Ief417f14620bc2fc02d76fea3642b6fbb9615916
CRs-Fixed: 2610378
2020-02-20 08:32:16 -08:00
Aditya Sathish
041409f98f qcacmn: Add 6GHz support for chan/freq/band usage in mesh mode
Currently mesh mode uses channel numbering which is derived
from APIs that don't support 6GHz channels numbering due to the
overloading of 6GHz channels with 2.4GHz and 5GHz.

Add support to obtain the correct channel number (and auxiliary
information like band and frequency) through the new APIs that
support 6GHz.

Change-Id: Ib0b39ebae2a22bd6b2b5d17b9058c3c2100e0d59
CRs-Fixed: 2605229
2020-02-20 08:32:09 -08:00
Manjunathappa Prakash
c4667b8b12 qcacmn: Save Rx TLV offset info so as to recover in FISA
Packets delivered to FISA via exception err path doesnot have TLVs.
FISA handling requires additional TLVs. dp rx core handling
skips TLVs, save TLV length info in nbuf->cb so that TLVs
are recovered back in FISA.

Change-Id: I53fab2e19abcbf82697ea6f53a4ddf3ea0dd0699
CRs-Fixed: 2620844
2020-02-20 06:39:48 -08:00
Rakesh Pillai
ff26d1c783 qcacmn: Add stats for register write failure
Sometimes the register write in windowed region
are not going through, thereby retaining the
previous value, which can be incorrect for a
certain mode of operation for the driver.

This kind of incorrect register values, due to
a register write not succeeding, can lead to
unwanted issues. Also the simple logging of
any such occcurence can be over-written in the
logs, thereby going unnoticed.

Add a HAL level statistics to maintain the
count of such failed register writes.

Change-Id: Ib5e98705c23f0c916cb85f518576663710eb30e0
CRs-Fixed: 2611839
2020-02-20 04:52:12 -08:00
gaurank kathpalia
b73ede30b8 qcacmn: Add support for NAN msg in kmsg
Add support for the following NAN messages in kmsg:-
1. NAN enable status
2. NAN, NDP match events
3. NDP channel info.
etc.

Change-Id: I7f67b67153904b7efe8a708e3f93d069e399395c
CRs-Fixed: 2618433
2020-02-20 01:09:04 -08:00
Sravan Goud
5fd5cf65e2 qcacmn: In case of peer reuse set valid flag
Currently if peer reference is reused valid flag is not set.
In peer delete function if valid flag is not set, function
returns with out decrementing the ref count and also not
releasing the local id. This leads to local id exhaustion if
back to back peer reuse happens which is common in case of back
to back roaming to same AP. As a result connection to AP fails
due to unavailability of local id. In this change set valid flag
if peer reference is reused.

Change-Id: Ibeccbc4d33aac9e4285b48a4b8abdd2276fd7ede
CRs-Fixed: 2624798
2020-02-19 22:18:47 -08:00
nobelj
b621cabe85 qcacmn: Fix ppdu stats for disassoc frame
For Disassoc frame, fw send ppdu stats to host with peer_id
of the previous associated client. peer id is valid and peer
structure is NULL making framectrl as zero for disassoc frame.
with the fix frame ctrl are populated before checking for invalid peer.

Change-Id: I5960685a4c90f00a850f4f1fa2b3d883117fb443
2020-02-19 20:46:01 -08:00
Ashish Kumar Dhanotiya
07810f61ce qcacmn: Reduce logging while printing channel list
As part of logging optimization, reduce logging while
printing channel lists.

Change-Id: I0241dc4dbaa3879bbe354a0e4750a0d559d1ba40
CRs-Fixed: 2624517
2020-02-19 19:26:27 -08:00
Tiger Yu
a3a9160cf8 qcacmn: Destroy the queue_kicker work which is triggered by RPM resume
There might be a race condition between htc_kick_queues which is sheduled
by RPM resume and hdd_wlan_stop_modules.

Here are detail info:
1. Run time resume is called, which will schedule a work to do the
   htc_kick_queues later.
2. hdd_wlan_stop_modules is called at the same time, which will call
   htc_destroy to free the HTC_TARGET.
3. the htc_kick_queues will access the HTC_TARGET, but it has been
   freed.

Change-Id: I7211a8eef2a2f1924fe91eafec5a4496eea5a507
CRs-Fixed: 2622317
2020-02-19 16:08:43 -08:00
Gurumoorthi Gnanasambandhan
c4880c3a0b qcacmn: WMI tlv support to profile commands
WMI_WLAN_PROFILE commands support for tlv path.
Add WMI profile enable and trigger commands in tlv path

Change-Id: I10f867b181b559b82c097d6a61236f2145549238
2020-02-19 10:08:40 -08:00