提交图

9045 次代码提交

作者 SHA1 备注 提交日期
Rakesh Pillai
28f1bf3f4e qcacmn: Invalidate ring desc cookie after processing
Currently all the rx ring descriptor contents are left
intact even after these entries are processed. This can,
at times, lead to stale entries being processed, if the
head pointer of any ring is updated before the updated
contents of the ring descriptor gets reflected in the memory.

This can lead to scenarios where the host driver reads a
stale value of sw_cookie, and free/unmap a currently in-use
buffer, thereby leading to the hardware accessing unmapped
memory region.

The sw_cookie is the integral part of al the rx ring
processing. Hence we always mark the sw_cookie as invalid
after dequeuing an entry from the REO2SW ring. Every time
we check for the validity of the sw_cookie before we try to
process an entry from REO2SW ring. if the invalid bit in the
sw_cookie is set, we just skip this entry and move on to the
next entry in the ring.

Change-Id: I0e78fa662b8ba33e64687a4dee4d1a5875ddb4bf
CRs-Fixed: 2730718
2020-07-18 00:00:04 -07:00
Aniruddha Paul
1b7f50b096 qcacmn: Update the Tx/Rx Delay histograms
Update the Host Tx/Rx per packet delay histogram

Change-Id: I40c3c05b2eb90427bd83783f13f2a7a3df41d232
2020-07-17 21:25:58 -07:00
Balamurugan Mahalingam
8aec8db9ac qcacmn: Avoid configuring mac1 WMI buffers for QCN9000 and IPQ5018
And avoid configuring PKTLOG buffers if REMOVE_PKT_LOG
is defined

Change-Id: I40276f1f1905137cef053f9e552effde05b0240d
CRs-Fixed: 2733547
2020-07-17 21:25:55 -07:00
Abhinav Kumar
93ea2cf59b qcacmn: Process Disconnect request from FW
FW sends a disconnect request to HOST while roaming failure
through event WMI_VDEV_DISCONNECT_EVENTID per vdev id.
Process WMI_VDEV_DISCONNECT_EVENTID and issue disconnection.

Change-Id: I0d3d2ddf0cab65eecbfc7676e9b21f2cc19971e2
CRs-Fixed: 2731954
2020-07-17 21:25:51 -07:00
Will Huang
fa2a661a48 qcacmn: Move 11d country vote to scan complete
Currently we invoke scm_11d_handle_country_info() on every
beacon/probe-rsp receiving, it is not fair if not checking duplicated
beacon/probe-rsp, like if station connected it will dwell more time on
home channel and receive more duplicated beacon/probe-rsp, and caused
elect unexpected country.

Because scan entry will be updated without duplication, so after scan
complete we do 11d country vote by iterating whole scan entry db.

Change-Id: If7669c5529dd51e193e4a58d0090c0b2a1f25425
CRs-Fixed: 2706837
2020-07-17 21:25:48 -07:00
Shiva Krishna Pittala
b6a6d5e2c4 qcacmn: Add Host abstraction for WMI pdev param SR_TRIGGER_MARGIN
Pdev parameter WMI_PDEV_PARAM_SR_TRIGGER_MARGIN is added to configure
the safety margin which will be used in calculating the acceptable
interference level for PSR based Spatial Reuse operation.
Add the host abstraction for the same parameter.

CRs-Fixed: 2729664
Change-Id: Iae542d4f7de23520ee00719e721d81e32737a191
2020-07-17 17:23:27 -07:00
Surabhi Vishnoi
bb9b9ec907 qcacmn: Compilation fixes when WLAN_CFR_ENABLE config is enabled
For adrastea targets, enhanced CFR is not supported. When only
CONFIG_WLAN_CFR_ENABLE is set, some compilation errors are
observed as CONFIG_WLAN_ENH_CFR_ENABLE is not set true.

Fix these compilation errors when only CONFIG_WLAN_CFR_ENABLE
is set for targets which do not support enhanced CFR.

Change-Id: I96a769d8f10144033e48e123bb68d48a54cdf8ab
CRs-Fixed: 2706904
2020-07-17 17:23:23 -07:00
Amir
990bafdd4d qcacmn: Set 'en' bit to true in full monitor mode register
As per MAC team's suggestion, While disbaling full monitor mode,
Set 'en' bit to true in full monitor mode register.

CRs-Fixed: 2722950
Change-Id: Idc891efde5f1fa625d59b7a193deeb38dca33e23
2020-07-17 01:51:39 -07:00
Shashikala Prabhu
bdecef61b5 qcacmn: Add wrapper functions to get the correct pdev_id
Add wrapper functions to get the host pdev id from target pdev id and
vice versa.

