Commit Graph

7704 Commits

Author SHA1 Message Date
Prathyusha Guduri
244eeac730 qcacmn: Fix mic error processing for non raw frames
Extract fragno from 802.11 header only for RAW frames

Change-Id: I39e10091f25dd52489bf0aa99633a32f12fc3059
2019-11-07 12:19:08 -08:00
wadesong
c3ac05e67f qcacmn: Clear legacy channel ID usage
1) Remove the definition of plm_ch_list from
   struct plm_req_params and add plm_ch_freq_list
   into the same struct given frequencies will be
   used directly before passing WMI command to
   firmware.

2) Remove redundant channel frequency list from the
   following API functions' parameters:

   send_plm_start_cmd
   wmi_unified_plm_start_cmd
   send_plm_start_cmd_tlv

Change-Id: I982412076b422356037d9bbfa2077affd1056189
CRs-Fixed: 2560085
2019-11-07 07:24:03 -08:00
Hariharan Basuthkar
6f59c89126 qcacmn: Fix channel conversion APIs in the regulatory component
Update the APIs mentioned below, to handle invalid channel number and
freq value of less than or equal to 0:

1) wlan_reg_chan_band_to_freq
2) wlan_reg_freq_to_chan
3) wlan_reg_chan_to_freq
4) wlan_reg_legacy_chan_to_freq

Change-Id: I122658c974c550ff16bcfe1b664799a609c7ffcf
CRs-Fixed: 2550286
2019-11-07 05:21:36 -08:00
Vignesh U
5ad018742a qcacmn: Filter the single channel scan request if the channel is NOL
A single channel scan request is not validated for NOL and scan start
request is sent directly. This leads to scan violation.

Reject the single channel scan request, if the channel is in NOL by
proceeding to validate the channel before sending scan start.

Change-Id: I128b1bea8de534f08e9d93cb154c2ba5adeba452
CRs-Fixed: 2546693
2019-11-07 03:55:59 -08:00
Sourav Mohapatra
d5dde1b9ae qcacmn: Increase timeout to avoid false assert
Currently, the timeout value LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC is
set at 24 seconds. This is not sufficient for various cases where the
delay caused are genuine (FW and HW delays), thus leading to unwarranted
device assert.

Increase the timeout to 32 seconds to mitigate this.

Change-Id: I799b45b0d5f25a9fcf68f88d385994e31c56e939
CRs-Fixed: 2546641
2019-11-07 01:18:49 -08:00
nakul kachhwaha
f9ae9360f9 qcacmn: Extending TDLS Peer ops and pause/unpause APIs
Changes are done to extend vdev based pause/unpause to
peer based pauses/unpause. Added changes to mark peer
as tdls peer and supports TDLS offchan operations which
will be used to pause/unpause the peer queues based on
pause type coming with pause event from FW.

Change-Id: I3976501c318ae5a295e71ed2265db04496974c7a
CRs-Fixed: 2508209
2019-11-06 23:50:40 -08:00
Rachit Kankane
215263ece0 qcacmn: Update Beacon template
On detecting RADAR, if SAP / Auto GO is operating on DFS channel,
host driver updates Beacon / Probe response template with CSA /
ECSA IE to firmware.

Once the count in CSA IE is reached to 0, host should remove these
IEs from both Beacon / Probe response template and send it to FW.

But with INI gDisableDFSChSwitch=1 (test only), After detecting
RADAR, host driver updates the Beacon and Probe response template
with (E)CSA IEs but doesn't remove these after count reaches to 0.
Updated the code to remove these IEs when INI gDisableDFSChSwitch
is set.

Change-Id: Ie01c80a57191a78d71a8a27f1bead533388a4580
CRs-Fixed: 2555696
2019-11-06 21:36:18 -08:00
Jia Ding
c031575beb qcacmn: Set default value for REO dest ctrl register
NOC error is observed when PCIe accesses IPA GSI RX doorbell
register even before IPA clocks are ON. Currently for SAP vdev,
default REO dest is set to REO2SW4 and with RX hash being
disabled, packets will finally land on REO2SW4 ring. If packets
arrive on REO and are routed to SW4 ring, REO HW will ring
IPA GSI doorbell address and thus the NOC error will occur
because IPA clocks are still OFF which should be set to ON
by WLAN via ipa_wdi_enable_pipes API.

Fix is to set DEST_RING_MAPPING_4 to SW2 for REO dest ctrl
register such that packets arrived before IPA pipes are
enabled will be handled by WLAN host. Note that
DEST_RING_MAPPING_4 will be remapped to SW4 after IPA pipes
are enabled.

