Commit Graph

1810 Commits

Author SHA1 Message Date
Ananya Barat
9fe151a881 qca-wifi-oss: Design a unified SM for Agile PreCAC and RCAC
Following is the list of changes :-

1. Add an API dfs_agile_precac_cleanup to reset all dfs variables
   while going from running to init state.
2. Add a parameter is_chan_found to dfs_prepare_agile_precac_chan and
   make it true if a channel is available for PrCAC/RCAC.
3. Post event done to Agile SM when firmware returns ocac complete for
   a particular agile channel.
4. Post event done if preCAC timer expires from driver for a particular
   agile channel.
5. Remove the zero second timer mechanism of starting of Agile PreCAC,
   instead regulate it completely using the Agile SM.
6. Add API dfs_is_agile_cac_enabled which checks if either PreCAC/RCAC
   is enabled. Events are not posted to the Agile SM if none of these
   are enabled.
7. Add API dfs_abort_agile_precac used to send abort to F/W for that
   specific DFS index.
8. Add API dfs_init_agile_start_evt_handler to handle the start event in
   init state of Agile SM. This checks if a channel is available for
   PreCAC/RCAC.
9. In init and running state of the SM handle events for both PreCAC and
   RCAC, while complete state is for RCAC alone.

10. Following is the algorithm implemented in the  Agile SM :

   The Agile SM is per psoc, create it when the psoc is created.
				|
   On receiving the VAP start resp, send a start event to the SM in
   init state. In the start event handler check if a PreCAC/RCAC channel
   is available and if found configure the agile channel params and send
   a WMI to F/W.
				|
   A OCAC complete is received on completion of CAC by F/W or the host
   timer might expire. In either case mark the channel as CAC done.
   Check if interCAC was running and the channel is the des chan, if so
   a primary channel change is automatically triggered.
				|
   In the event of mode switch/scan start/VAP down/primary channel change
   while PreCAC is running a stop event is received. Clear all dfs
   structures and go to init state.
			        |
   On receiving a radar in the Agile channel, go to the init state and
   set event as start. Radar in primary channel is taken care of by
   ensuing VAP down up.
				|
   When no other channels are pending PreCAC, clean all dfs structures
   and remain in the init state. PreCAC uses only init and running
   states of the SM.

Change-Id: I231c79d381c7c3e192bea8ebff1ee6b5dc4a3cfa
2020-08-02 10:20:30 +05:30
Ananya Barat
490187bdcd qca-wifi: Rename the RCAC State Machine events, states & APIs
Both (ETSI) PreCAC and RCAC are going to use use the same state
machine. The state machine drives the Agile engine and not very specific
to RCAC or PreCAC, therefore let the state machine be called agile state
machine and change the names of all the associated variables accordingly.

In this preparatory change, modify names of all APIs, states and events
to make them common to Agile RCAC and Agile PreCAC

Change-Id: I83835e0295bc97e1099c0e01fc6b2fce62437872
2020-08-01 15:36:55 +05:30
Linux Build Service Account
d17b128635 Merge "qca-wifi: Fix channel sync issue in RESTART sequence" 2020-07-30 01:11:04 -07:00
Linux Build Service Account
94f663adac Merge "qca-wifi: Multi-Link Fast-lane switch fix" 2020-07-29 04:06:28 -07:00
Srinivas Pitla
a985c9974e qca-wifi: Fix channel sync issue in RESTART sequence
If START request is deferred due to RESTART pending logic, in few cases
it is leading to configuring two channels to FW.

This change checks desired channel of START req deferred VDEVs and updates
the desired channel with RESTART VDEV's desired channel

Change-Id: Ic69c10c08fd4d83aafcab97a71ce906564ab51f6
CRs-Fixed: 2713931
2020-07-28 14:59:55 -07:00
Linux Build Service Account
d8fbb4ff60 Merge "qca-wifi: Avoid processing of PPDU USER multiple times in Tx capture" 2020-07-28 14:37:33 -07:00
Subhranil Choudhury
ac9c2d3346 qca-wifi: Multi-Link Fast-lane switch fix
The change is to take care of primary radio setting
when STA/AP vaps of fast-lane radios switch.

Change-Id: Iee6815a73f5e95e48887e3dc683ede1d2b2091c7
2020-07-28 13:25:01 -07:00
Linux Build Service Account
fba80373cc Merge "qca-wifi: Fix tx capture tid init issues" 2020-07-27 13:37:05 -07:00
Linux Build Service Account
039426874a Merge "qca-wifi: Add 80p80_enabled flag while finding RCAC channel" 2020-07-27 13:37:04 -07:00
Linux Build Service Account
c4aaaef829 Merge "qca-wifi: Memory optimization for PPDU stats" 2020-07-26 23:49:36 -07:00
Linux Build Service Account
1a240b4b61 Merge "qca-wifi: Do not add peer to vdev multipass list" 2020-07-26 09:36:08 -07:00
Amir
faed50508a qca-wifi: Do not add peer to vdev multipass list
Do not add peer to vdev multipass list if it is already part of
vdev list