Change-Id: Ib10f6f5625b4a9e1f44a13e9185de75f6df88b3c
CRs-Fixed: 2711423
2020-07-17 01:51:34 -07:00
Shashikala Prabhu
065e48fb63 qcacmn: Add wrapper function to get host pdev_id from tgt_pdev_id
Add wrapper function to get host pdev id from target pdev id.

Change-Id: I4628955569d741765efc515949909d9ea358e54a
CRs-Fixed: 2711423
2020-07-17 01:51:30 -07:00
Shashikala Prabhu
6d11d6f27a qcacmn: Add support to get pdev_id and psoc from dev_name
LOWI application provides the interface name as part of lowi message to
host driver. Add support in the driver code to get the corresponding
pdev_id and pdev from interface name using  dev_get_by_name().

Change-Id: I267b95c843a9bb1dd0c58ff45767f31999500b1c
CRs-Fixed: 2711423
2020-07-17 01:51:26 -07:00
Alok Kumar
8054d1a47d qcacmn: Add mapping table for channel band to lmac ring id
In monitor mode, the packets for 5GHz go to lmac ring 0 and for
2.4GHz packets go to lmac ring 1. But this is valid for DBS solution.
For single MAC solution, both 2G and 5G packets go to lmac ring 0.
 
Add mapping between channel band and lmac id ring and populate
this mapping table based on target type i.e DBS or Single MAC.

Change-Id: Iabc7c2088caca6fe4adef1da6d45945fc9a2716c
CRs-Fixed: 2728664
2020-07-17 01:51:21 -07:00
Prabhat Tamrakar
0ba944c541 qcacmn: Initialized QDF_NBUF_TRACK structure member
Uninitialize QDF_NBUF_TRACK structure members printing junk
data, it may lead to slab-out-of-bounds

Initialize QDF_NBUF_TRACK structure members with default value
in API qdf_net_buf_debug_add_node

CRs-Fixed: 2720988

Change-Id: I377a82a5e91b752516cd42089a66549d84d1c2dd
2020-07-17 01:51:16 -07:00
Abhishek Singh
09403ed7d0 qcacmn: Move Blacklist filter while scoring the BSS
While BSS are scored apply blacklist logic to remove
blacklist AP or move the avoid AP at the end.

Change-Id: I3071b63732dba6763e2f48d0613b36e86bd780d9
CRs-Fixed: 2725143
2020-07-16 23:46:21 -07:00
Abhinav Kumar
55d706efcd qcacmn: Add service bit for CONFIGURE_ROAM_TRIGGER_PARAM_SUPPORT
Add new service bit for
WMI_SERVICE_CONFIGURE_ROAM_TRIGGER_PARAM_SUPPORT.

Change-Id: I3f2683c5284cdc615270fd653e6173649c543c04
CRs-Fixed: 2733024
2020-07-16 20:05:37 -07:00
Abhinav Kumar
f037c70790 qcacmn: Add new attr for QCA_NL80211_VENDOR_SUBCMD_ROAM
Userspace can configure different roam control params as
defined in qca_vendor_attr_roam_control through the roam subcmd
QCA_NL80211_VENDOR_SUBCMD_ROAM and the below attributes:
QCA_ATTR_ROAM_CONTROL_SCAN_FREQ_SCHEME
QCA_ATTR_ROAM_CONTROL_CONNECTED_RSSI_THRESHOLD
QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD
QCA_ATTR_ROAM_CONTROL_USER_REASON

Introduce above new attributes for roam subcommand.

Change-Id: I680ac7973cbe282673cf8cc065a7b643d4503d5e
CRs-Fixed: 2729127
2020-07-16 20:05:34 -07:00
hqu
ee897412af qcacmn: Move rso related process to connection manager [PART 1]
Based on new macro ROAM_OFFLOAD_V1, define
send_roam_scan_offload_rssi_thresh_cmd to different
function pointer type.

Change-Id: I965b8c0a2a2660b9560d48a92ad693a7efb7aaff
CRs-Fixed: 2730850
2020-07-16 20:05:31 -07:00
Abhinav Kumar
a5c1fed773 qcacmn: Extract btm response and initial roam stats
Extract btm response and initial roaming stats coming
from FW through WMI_ROAM_STATS_EVENTID event as
wmi_roam_btm_response_info_tlv_param and
wmi_roam_initial_info_tlv_param respectively.