Also correctly configure REO dest ctrl register when RX hash
feature is disabled when enabling and disabling IPA
autonomy.

Change-Id: Ifd471bbe2e4a0e66e080d9ae51fb2a3600fd87e6
CRs-Fixed: 2554023
2019-11-06 20:08:56 -08:00
bings
5a40049a64 qcacmn: Disable dfs phyerr offload when no sap/go in DFS channel
As FW requires, send WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID when there
is no beaconing session in DFS channel for FW which supports dfs offload.

Change-Id: I73b86328be6eb132de70bd10406495fbaefcab67
CRs-Fixed: 2554083
2019-11-06 14:06:50 -08:00
Venkata Sharath Chandra Manchala
05c1f9c8c3 qcacmn: Remove unneccessary logging
Remove unneccessary logging to avoid
printing on the console.

Change-Id: Icdd5ea5703ab41561af7092def2b3b4352c637f2
CRs-Fixed: 2552006
2019-11-05 22:18:03 -08:00
Vignesh Mohan
42bc1a9d68 qcacmn: Reset dfs_precac_active flag only for the calling pdev
When tgt_dfs_set_precac_state API is called, the dfs_precac_active
boolean is set to false for all pdevs. This results in preCAC
being stopped for all pdevs in DBS_SBS mode when one of the
pdev becomes inactive.

Reset dfs_precac_active flag only for the calling pdev and
set the global boolean 'precac_state_started' to false only
if all the individual pdev flags are inactive.

Change-Id: I73fcacb911a5eb9028b03aa1c86775a66f2a7fc9
CRs-Fixed: 2556734
2019-11-05 17:48:32 -08:00
Nandha Kishore Easwaran
fb73acb147 qcacmn: CE flag changes for QCN9000
Added change to modify ce flags for Pine.
Also made changes in window enable bit

Change-Id: Id080be53d14450cb6d9376fc810177bce26a2869
CRs-fixed: 2507441
2019-11-05 16:18:38 -08:00
Subrat Mishra
76b7920e40 qcacmn: Fix memory leak in 6GHz channel update
Fix memory leak in 6GHz channel list update for scan manager.

In scm_update_6ghz_channel_list function dynamic memory allocation
for local variable was not freed. This was cusing memory leak during
module unload.

CRs-Fixed: 2558436
Change-Id: I9535a3621e0fc5916cdf39934fec7c51c1b8e32b
2019-11-05 11:04:16 -08:00
Abhishek Ambure
986f5c97b9 qcacmn: Get phymode from HE phy capability
WLAN phy mode is calculated from HE capability.

Change-Id: I217cf6609f526a761c183395fe67f67adc95c4af
CRs-Fixed: 2550362
2019-11-05 09:27:42 -08:00
Chaithanya Garrepalli
6bc8263586 qcacmn: do not store vdev_id in ast_entry
Remove the vdev_id feild from ast_entry structure

Change-Id: I0f79d13399212397c4c88aa5c39d422719a17137
2019-11-05 05:39:45 -08:00
Rajeev Kumar Sirasanagandla
89cefa812d qcacmn: For p2p scan skip DFS channels only
In the current implementation, when ini gSkipDfsChannelInP2pSearch
is set then DFS channels are skipped for p2p scan but side-effect is
passive and indoor channels are also skipped. This is because api
wlan_reg_is_dfs_ch() returns true for passive, indoor and DFS channels.

To fix this, use api wlan_reg_chan_has_dfs_attribute() instead of
wlan_reg_is_dfs_ch() for explicitly getting DFS (radar) channels only.

Change-Id: I7aa50991753e057f72ed945e90647123ae51ed87
CRs-Fixed: 2545583
2019-11-05 04:18:01 -08:00
Vivek
72924111f9 qcacmn: Add include path for common queue.h file
Two copies of the same queue.h was used in WIN and MCL
and each had its own copy, so the file is now moved to
common code and and both WIN/MCL can use the same file.

Updated the Kbuild to include the new path where queue.h is
available

Change-Id: I9f362173c7ae05d1613629787a5f3be61879efbe
CRs-Fixed: 2545115
2019-11-05 02:13:02 -08:00
Ashish Kumar Dhanotiya
84ac2013af qcacmn: Add queue.h file
Currently MCL and WIN both have there separate queue.h
files with the same declarations and definitions.
As part of cleanup create single queue.h in common
code and update the usage of existing queue.h to this
newly added queue.h.

