Commit Graph

9194 Commits

Author SHA1 Message Date
Santosh Anbu
3a67ec1735 qcacmn: Optimize the scan filter structure using bitfields
Add change to move the existing filter params bool datatypes
into bitfields and also add new filter type to filter candidate
with channel marked as DFS hit.

Change-Id: I4aa5d7342cf7880da20c35eebd99fc72a71b58be
CRs-Fixed: 2746157
2020-08-04 12:58:03 -07:00
Jinwei Chen
d555d146a4 qcacmn: add duplicate link desc check when refill
Same back to back link descriptor address/cookie is observed in
WBM idle link desc ring.
add duplicate link desc check when host
refill link descriptor to WBM through SW2WBM release ring,
also REO reinject ring.

Change-Id: Iaf9defd87670776fa9488d7f650efa3c08fefa60
CRs-Fixed: 2739879
2020-08-04 08:02:35 -07:00
Hariharan Basuthkar
e7e30c3ce1 qcacmn: Add wlan_reg_is_5ghz_op_class and wlan_reg_is_2ghz_op_class
Add APIs wlan_reg_is_5ghz_op_class and wlan_reg_is_2ghz_op_class,
to check if an input opclass is a 5ghz, and 2ghz opclass respectively.

Change-Id: I677b5e927ac9060f65b71eee838073348d06d4b2
CRs-Fixed: 2732373
2020-08-04 08:02:32 -07:00
Ananya Barat
b63669d9e2 qcacmn: Handle Agile PreCAC in the same SM as RCAC
Following are a part of this change:-

1. Add an API to check if PreCAC/RCAC is enabled. This API is used before
   delivering an external event to Agile SM.
2. Post an event to the Agile PreCAC SM if Radar is found on
   agile channel. Radar on primary channel is taken care of by the
   ensuing channel change.
3. Move all Agile PreCAC changes under macro QCA_SUPPORT_AGILE_DFS,
   only RCAC specific changes remain under QCA_SUPPORT_ADFS_RCAC.

Change-Id: I45d4b9f826d36e9e4093879b394165a15a52f324
2020-08-04 03:54:39 -07:00
Visweswara Tanuku
82befeaf2a qcacmn: Update status field in wmi_twt_del_dialog_complete_event_param
Update status field in wmi_twt_del_dialog_complete_event_param
during extraction of wmi event TWT_DEL_DIALOG_COMPLETE buffer

Change-Id: I89abaff01f27ebdde556eb3d1f37c723001ce2cb
CRs-Fixed: 2746112
2020-08-04 03:54:35 -07:00
Santosh Anbu
6315ce5dd1 qcacmn: Add dependency of blacklist manager macro at WMI layer
The blacklist manager macro is connection manager specific, whereas
the macros used at WMI is dependent on roam offload.
Hence mark of dependency of FEATURE_BLACKLIST_MGR on
WLAN_FEATURE_ROAM_OFFLOAD.

Change-Id: If48b701a450d34915d57780a274311aa2590c89a
CRs-Fixed: 2746160
2020-08-03 19:08:13 -07:00
nobelj
4dd08941dd qcacmn: add fix to send ppdu in sequential order
logic of holding ppdu info list is modified to store it
in sequential order.

Change-Id: I179e76f4bb1663e141e48df5f274ac5fd1b81bbc
2020-08-03 13:28:35 -07:00
Jeevan Kukkalli
94c430da4a qcacmn: Notify HMWDS ast add status to upper layers
Notification is sent in following two scenarios.
 - After call to dp_peer_add_ast() if we are not expecting any
   peer map event.
 - When HTT peer map event is received.

Change-Id: Id926d1cec1ee64520b0368fcc5000988c24e0513
CRs-Fixed: 2745542
2020-08-03 11:23:43 -07:00
Shwetha G K
66c83b2fbe qcacmn: Disable net_buf double-free panic when DISABLE_MEMDEBUG_PANIC set
Disable net_buf double-free panic when DISABLE_MEMDEBUG_PANIC set