Change-Id: I680260276530368aab0e783bf4ef83edb0fe0d62
CRs-Fixed: 2728465
2020-07-16 20:05:28 -07:00
Vignesh Mohan
e62226ba5f qcacmn: Do not update ch_params if RCAC frequency is NULL
While selecting the next channel after radar, if RCAC is enabled,
RCAC frequency and ch params are chosen. But in case where no
RCAC frequency was found, ch params were filled with 0s which are
then used by the next channel selection logic (random channel)
to figure out the next channel.

Since the ch params were now 0s, the ch width is pointing to
20MHz (0 enum) which results in a 20MHz channel picked irrespective
of current mode.

Do not modify ch params if the RCAC frequency is NULL.

CRs-Fixed: 2729023
Change-Id: If542fb8584a767ad8d1fe6115af039e8bc2cb173
2020-07-16 02:05:35 -07:00
Aniruddha Paul
9088f48e99 qcacmn: Print the DP delay histogram
Prints the dp delay histogram on peer basis. This stats
are print as part of the fc_peer_delay command.

Change-Id: I9be971f5b5aa42f40741ee403a0f82dae97981c3
2020-07-15 03:52:22 -07:00
Aniruddha Paul
b07ed991ec qcacmn: Alloc/Dealloc the peer extended stats
Allocate/Deallocated the peer extended object in the
peer_create() and peer_del() paths respectively.

Change-Id: I3e93e1ec85aefb22d3fb40d1b01bbd07d660aff5
2020-07-15 03:52:18 -07:00
Aditya Kodukula
e99b7c2a82 qcacmn: Remove unused PMC status
There is no user for PMC related status codes in the CLD.
So remove them.

Change-Id: Iba307a80b15caacbe0bc7890c89acbb57b716b72
CRs-Fixed: 2729642
2020-07-15 01:46:43 -07:00
Neha Bisht
b22b0751c0 qcacmn: Remove redundant member from dp_vdev structure
Removing pointer to struct cdp_ctrl_objmgr_vdev from dp_vdev struct

Change-Id: Ifdbbbe565902a098a754c539733e763e72a6160d
2020-07-15 01:46:40 -07:00
Lincoln Tran
7a0d8efdaa qcacmn: Update regulatory to use bitmap for band
Setband changes require support for 6G band. Using a bitmap
better supports the addition of new bands. Changes to support
this include:
	1. Update band_capability in regulatory pdev priv obj
	   to be a bitmap.
	2. Add API to convert between the bitmap and
	   enum band_info.
	3. Update channel list modifying function to include
	   case for 6G band.
	4. Update the get and set APIs to use uint32_t instead
	   of band_info.

Change-Id: Iff38fdd7cc540a0e471647de349d7fa57b3a8467
CRs-fixed: 2726285
2020-07-14 22:45:42 -07:00
Lincoln Tran
caa1688c1b qcacmn: Vendor command to get the configured band
This commit introduces the vendor command to get the configured band
through QCA_NL80211_VENDOR_SUBCMD_GETBAND.

Change-Id: I3f3de10a3bd32eda2634b400d5191bf67a46eaaa
CRs-fixed: 2729768
2020-07-14 22:45:39 -07:00
Lincoln Tran
ab9b3ce1e0 qcacmn: Vendor command to configure TWT
This commit defines a new vendor interface
QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT to configure TWT.

Change-Id: I077c26e56dccbcead9d5e770700813b65bb8aff4
CRs-fixed: 2729753
2020-07-14 22:45:36 -07:00
Lincoln Tran
de9b5409c9 qcacmn: Enhance the qca_set_band enum value to BITMAP
Also introduce a new attribute QCA_WLAN_VENDOR_ATTR_SETBAND_MASK
to carry this new bitmask enum. This attribute shall consider the
bitmask combinations to define the respective Band combinations
and substitutes QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE.

Change-Id: Ib00d93147e19593f24bd317c3962e6454e4eafc2
CRs-fixed: 2726283
2020-07-14 22:45:32 -07:00
Lincoln Tran
b5e2eeb87d qcacmn: Remove reg_get_curr_band
Remove reg_get_curr_band because it has the same functionality
as reg_get_band.

Change-Id: I7fa5abfe6a552cc617cd810b41b152c70b3429b8
CRs-fixed: 2726300
2020-07-14 22:45:29 -07:00
Manjunathappa Prakash
5c488639b8 qcacmn: Add fisa_sw_ft entry member to hold cumulative frag len
Add fisa_sw_ft entry member to hold the cumulative non head
frag lengths. This is used to do head_skb->data_len sanity check.