Change-Id: Ifa61cd49a9fd5a84fc751782673ba7afeaa2f00f
CRs-Fixed: 2716723
2020-07-26 13:15:53 +05:30
Linux Build Service Account
131969a76c Merge "qca-wifi: Modify rawsim_debug to support debug levels" 2020-07-25 11:14:06 -07:00
Linux Build Service Account
05984e7f5f Merge "qca-wifi: Remove references to CHAN_NUM_API" 2020-07-25 04:37:10 -07:00
Shwetha G K
0e164ad61f qca-wifi: Modify rawsim_debug to support debug levels
Modify rawsim_debug command to support levels of rawmode
simulation. level 0: Disable logging 1:Header logging 2:full
packet logging. Also add encap and decap frame count support.

Change-Id: Ia24994ecaf14da1fa1c303b69278fad27c18c75e
2020-07-25 10:41:55 +05:30
Linux Build Service Account
e9537e9a2a Merge "qca-wifi: Enable ATF stats feature commands" 2020-07-24 08:06:49 -07:00
Vignesh Mohan
8b5ce9a790 qca-wifi: Add 80p80_enabled flag while finding RCAC channel
While finding RCAC frequency, if you're current bandwidth is 165MHz
(pine 80p80MHz), add 80p80_enabled flag for Rolling CAC random
channel selection, which allows the channel selection logic to
fallback to 160MHz bandwidth and find a channel.

CRs-Fixed: 2738917
Change-Id: I70add1b2a3c3252b1bd6bf99cffc9b9727be4f56
2020-07-24 00:13:30 -07:00
Linux Build Service Account
367318a930 Merge "qcawifi: resolve issue on updating protocol tag." 2020-07-23 23:39:35 -07:00
Manoj Ekbote
2d96374ca3 qca-wifi: Memory optimization for PPDU stats
Currently, per-user information in Tx PPDU completion is allocated for
37 users though FW may send information for fewer number of users. In
new scheme, FW provides number of users in USERS_INFO TLV and host can
allocate the per-user struct based on this number. This can save memory
while processing each completion message.
Make related changes in tx capture files to use pointer instead of fixed
size member.

CRs-Fixed: 2730933
Change-Id: I8709665a481d64dc4ab086ce9b27e8837c38b53f
2020-07-23 23:21:21 -07:00
Subrat Mishra
8c9a192cd4 qca-wifi: Enable ATF stats feature commands
Enable ATF stats fearure commands and remove get_atf_stats.
Get ATF Stats command will be added as IOCTL command to use in
wlanconfig.

Change-Id: Ib029abf5401d9002151bbaa9eef1c199df3daa0c
2020-07-23 03:28:59 -07:00
nobelj
36e778c0f8 qca-wifi: Add support to store and display ppdu desc
Debugfs is added to store the last 30 ppdu desc and display
as readable format to user. Feature of storing ppdu desc is
enabled through debugfs and it is not enabled by default.

Change-Id: I85ff52760462abd9a6e33d082db45d8179e67c0d
2020-07-23 03:15:57 -07:00
Linux Build Service Account
a413bf278f Merge "qca-wifi: Extap mode secondary radio unicast packet handling" 2020-07-22 23:44:35 -07:00
Vijay Krishnan
ffc8f364be qca-wifi: Remove references to CHAN_NUM_API
During 6G development, CONFIG_CHAN_NUM_APIs are kept for backward
compatability. Remove CONFIG_CHAN_NUM_API macro and remove all the
references to any function defined/declared under the macro.

CRs-Fixed: 2711597
Change-Id: Iac5d57e4e0fb1fa54b0225a5cb206e8f1fe1353d
2020-07-22 23:03:57 -07:00
Srinivas Pitla
aa3e76eb38 qca-wifi: Avoid processing of PPDU USER multiple times in Tx capture
Currently, same user can be processed multiple times, which leads to
release ref count wrongly, with this, some of the users in PPDU
desc are never processed and can possibly cause memory leak.

Added a flag in PPDU user to indicate that the user is already
processed.

CRs-Fixed: 2718150
Change-Id: Ia00e0ad12999578157e9f8a6df0ad4763f828c88
2020-07-22 10:28:59 -07:00
syed touqeer pasha
0107d0ca4a qca-wifi: Extap mode secondary radio unicast packet handling
when secondary unicast from station takes rx_to_tx path
and reaches host, enqueue directly to nss ap node.