CRs-Fixed: 2734030
Change-Id: I95b4e79e1e0607f39a950a3b96c70a066adee04d
2020-08-03 09:13:19 -07:00
Anirban Sirkhell
800a2c6059 qcacmn: Export api to select log levels
This will be used to initialize based on value provided
in ini file.

CRs-Fixed: 2738127

Change-Id: I3d385a7a88a6a5fdd0ff8949ac1a349880e38575
2020-08-03 07:13:45 -07:00
Hariharan Basuthkar
27dc40344d qcacmn: Check the state of 4.9G channels in reg_compute_chan_to_freq
In the 5G radio, if the current regulatory domain does not support
4.9Ghz channels, and if 4.9Ghz IEEE channel number 1 to 11 are given as
an input to reg_compute_chan_to_freq, instead of returning 0,
it returns the corresponding center frequency of the 4.9 Ghz IEEE
channel number.

This is because the channel state and chan_flags of the 4.9Ghz channel
are not checked, that is why it returns the valid channel frequency.

To fix this issue, check the channel state and chan_flags of the
4.9Ghz channel before returning the non-zero channel frequency.

Change-Id: Icedd74422b4194ac4f1affed7e9f131fb8426986
CRs-Fixed: 2738248
2020-08-03 04:06:50 -07:00
Rakesh Pillai
9beeaa95a7 qcacmn: Add history to track the entries in rx rings
The rx rings are relatively of smaller size. Any
duplicate entry sent by hardware cannot be back-tracked
by just looking at the ring contents alone.

Hence add a history to track the entries for the
REO2SW, REO exception and SW2REO ring.

Change-Id: I9b0b311950d60a9421378ce0fcc0535be450f713
CRs-Fixed: 2739181
2020-08-02 11:01:41 -07:00
Ananya Barat
bc798a3c5c qcacmn: 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: I67858839589145bf4377a7eafec7c21ca4823141
CRs-Fixed: 2711104
2020-08-02 08:57:54 -07:00
Harsh Kumar Bijlani
cc9f9c7c1f qcacmn: VHT/HE info in radiotap header of mgmt & control frames
In monitor mode, radiotap header contains VHT/HE information in management
and control frames after association of STA to AP.For this,reset of
ppdu_info is required before processing of ppdu in order to avoid reuse
of ppdu_info.

Change-Id: Ia36ec2664f79d645ff76db016f986dfb92ec8bbd
CRs-Fixed: 2734804
2020-08-02 04:57:31 -07:00
Jinwei Chen
da291f0045 qcacmn: Skip monitor status ring accessing if DISABLE_MON_CONFIG is set
Skip monitor status ring accessing if DISABLE_MON_CONFIG is set

Change-Id: Ia91bb4eb68c8fa301557d3b713a9e94b9cb8ee2b
CRs-Fixed: 2744524
2020-08-02 02:01:04 -07:00
Ankit Kumar
2b9e4ba1cb qcacmn: Add QDF wrapper for nbuf frag ops
Introduce qdf wrapper API for nbuf frag based ops.

Change-Id: I0f4c1cb1aa9fcdd9dc2fc2f5716860eb286a1932
CRs-Fixed: 2733972
2020-08-01 21:08:57 -07:00
Rakesh Pillai
d7a0b3f14c qcacmn: Handle the nbuf sanity failure gracefully
Th nbuf sanity can fail in case when HW posts the
same buffer twice. This case can be handled gracefully
by just skipping the processing of the corresponding rx
descriptor.

Change-Id: I471bb9f364a51937e85249996e427f15872bda97
CRs-Fixed: 2738558
2020-08-01 21:08:54 -07:00
bings
e344f80463 qcacmn: Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit
lock_cookie_freelist is global static, which means it is set as NULL when
loading driver module. It works well when there is only one driver module.
For the CE platform with CONFIG_WLAN_RESIDENT_DRIVER defined, driver is
split into two modules, one module keeps variables and functions in
kernel, the other module is used to trigger rmmod/insmod function. In this
case, lock_cookie_freelist is not NULL when insmod is triggered the second
time through the second module.

Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit.