Change-Id: Ied65327c027dd60357ed1dc062655bfb903a12bb
CRs-Fixed: 2728319
2020-07-14 02:02:41 -07:00
Amar Singhal
df1414b0f6 qcacmn: Compute correct channel width for freq
Compute correct channel width for a given frequency by calling
the regulatory channel bonding API.

Change-Id: I3627bc2a4f4c832887447bd6b28abd3432bffa73
CRS-Fixed: 2728810
2020-07-12 07:31:32 -07:00
Amar Singhal
91c8fbfde4 qcacmn: Reduce the level of logs for reg-domain
In regulatory offload case; customer may be using his own
customized regdb. In that case, the host regdb can be different
from firmware regdb. Therefore, reduce the log level.

Change-Id: I165745bd5cb22fe95ae96f387db4d65e39f446ec
CRs-Fixed: 2728587
2020-07-12 05:17:26 -07:00
Mohit Khanna
42a8d7ef31 qcacmn: Add P2P UDP/TCP checksum offload INI entry
Add support to enable disable TCP/UDP checksum offload for P2p modes.

CRs-Fixed: 2725395
Change-Id: Id482649e501a8f9a8900a92e3e03a48f0e99603c
2020-07-12 01:49:34 -07:00
Nisha Menon
a24579c66f qcacmn: Remove unnecessary msdu count check in mdpu desc
Remove uncessary msdu count check against msdu count in
mpdu desc info while processing REO Rx err pkts.
As per h/w team msdu count can be obtained from msdu link
desc instead of mpdu desc info.
SOC level Rx err stat rx.err.msdu_count_mismatch is
incremented to log this condition.

Change-Id: I4f7d2df7335778f2f2d28e542da17fc7f6970009
CRs-Fixed: 2729693
2020-07-11 15:08:42 -07:00
Gyanranjan Hazarika
3c585e695a qcacmn: Avoid sending fils_enable cmd to fw in case of non-tx vdev
In case of MBSSID, fils or 20tu unsolicited probe response frame
is required to be sent only by the tx-vdev. 20tu frames (fils or
probe response) sent by the tx-vdev carries the specified information
about the non-tx vdevs.

Currently, fils_enable wmi cmd is being sent by default to fw at
vdev_up of each vdev. Avoid sending this cmd in case of non-tx
vdev in MBSSID mode.

Change-Id: I6d6f85489baf34b282f012227f211388647fdb4e
CRs-fixed: 2727143
2020-07-10 21:55:54 -07:00
Harsh Kumar Bijlani
12f0270968 qcacmn: Align host TLV structures similar to FW TLV structures
FW keeps adding members to htt structure. In order to avoid overflow,
align host tlv structures similar to fw tlv structures and also
validate size of htt_stats tlv before memcpy.

Change-Id: I4719804cd1e65ad14dfcee36685ee2a4ae4f2379
CRs-Fixed: 2700191
2020-07-10 19:49:30 -07:00
Aditya Sathish
34c5877b8d qcacmn: Add NULL check for find IE API
Ensure that the IE pointer is not dereferenced if the pointer
passed to the function is NULL.

CRs-Fixed: 2724504
Change-Id: Ie6b4c633e252de5162c9f7ab72c2ea4a2cc058dd
2020-07-10 19:49:26 -07:00
sheenam monga
fe1e85068c qcacmn: Fix OOB issue in wlan_parse_rsn_ie
Issue: Currently, host doesn't validate pkid_count
before populating data in rsn->pmkid. rsn->pmkid array
can store only 4/MAX_PMKID pmkids which may cause OOB
write if host tries to copy pmkids more than MAX_PMKID.

Fix: validate pkid_count before populating rsn->pmkid
and return Failure in case pkid_count becomes greater
than MAX_PMKID to avoid OOB.

Change-Id: I211ea791a52ecb84872d139929f999a89db240d5
CRs-Fixed: 2724407
2020-07-10 07:45:46 -07:00
Vignesh Mohan
4b9b060974 qcacmn: Use dfs channel structure to store autoswitch channel
Use dfs channel structure to store autoswitch channel instead
of a single frequency value.

CRs-Fixed: 2726427
Change-Id: Ib592b75d4f87b4597510a1fc32717633b2b39e21
2020-07-10 05:38:57 -07:00
Kiran Venkatappa
ec5ee77d84 qcacmn: Use QDF_STATUS error code in hif_ahb_enable_bus
hif_ahb_enable_bus returns -EIO, PTR_ERR and QDF_STATUS. PTR_ERR can
return zero for NULL. This will get interpreted as success resulting in
invalid access later. Fix return status to QDF_STATUS so that caller can
cosistently use error codes for error handling.