Change-Id: Ie381c3553d6361cf7f8c97f14a91ed24e332b51a
CRs-fixed: 2505617
2019-11-05 02:12:54 -08:00
bings
f2f11dbf06 qcacmn: Add REG_BAND_MASK_ALL
Define a bandmask for all the modes

Change-Id: I8ad6fc2676c2306043aa9415eefb2b89d8c49a4d
CRs-Fixed: 2555045
2019-11-05 02:12:49 -08:00
Jianmin Zhu
ed37c7cbca qcacmn: Clean up legacy F/W event handler
target_if F/W event handler is moved from wma to cmn part per
MCL/WIN converge requirement, clean up legacy call back.

Change-Id: Ifacc6bb46e6bde1a73d9953e3403551dd2e92939
CRs-Fixed: 2555080
2019-11-04 01:57:51 -08:00
Sandeep Puligilla
377595c534 qcacmn: Default value for 6G scan mode
6G Scan mode for AP platform is different
from non-ap paltform so modified default values
accordingly.

Change-Id: Ifdea76b449998ffa5e33ffedd30564bd8eda8d6a
CRs-Fixed: 2555441
2019-11-02 12:26:04 -07:00
Priyadarshnee S
54e3ffe37f qcacmn: Implement a dispatcher API to retrieve precac chan state
Implement a frequency API based dispatcher function to retrieve
the precac channel state of a given channel frequency.

Change-Id: Iefd70c8b6e60a42f8dc95db5f8a2e8c66ae013ea
CRs-Fixed: 2526372
2019-11-01 16:59:56 -07:00
gaurank kathpalia
d68b2f4f19 qcacmn: Use freq instead of channel number to avoid collision
To avoid IEEE channel number space collision,
use freq in structure dfs_acs_info.

Change-Id: I48813d12819f03495f196e634e9fcb422105f304
CRs-Fixed: 2555897
2019-11-01 08:17:46 -07:00
Jianmin Zhu
367c36003b qcacmn: Handle vdev start stop delete event in mc thread
vdev start/stop/delete event need be handled in mc thread to
avoid race condition issue.

Change vdev start/stop/delete event handler as static

Change-Id: I360c3b34a18c41c506179225168d3bb490fc8823
CRs-Fixed: 2554731
2019-11-01 08:17:42 -07:00
Sandeep Puligilla
9304a97961 qcacmn: Add WMI scheduler thread context execution
Add WMI scheduler thread context execution framework
to process firmware events in the common project.

Change-Id: If56a4767ee9428d2f93d54ccbf5a8bb17e89e0f4
CRs-Fixed: 2554727
2019-11-01 08:17:25 -07:00
Naga
11f5a63a6c qcacmn: Export scheduler_post_message_debug api
Add support to export scheduler_post_message_debug API
to be used in wmi_unified.c

Change-Id: If18741f1973724453f0b2de12e133230924a2e52
CRs-Fixed: 2555961
2019-11-01 04:57:39 -07:00
Rakesh Pillai
534a143d8f qcacmn: Add support to flush rx packets for a vdev
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
2019-11-01 00:18:13 -07:00
Visweswara Tanuku
b3518aff5c qcacmn: Genoa: SDIO: Revert WAR - Do not use HTC_FLAGS_SEND_BUNDLE
Remove the WAR, which doesnot use HTC_FLAGS_SEND_BUNDLE

This reverts commit 68f186311d

Change-Id: I7d350faca8645a5d65af708cb3fb231895a3fe37
CRs-Fixed: 2522724
2019-10-31 10:08:21 -07:00
Priyadarshnee S
6e08d66883 qcacmn: Register DFS callbacks
To avoid "channel number" collision that was introduced after
6Ghz band was added to the driver, frequency based DFS callbacks are
registered with dfs_to_mlme structure.

Change-Id: Id937059329e4df25a49397c1c01251f81afc1fe6
CRs-Fixed: 2526372
2019-10-31 02:44:59 -07:00
Wu Gao
b7d36fd258 qcacmn: Fix compilation issue in dfs
There is no defined variable "dfs_nol_channel" in function
"dfs_mark_leaking_chan_for_freq".

Change-Id: I4258a9d322bfd98dc644678d48ba3146f966b367
CRs-Fixed: 2554628
2019-10-30 16:51:36 -07:00
sumedh baikady
c0bd0bee0e qcacmn: Reset svld on getting delba or teardown
Currently we do not update svld with 0 on receiving
delba or during a teardown. This change sets update_svld
and resets svld flag to 0.