Change-Id: Ia20fcc230c3a43eed9b646689348ad37b77811f2
CRs-Fixed: 2742118
2020-08-01 21:08:51 -07:00
hqu
f2067eb53f qcacmn: Add ucfg API to reset im stats and freq ctrl params
When dcs happened for three times in five minutes, then do
restart(start/stop) SAP operation, when SAP is started again,
dcs may happen again quickly, if total four times dcs happened
in five minutes, dcs_disable_timer will be started due to dcs
happened frequency control policy, it will disable wlan
interference detection for 30 minutes and dcs interference
detection won't work for 30 minutes, it's unreasonable. After
SAP restart, dcs happened times should be calculated from zero.

Add ucfg API to reset im stats and freq ctrl params.

Change-Id: I4ad8234349d24f044dff700d90e1bec859eaa397
CRs-Fixed: 2739299
2020-08-01 13:13:44 -07:00
Manikanta Pubbisetty
d315e2d238 qcacmn: add INI to enable/disable RX buffer pool
Add a new INI parameter to enable/disable RX buffer pool.

Change-Id: I186f2e1c4f4d008371efb6b041dc93e029c2f7c3
CRs-Fixed: 2731517
2020-08-01 13:13:40 -07:00
Manikanta Pubbisetty
fa2844b787 qcacmn: DP RX changes for RX buffer pool support
DP RX changes to support RX buffer pool, this is a pre-allocated pool
of buffers which will be utilized during low memory conditions.

Change-Id: I8d89a865f989d4e88c10390861e9d4be72ae0299
CRs-Fixed: 2731517
2020-08-01 13:13:36 -07:00
Manikanta Pubbisetty
ea9aadb12d qcacmn: add RX buffer pool support
Add support for RX buffer pool, this is a pre-allocated pool
of buffers which will be utilized during low memory conditions.

RX buffer replenish will fail when the system is low in memory;
this is okay if the condition is momentary, but if the
system persists in such state for longer duration, then HW will
run out of free buffers and this results in a crash.

RX buffer pool will be helpful in such scenarios. Buffers from
the pool will be given to the HW when the system is running low
in memory.

Change-Id: I7ca1159d858227a0a2021235d24d763e56ac0b27
CRs-Fixed: 2731517
2020-08-01 13:13:33 -07:00
Bapiraju Alla
1f62560b58 qcacmn: Update log to console INI to support per log level
Currently, the INI param wlanLoggingToConsole is used to enable
or disable WLAN logging to console. It will enable/disable console
logs for all log levels i.e. FATAL/ERROR/WARN/INFO. There is no
provision to enable/disable console logs for specific log level.

To address this, change wlanLoggingToConsole INI as bitmap with each
bit representing a log level. Enable/disable console logs based on
this bitmap.

Change-Id: If3172195a2ee86d21c4c03f441a4cc3e2780dd82
CRs-Fixed: 2734707
2020-08-01 11:02:24 -07:00
Naman Padhiar
a791b154c5 qcacmn: Send WMI HOST WAKEUP command over QMI
Add support to send HOST_WAKEUP WMI command over QMI for
WCN6750 target. Host sends HOST_WAKEUP command over QMI
itself and FW brings target out of power save mode, process
HOST_WAKEUP command and send back corresponding event over QMI.

Change-Id: I897749391683a7a7b53d4b6af57f258b1e02135c
2020-08-01 09:01:07 -07:00
Shwetha G K
26c199c8d6 qcacmn: Update chan_capture_status fetch logic for QC9000
In QC9000, the channel capture status gets update in reserved_8
field's lower 2 bits only. Remaining bits are used for debug.

CRs-Fixed: 2740908
Change-Id: I97321addb18f8e5944f5f58d670dfa9858dca4ec
2020-08-01 09:01:04 -07:00
Rajasekaran Kalidoss
2415379851 qcacmn: Add event id's for TWT complete events
Add TWT event ID's for add, delete, pause and
resume twt events.