Change-Id: Ibd4d6e52c930272febf9a8b76bcfd2df4a4a4705
CRs-Fixed: 2726180
2020-07-10 05:38:54 -07:00
Aditya Kodukula
b25366fa6f qcacmn: Check for NULL pointer before de-referencing it
Pointer 'hif_ctx' returned from call to function 'cds_get_context'
may be NULL. Check for NULL pointer before de-referencing it.

Change-Id: I6c909b2c62e1bf6945a4cc40315e8fdad4a0aa83
CRs-Fixed: 2726335
2020-07-10 01:43:25 -07:00
Kai Chen
2b3f9a1057 qcacmn: use host pdev id for wdi event handler
wdi event handler take host pdev id. Convert lmac/target pdev id to host
pdev id for wdi event handler.

Change-Id: Iaf1f3e77055be0178d810d960924ca618b334fd2
2020-07-10 01:43:22 -07:00
Ashish Kumar Dhanotiya
a54735abdd qcacmn: Change data type of the code for qdf trace to uint16_t
Currently for qdf trace api data type of code is uint8_t, some of
the modules are inserting message id of type uint16_t because of
which some information is getting lost and post processing cmm
script is not able to parse these messages correctly.

To address above issue, change the data type of code for
qdf trace function.

CRs-Fixed: 2719767
Change-Id: I4461dc9c2f45e691317d318870dfdbce93929e12
2020-07-09 21:39:40 -07:00
Basamma Yakkanahalli
81e70bb153 qcacmn: Enable Spectral feature for ipq5018 target
a. Enable DDMA support and FFT bin length adjustment SWARs
b. Similar to QCN9000,
Skip 16 bytes of unused padding added after Spectral summary report
FFT report header length is 24

Change-Id: I870f198511771dccbb0300ff62fc15ab0d64ee7f
2020-07-09 15:54:29 -07:00
Aniruddha Paul
915f53b12f qcacmn: Add INI support for peer ext stats
Add INI support for peer extended stats. The extended
stats as of now include per peer Tx/Rx delay per packet
path.

Change-Id: I20d3c7f81f65f4db5f111eb103945151a8cd83aa
2020-07-09 13:43:41 -07:00
Vevek Venkatesan
0b06fc4e7e qcacmn: fix the pointer access before NULL check errors
Fixing the errors of accessing pointer before NULL check.

Change-Id: Idaa4348e2f40b14eb391826cda37b027360fad72
CRs-Fixed: 2726351
2020-07-09 13:43:38 -07:00
Chaoli Zhou
7c40c9d475 qcacmn: Fix compile error while enable CONFIG_REMOVE_PKT_LOG
Cleanup the code to fix the compile error while setting
CONFIG_REMOVE_PKT_LOG=y & CONFIG_WDI_EVENT_ENABLE=n
with Hasting

Change-Id: I493fbddec865fe20789022445b0f155201772119
2020-07-09 09:24:09 -07:00
syed touqeer pasha
f2d33c938b qcacmn: Handle insufficient headroom
If headroom is insufficient during ppdu metadata receive,
reallocate headroom.

Change-Id: Ib3c5295ce73eaab5a5ff6b37f0f37361e7135b9c
2020-07-09 03:03:49 -07:00
Abhishek Singh
60f7ef7fb1 qcacmn: Remove unused filter params from scan filter
Remove unused filter params from scan filter. Also
change the type of few, to decrease the memory required.

Change-Id: I3f86d416805174b56c8998f5a4a4723d9ebdd90b
CRs-Fixed: 2723220
2020-07-08 21:02:39 -07:00
Srinivas Dasari
4e5cfb2ac9 qcacmn: Add vdev param to configure NAN feature bitmap to firmware
Define a new vdev param to set corresponding bit to enable/disable
a particular NAN feature.
Currently, Framework configures NAN DW as 4 seconds when the
device is in sync role and the screen is off. But customers might
want this to be 512ms always irrespective of screen off/on.
Send the vdev param on NAN vdev by setting the "bit 0" to 0 to
indicate firmware to ignore framework configured DW value and
consider the firmware default value.

Change-Id: Idcbdae94bd6a96fbbe15ec103a0aa558cdfcd572
CRs-Fixed: 2721980
2020-07-08 18:55:57 -07:00
aloksing
093d940112 qcacmn: Add wmi support wifistats
Send WMI command to FW with provided tlv from wifistats

Change-Id: I80ac9f621c75429bdca18962423026c2008a71d0
2020-07-08 08:59:19 -07:00