Change-Id: Ic5eb5732946c47d7c20230f225fbb1bf54621506
CRs-Fixed: 2514183
2019-10-30 16:51:31 -07:00
Priyadarshnee S
6ddbcf0add qcacmn: Invoke DFS frequency APIS from vdev_mgr_start_param_update()
To avoid "channel number" collision that was introduced after
6Ghz band was added to the driver, frequency based DFS APIs are invoked
from vdev_mgr_start_param_update().

CRs-Fixed: 2532623
Change-Id: I35d262d10d00df124116a617de4575d00c35cffb
2019-10-30 16:51:27 -07:00
Venkata Sharath Chandra Manchala
c9e344de3d qcacmn: Set the reo destination ring ctrl register
The reo destination ctrl registers
HWIO_REO_R0_DESTINATION_RING_CTRL_IX_2_ADDR and
HWIO_REO_R0_DESTINATION_RING_CTRL_IX_3_ADDR are used for mapping
msdu packets to different reo rings.
For QCA6390,
reo remap values varied from 0 - 7 so every 3 bits in
the register were used to map to a particular reo ring.
For QCA6490,
reo remap values vary from 0 - 9 as two extra reo rings are
added so we are using 4 bits in the register to map to a
particular reo ring.
Use the macros directly provided in the header files
to map reo rings.

Change-Id: I6d64266d3b388b3453b7df959048e3d693cf0a40
CRs-Fixed: 2544102
2019-10-30 05:58:57 -07:00
Sandeep Puligilla
5939199242 qcacmn: Add 6Ghz scan mode CFG item
Add 6ghz scan Mode CFG item and funcitonality
0 - Remove 6GHz channels in the scan request
1 - Allow/Add 6Ghz PSC channels to scan request
2 - Allow/Add all the 6Ghz channels

Change-Id: I2f07c30e599ace4592ae02a88d86876725abbb5f
CRs-Fixed: 2517277
2019-10-29 06:56:10 -07:00
Vivek
0c4e20ff82 qcacmn: Replace printk with qdf_nofl_info
Replace printk with qdf_nofl_info in qdf folder.
So if we wish to change from printing on console
to other location, based on a logging daemon, we
can do that by only changing at the implementation
of QDF print API's

Change-Id: I6db67cee416ebbe0f2c51b2d4dbf2b3a335e972a
CRs-Fixed: 2442689
2019-10-29 04:07:12 -07:00
Jinwei Chen
cb37d704f8 qcacmn: Fix dst_ring_desc memory leak in defrag case
For RX defrag, if incorrect SW peer ID is got from REO exception
ring descriptor, the expectation maybe is AP BSS peer ID but it
is replaced by other peer ID which like SAP self peer that won't
do dp_peer_rx_init, then in dp_rx_defrag_cleanup no chance to
run dp_rx_clear_saved_desc_info to free dst_ring_desc since
rx_tid[].array is NULL, memory leak happened.
  Call dp_rx_clear_saved_desc_info always in dp_rx_defrag_cleanup.

Change-Id: Ib1ebfbd976c817d5238ee48196388a8c88189ebc
CRs-Fixed: 2549913
2019-10-29 04:07:07 -07:00
Hariharan Basuthkar
3d4c345f51 qcacmn: Introduce reg_err_rl to avoid print flood
Print floods are observed in the APIs below:

1) reg_get_curr_regdomain
2) reg_is_etsi13_regdmn
3) reg_freq_to_chan

Add a new macro reg_err_rl and assign QDF_TRACE_ERROR_RL. Use reg_err_rl
instead of reg_err, to avoid print flood.

Change-Id: I5c1da71febd61449bfbff508797c60bb88849122
CRs-Fixed: 2552008
2019-10-28 23:36:57 -07:00
Santosh Anbu
0fdaae998a qcacmn: Handle start event failure
When the start continue callback fails due to any of the error
scenarios such as unable to find the channel, then the vdev SM
is stuck in the connection progress state leading to timeout
at the OSIF.

Graciously handle the start event failure by posting a connection
fail event back to vdev SM.

Change-Id: I0e4a3cf95529a09c88bc7fd4069aec99d4b9d78d
CRs-Fixed: 2552168
2019-10-28 23:36:50 -07:00
Jinwei Chen
7d419468a9 qcacmn: Use CNSS register window lock for register accessing
If CNSS platform driver and wlan host driver try to write
window register at the same time, conflict happened which then
register write failed.
Use the window register lock shared from CNSS driver to avoid
the conflict.