CRs-Fixed: 2743159
Change-Id: If4a0972ab41b88bdcffeb93f60afda9ffb9f9108
2020-08-01 09:01:00 -07:00
nobelj
4e788e664c qcacmn: fix tx capture MU data and bar frame ctrl
copying mu data info is done inside schedule command status tlv
and handling based on completion status is added.

Change-Id: I2792d754a4fa3e2992d68f569c9ce40be8ff02e2
2020-07-31 20:16:09 -07:00
Jeevan Kukkalli
b9dee38eec qcacmn: Add new WDI event and event structure
New WDI event WDI_EVENT_HMWDS_AST_ADD_STATUS to indicate
status of HMWDS peer ast add action to upper layers.

Change-Id: I49afd4b1b64596ef59261e3da1677955c10a7804
CRs-Fixed: 2729299
2020-07-31 16:26:41 -07:00
gaurank kathpalia
1adfeac4b8 qcacmn: Enhance BLM infra
Enhance BLM infra to include source,
reason for blacklist, original timeout,
received time for better debug.

Change-Id: I9bad1970816bc45e16331f90182f1d9d4a01d6eb
CRs-Fixed: 2744400
2020-07-31 16:26:38 -07:00
Manikanta Pubbisetty
f3a83d1757 qcacmn: support new htt interface changes for FISA
HTT interface to enable FISA has been modified to accomadate only
FISA enable and aggregation limit fields, rest of the fields will
be initialized by the firmware; this change is in accordance with
it.

Change-Id: Ia5950541b8d852029650c02e81c097bf049e54c5
CRs-Fixed: 2731543
2020-07-31 16:26:35 -07:00
Shwetha G K
540ae68533 qcacmn: Support capture_count and MO marking enhancement
Send capture_count, capture_interval_mode_sel and MO marking
field as part of WMI_CFR_CAPTURE_FILTER_CMDID command.

Change-Id: Icf2738d49eaea711f69915302dc2655298958a33
2020-07-31 14:13:11 -07:00
Abhinav Kumar
e936132a21 qcacmn: Save info related to WTC BTM roaming
Save info related to WTC BTM roaming coming via
wmi_roam_trigger_reason_tlv_param.

Change-Id: Iec089ba48b2ff30c09838119144b2b0f0abf9e65
CRs-Fixed: 2740598
2020-07-31 12:02:38 -07:00
Pragaspathi Thilagaraj
8fe9240f54 qcacmn: Fix possible OOB access while sending ext stats request
In 32-bit systems, currently there is possible oob access in
send_stats_ext_req_cmd_tlv() is preq->request_data_len is
uin32_t max and len is also of type uint32_t.

Fix possible OOB access while sending ext stats request message
to firmware by validating the requested data length against the
difference between wmi max message size(WMI_SVC_MSG_MAX_SIZE),
size of the wmi command fixed param and wmi tlv header size
WMI_TLV_HDR_SIZE.

Change-Id: I769c9a6b7c0e0f76e2ec1070cac6c69768816454
CRs-Fixed: 2724256
2020-07-31 12:02:35 -07:00
Vignesh U
55d2f9474a qcacmn: Modularize finding radar affected sub channel function
The radar affected sub channel are determined by the bangradar type,
whether sub-channel marking is enabled or not, the center frequency
of the band on which the radar was detected. This block of code is present
in processing radar indication function and can be modularized.

Move the logic to find radar affected sub-channels into a single function.

Change-Id: Ic0a37fdfa97cbc1bcd2b9a23fd6642f22b43a733
CRs-Fixed: 2737120
2020-07-31 09:54:01 -07:00
Jayachandran Sreekumaran
d2c1b38caa qcacmn: Add support for frame delay operation
Add frame delay support for IOT Simulation.

Change-Id: I1ae2f681cde5d3e4092bf65a34f48290af6877d3
CRs-Fixed: 2734410
2020-07-31 09:53:57 -07:00
Jayachandran Sreekumaran
3be1a0a167 qcacmn: Add qdf API for delayed workqueue
Add qdf API for delayed workqueue