Change-Id: I03b3e9488683376fa9a12c574ba230ebaa55c98d
2020-07-22 00:20:46 +05:30
Srinivas Pitla
d0e7ec087c qca-wifi: Fix tx capture tid init issues
For some peers, tx capture tid init is not invoked,
It is resulting in ppdu_desc leak.

Invoking tid init on tid peer update, if tid is not
initialized.

Change-Id: Ia49c7e6d093a42e57e8d9239a60ad0b8dabfcc5b
CRs-Fixed: 2718150
2020-07-21 11:29:38 -07:00
Shaakir Mohamed
a69fa6f81f qca-wifi: Add cfg80211tool cmd to enable oce version override
Add cfg80211tool cmd to set/get oce version override.

Change-Id: Ib53aabdf8e6404253cf225c2c30972409727c1a8
CRs-Fixed: 2726565
2020-07-20 13:46:19 -07:00
Linux Build Service Account
ef0d22dbb5 Merge "qca-wifi: Add conditional check to avoid fault" 2020-07-14 19:10:29 -07:00
Kai Chen
5612428719 qcawifi: resolve issue on updating protocol tag.
Skip protocol tag updating from msdu end TLV protocol tag meta data
when there is RXDMA REO entrance push error on monitor destination ring.
The attention and msdu end TLV is not updated reliably when there
is RXDMA REO entrance push error such as FCS error on monitor
destination ring.

Change-Id: I47ab7da3a239080c1ab608c5001f65c4849b7b3a
2020-07-14 13:18:53 -07:00
Linux Build Service Account
e5977a6360 Merge "qca-wifi: Mark Action Frames as Non Self_Gen" 2020-07-14 09:40:49 -07:00
Mainak Sen
e1678aaca8 qca-wifi: Add conditional check to avoid fault
Add conditional check to avoid null struct pointer dereferencing

Change-Id: I35036b5fb9a774fae44b4e9e1a0d2f43e7c38723
2020-07-12 22:01:30 +05:30
Linux Build Service Account
3603805c59 Merge "qca-wifi: Add enable_statsv3 command" 2020-07-10 08:37:56 -07:00
Christopher Chopp
79c6331413 qca-wifi: Mark Action Frames as Non Self_Gen
Add check for action frames in tx capture feature and
manually mark selfgen as false.

Change-Id: I37e25f323ebd65240810dbb2b6ddb8fec3e1c66c
2020-07-09 11:19:05 -07:00
Kousikan Mohanraj
c148f14047 qca-wifi: Add enable_statsv3 command
Add enable_statsv3 command for cfg80211tool

Change-Id: Iad26132db00e6486586ab9820f88241794072c25
2020-07-09 12:54:36 +05:30
Vignesh Mohan
21c6741f48 qca-wifi: Modify the autochannel switch design
In autochannel switch feature, a user configured primary channel
is prioritized for preCAC and after preCAC completion, the channel
is used as the primary operating channel of the device.

To acheive this, the existing preCAC lists were reordered since
every entry of the list was of a fixed 80MHz bandwidth and the
channels to be prioritized were also provided as 80MHz. i.e the list
entry to be prioritized will be made as the list HEAD.

This logic was only possible because the preCAC lists were channels
of 80MHz bandwidth. After the agile 160MHz changes, the preCAC lists
were now of variable bandwidth, from 20-160MHz. Reordering a 160MHz
channel will not allow the expected 80MHz channel to run first.

To fix this issue in autochannel switch algorithm, instead of
reordering the lists,
1. Remember the user desired channels to be prioritized in
   dfs structure.
2. Before picking a channel for preCAC, see if the autoswitch desired
channel is configured
3. If yes, check the preCAC state of those channels.
4. If the preCAC state is "PRECAC_REQUIRED", use this channel to run
   preCAC.

CRs-Fixed: 2723206
Change-Id: Icd6d01adfae6dfa63d0733c5dae6d6494a660190
2020-07-07 22:41:37 -07:00
Linux Build Service Account
a05a705913 Merge "qca-wifi: Fix user index for rts, cts frame" 2020-07-07 14:09:18 -07:00
Linux Build Service Account
3a90a2e495 Merge "qca-wifi: tx capture modify config lock with user mode flag" 2020-07-07 10:37:37 -07:00
Linux Build Service Account
6e35159528 Merge "qca-wifi: Add srng history for monitor mode" 2020-07-01 09:06:46 -07:00
nobelj
1c7273d13c qca-wifi: tx capture modify config lock with user mode flag
user mode flag is added instead of config lock.