Change-Id: Iccc4e60e4f5eed995ec6aa53b024f3f96a2619a0
CRs-Fixed: 2534408
2019-10-28 20:58:46 -07:00
Alan Chen
b2bc55909c qcacmn: Add a qdf counter for qmi stats requests
Add a qdf counter to know number of qmi stats requests. Reset the
counter when WoW is exited.

Change-Id: Ie0c51fbd6eb2e7530dba01912443e7fc85726e52
CRs-Fixed: 2539999
2019-10-28 18:03:13 -07:00
Alan Chen
ddcff963a2 qcacmn: Replace panic by QDF_DEBUG_PANIC
Replace panic by QDF_DEBUG_PANIC because if PANIC_ON_BUG is compiled out,
we do not want to panic the system.

Change-Id: Idae89d6881ed5543273b047a0b77bc3ae55132b5
CRs-Fixed: 2545292
2019-10-28 18:03:08 -07:00
Tushnim Bhattacharyya
23990a2d01 qcacmn: Replace channel with frequency in struct unsafe_ch_list
Replace channel ID with frequency in struct unsafe_ch_list.

Change-Id: I0a9426f985edb65387f2613519b487d701cf344d
CRs-Fixed: 2540583
2019-10-28 18:03:02 -07:00
Nisha Menon
f7c5baa657 qcacmn: Fix for IPA rx buff map failure
Add an atomic variable to indicate IPA pipes are connected.
Use it to ensure that SMMU mapping for rx buffers is sent
to IPA even if REO is not remapped but IPA pipes are connected.

Change-Id: I5d82dc073fc2f0de6df102f7bfd2a1e945297aa8
CRs-Fixed: 2552128
2019-10-28 13:31:20 -07:00
Yeshwanth Sriram Guntuka
84f7fa87a8 qcacmn: Cleanup sta index from a few structures
Change-Id: Iad126044945eaa28c3d859a96a741a1046529cdb
CRs-Fixed: 2529131
2019-10-28 12:23:48 -07:00
Venkata Sharath Chandra Manchala
8a4812f7fc qcacmn: Enable TSO Stats for Lithium based products
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.

Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
2019-10-28 07:11:53 -07:00
Guisen Yang
2b07141773 qcacmn: Fix the build failure of illegal usage of log
In function target_if_direct_buf_rx_register_events(), the
API direct_buf_rx_info() is used to record log, but the
format is wrong. Fix the log format.

Change-Id: I81bc128e110570d96ca95dfbe773121272eb2588
CRs-Fixed: 2547235
2019-10-28 04:16:27 -07:00
Wu Gao
5988e8b7d2 qcacmn: Remove unnecessary logs in loop
There is unnecessary logs in loop which affect useful log capturing.

Change-Id: I37b2c8123a280e4ec080ac1fb75e43135936fd79
CRs-Fixed: 2552104
2019-10-27 19:27:56 -07:00
Krishna Rao
5304724e59 qcacmn: Add Agile Spectral frequency to Spectral SAMP message
Add Agile Spectral frequency to Spectral SAMP message and populate the
same. This coexists with the pre-existing operational frequency in
SAMP message for the sake of flexibility.

Change-Id: Iadb8efeaac924df5b0ac9a83f630206b2ef93052
CRs-Fixed: 2545763
2019-10-27 17:28:49 -07:00
Priyadarshnee S
be7b7b2562 qcacmn: Add frequency APIS in UMAC Dispatcher
To avoid "channel number" collision that was introduced after 6Ghz band was
added to the driver, add frequency based APIs to Global UMAC dfs
dispatcher.

CRS-Fixed: 2526372
Change-Id: Ice72aae699f609f9dadd0717852fa848cb392629
2019-10-27 15:19:21 -07:00
Priyadarshnee S
38da66f0dc qcacmn: Add frequency APIS in DFS Core, TGT DFS and DFS Utils
To avoid "channel number" collision with the introduction of
6GHZ frequency band, add frequency-based APIs to DFS Core.
Also, do not remove the old IEEE channel-number-based APIs that are still
referenced.

The DFS APIs of Target-IF layer and DFS UTILS in DFS dispatcher layer are
included as a part of this change as they invoke DFS Core APIs and are
dependent.

CRs-Fixed: 2526372
Change-Id: I7a00ca5796e9c81527438c326c2d41de1147ffee
2019-10-27 15:19:17 -07:00