Change-Id: Ic67f200ac6c9749b088bbd0769491d22583eed11
CRs-Fixed: 2738374
2020-07-31 07:43:44 -07:00
Jayachandran Sreekumaran
acd85ae613 qcacmn: Add support for peer based rule in iot_sim
Add support for peer based rule in iot_sim for frame
drop and delay operations.

Change-Id: I9d5b330d750aee868cf7ea2932bf8d7ce1d0d54f
CRs-Fixed: 2733909
2020-07-31 07:43:41 -07:00
Jayachandran Sreekumaran
1d96b191cf qcacmn: Add frame drop support for ADDBA Response
Add frame drop support for ADDBA Response

Change-Id: Id836f84a154ede034db91b669691afa2925262bc
CRs-Fixed: 2733849
2020-07-31 07:43:38 -07:00
Chaithanya Garrepalli
59fc94ae9f qcacmn: Add API to check if peer exist on a PDEV
In add AST API check if peer with mac address exist
on a PDEV

Change-Id: Ied67e461faf769c444d29d1bce79405f51012ea2
2020-07-31 03:44:57 -07:00
Hariharan Basuthkar
504e0726c7 qcacmn: Add a new API wlan_reg_is_6g_freq_indoor
Add a new API wlan_reg_is_6g_freq_indoor, to check if a 6G channel
frequency is indoor.

Change-Id: I2ccdcc2760b6aeade0409346a315b004014525c7
CRs-Fixed: 2731637
2020-07-31 03:44:54 -07:00
Rakesh Pillai
7bad5a8ce3 qcacmn: Increase the size of reo reinject ring
Currently when running downlink traffic with
fragmentation enabled, the SW2REO is getting
full. Increase the SW2REO ring size to 128 entries.

Change-Id: If43bc72a8cc173d44953ca367573800243b1cc5d
CRs-Fixed: 2738309
2020-07-31 03:44:51 -07:00
Alok Kumar
b00f74430d qcacmn: Check target ready before accessing registers on qca6750
Before accessing any register on chip 6750, check if target is
ready or not.

Do not allow register access if target is not ready.

Change-Id: I41a604d04e861c97bdd676998222ccecbf12fd5a
CRs-Fixed: 2688920
2020-07-30 02:05:59 -07:00
Abhishek Singh
9d14f9d71a qcacmn: Rename mlme_cm_* apis to cm_* apis
Rename connection manager mlme_cm_* apis to cm_* apis.

Change-Id: I90129b2b71b121dd684890677d2d23e921a57574
CRs-Fixed: 2740376
2020-07-30 02:05:56 -07:00
gaurank kathpalia
26ea02a1ea qcacmn: Handle connect and disconnect events in connection manager
Handle connect and disconnect events in connection manager state
machine.

Change-Id: I62cba42ed726c3cc61343109c4e3208eba0d7e9e
CRs-Fixed: 2740300
2020-07-29 23:59:06 -07:00
Kiran Kumar Lokere
639e3bc96b qcacmn: Set RRM scan type indication in scan control flags
Send RRM scan type indication in scan control flags to FW to scan
the channel for given duration after the FILS is detected.

Change-Id: I2057ef9794e3b05b7296679bb0220425ff64e6ae
CRs-Fixed: 2743155
2020-07-29 11:38:49 -07:00
Kiran Venkatappa
857a439237 qcacmn: Move wmi print macros out of WMI_INTERFACE_EVENT_LOGGING
Macros like wmi_warn, wmi_alert, wmi_debug and others are not dependent
on WMI_INTERFACE_EVENT_LOGGING feaure. Move these outside to fix
compilation errors observed when this feature is disabled.

Change-Id: Ia585f4b947063828e2038d87b4736267d9aaad88
CRs-Fixed: 2742439
2020-07-29 11:38:46 -07:00
Shwetha G K
282b71f640 qcacmn: Support CFR capture_count and MO marking requirement
Support a new capture_interval_mode: capture_count, where after
capture_count+1 number of frames, MAC stops channel capture and
waits for capture_interval duration before enabling again.