Change-Id: Ie83823d1bfff9b50fe3e87faa929882cfeb8b5c7
2020-06-30 12:44:18 -07:00
Vignesh Mohan
3b5fc93c6b qca-wifi: Set Agile DFS active for the calling PDEV
As part of vdev start response, dfs_precac_agile_start() is
called which is intended to set the agile active bit for
the VAP's pdev and start preCAC if possible and not already
running. The active bit for a dfs/pdev indicates that there
is at least one active VAP for that dfs/pdev object.

To set the "agile_precac_active" bit, the "cur_precac_dfs_index"
is used instead of the index of the "dfs" that calls the function.
"cur_precac_dfs_index" need not always indicate the "dfs" that
calls the function.

Consider a case where there are two active 5G radios (DBS_SBS),
both with preCAC enabled. For the first vdev start response of
radio A, dfs_precac_agile_start() is called which sets the agile
precac active bit for radio A and starts preCAC. Now for the
first vdev start response of radio B, dfs_precac_agile_start will
set the current preCAC index as active, which is radio A (which
was already set). The agile preCAC active bit is never set for
radio B even though it has an active VAP and agile capable.
Because of this, after radio A completes preCAC, radio B does
not get a chance to run preCAC for it's channels.

Set the agile precac active bit for the calling radio,
irrespective of which pdev is currently running preCAC, to allow
preCAC when the radio get's a chance.

CRs-Fixed: 2705681
Change-Id: Id11c910c69c85ce9ae03e7989e784a272d5cd905
2020-06-30 19:38:02 +05:30
Linux Build Service Account
2e7ea6f5d0 Merge "qca-wifi: Assert if HAL srng is NULL or not initilized" 2020-06-29 22:40:02 -07:00
Linux Build Service Account
c31c165fa3 Merge "qca-wifi: Remove double validation of Tx Stats" 2020-06-26 14:40:27 -07:00
Linux Build Service Account
fd82563e25 Merge "qca-wifi: Add ATF stats enable command" 2020-06-24 10:39:13 -07:00
phadiman
a8a1a96806 qca-wifi: Remove double validation of Tx Stats
Remove double validation of ppdu_user tx_ratekbps
and ppdu_user rate index while updating per peer 
Tx statistics

Change-Id: I9d4b65556928b21ee6caa10fb15193c8705ad2af
2020-06-24 13:08:42 +05:30
Linux Build Service Account
d0fcd6b5d3 Merge "qca-wifi: fix deauth in tx capture on peer filter" 2020-06-23 16:12:33 -07:00
Linux Build Service Account
54ab893d1a Merge "qca-wifi: Assign proper precac_index for legacy preCAC" 2020-06-23 12:10:19 -07:00
Subrat Mishra
1898a5b975 qca-wifi: Add ATF stats enable command
Add Airtime Fairness stats enable command with stats timeout command.

Change-Id: Id9bf0a5a94a171344f2606205a6c7a439353f039
2020-06-22 22:01:33 -07:00
Ananya Barat
aa031969f9 qca-wifi: Assign proper precac_index for legacy preCAC
Bring up a Cascade AP in HT80 mode, country DK and enable preCAC config.
During vap start, a preCAC channel is chosen by invoking
tgt_dfs_find_vht80_precac_chan_freq() and then
dfs_start_precac_timer_for_freq() is invoked to start the preCAC timer.

In dfs_start_precac_timer_for_freq(), the dfs pdev object is fetched
indexing cur_precac_dfs_index in DFS SOC object as follows:
"dfs_soc_obj->dfs_priv[dfs_soc_obj->cur_precac_dfs_index].dfs".

The cur_precac_dfs_index is initialized to 0xFF in dfs_rcac_sm_create().
This index is then over-written to the current DFS pdev index in case
of agile preCAC in dfs_prepare_agile_precac_chan() API. This API is not
invoked in case of legacy preCAC and hence cur_precac_dfs_index continues
to hold 0xFF. This leads to kernel paging request failure
and the system crashes.

Initialize 'cur_precac_dfs_index' to dfs->dfs_psoc_idx which holds
the index of the active dfs pdev.

CRs-Fixed: 2708233
Change-Id: I3aae7ea8f611d72bfe23c20cc2a34d94bba83485
2020-06-22 13:32:41 +05:30
Himanshu Batra
6a0b7ae928 qca-wifi: Correct cfg80211 display_me_info param type
Correct cfg80211 display_me_info param type from set to get

Change-Id: Ib8c2b98b31d2ed179a9791d54ecf482060883f32
CRs-Fixed: 2715344
2020-06-21 19:54:45 -07:00
Linux Build Service Account
f5b44af464 Merge "qca-wifi: Stop precac timer for OCAC completion on 165MHz channel" 2020-06-19 23:41:34 -07:00