Add nob(capture_intervalmode_sel) to switch to capture_count or
capture_duration mode in wlanconfig application, where
capture_intervalmode_sel=0 indicates the old capture_durarion
mode where MAC stops channel capture after capture_duration
instead of capture_count. capture_intervalmode_sel=1 indicates
the capture_count mode.

Support MO marking: Current ENH CFR uses the existing MD/MO,
type/subtype filters to filterin the packets with programmed
type/subtype as either MD/MO. But for m_TARA it is also required
to consider the bw/nss/ta/ra setting. Therefore, it is possible
that not all the filtered-in PPDUs have channel capture and lead
to processing of packets which does not have captured data.
To overcome this issue, from QCN9000 onwards, MAC has MO marking
feature added for M_TARA filter mode, where MAC will consider
all TARA group configuration as filterin criteria & provides
an option to HOST to choose either filterin mode as FP or MO.
en_ta_ra_filter_in_as_fp is added to support MO marking.
Based on the discussion between HOST, FW & MAC teams, 0 is the
recommended & default setting for en_ta_ra_filter_in_as_fp.
Add nob to configure en_ta_ra_filter_in_as_fp but do not expose
to user.

Change-Id: I790d7ce500a7d779ea571635690f73dbc582cf33
2020-07-29 09:39:51 -07:00
Shwetha G K
9472bdfb6c qcacmn: Support CFR capture_count and MO marking requirement
Support a new capture_interval_mode: capture_count, where after
capture_count+1 number of frames, MAC stops channel capture and
waits for capture_interval duration before enabling again.

Add nob(capture_intervalmode_sel) to switch to capture_count or
capture_duration mode in wlanconfig application, where
capture_intervalmode_sel=0 indicates the old capture_durarion
mode where MAC stops channel capture after capture_duration
instead of capture_count. capture_intervalmode_sel=1 indicates
the capture_count mode.

Support MO marking: Current ENH CFR uses the existing MD/MO,
type/subtype filters to filterin the packets with programmed
type/subtype as either MD/MO. But for m_TARA it is also required
to consider the bw/nss/ta/ra setting. Therefore, it is possible
that not all the filtered-in PPDUs have channel capture and lead
to processing of packets which does not have captured data.
To overcome this issue, from QCN9000 onwards, MAC has MO marking
feature added for M_TARA filter mode, where MAC will consider
all TARA group configuration as filterin criteria & provides
an option to HOST to choose either filterin mode as FP or MO.
en_ta_ra_filter_in_as_fp is added to support MO marking.
Based on the discussion between HOST, FW & MAC teams, 0 is the
recommended & default setting for en_ta_ra_filter_in_as_fp.
Add nob to configure en_ta_ra_filter_in_as_fp but do not expose
to user.

Change-Id: I75cd3218fa4308afad21052e4535ef9b8e5a5869
2020-07-29 09:39:48 -07:00
Vignesh U
04f907de27 qcacmn: Move HW mode switch related code into a function
If HW mode switch is in progress when a radar is detected, the radar
found channel information is stored and the processing is deferred.
This piece of code is in processing radar indication routine and can
be put under a function.

Move HW mode switch related code under a function so that it is
modularized.

Change-Id: I989ec62a2badbc70734e658a423aa0b8d2eee42d
CRs-Fixed: 2737116
2020-07-29 06:40:11 -07:00
Vignesh U
adae9cdb21 qcacmn: Do not modify radar found params while processing it
The radar found parameters processing API dfs_process_radar_ind() is
supposed to read-only the radar_found_info parameters and not modify
them. A block of code for PO platforms modify the radar_found_info
parameters.

The function dfs_process_radar_ind() should not modify the radar found
input parameters.

Since in this case the parameter modifications are specific to partial
offload, move the code that modifies the parameters out of the function
into a partial offload specific code.

NOTE:- The previous change I2c717219d0b0f9263734767bee6070f335032b04 also
does the same that is mentioned here but for modification of
full-offload parameters.

Change-Id: Ic438d70eaadb9ef91d28f6a0c22caf4926ed1df1
CRs-Fixed: 2737060
2020-07-29 06:40:08 -07:00