Commit Graph

8007 Commits

Author SHA1 Message Date
Linux Build Service Account
2105b28e4c Merge "qcacmn: Reduce excessive console logging" 2020-01-12 19:35:57 -08:00
Sravan Goud
c064fc3b4a qcacmn: Reduce excessive console logging
There is excessive console logging in case of peer or vdev
null in mic error handling and wbm err processing in softirq
context which is delaying the interrupt to get enable and as a
result host is slow in reaping the wbm2sw3 ring. This leads to
wbm2sw3 ring full back pressure at FW and finally FW asserts.
As part of this change reduce reduce the error logging level from
err to info and for MSM info goes to the wifi logger logs and not
to the console.

Change-Id: I9b8be1feee5e807cecbe307b24a323e2b0ae631a
CRs-Fixed: 2596656
2020-01-12 17:01:25 -08:00
Jinwei Chen
5d2b019ea4 qcacmn: WAR for monitor mode HTT msg sending failure
If two back to back HTT msg sending happened in short time,
the second HTT msg source SRNG HP writing has chance to fail,
this has been confirmed by HST HW.
  For monitor mode, HTT msg for monitor status ring configuration
is the last msg for sending, if the 2nd HTT msg for monitor status ring
sending failed, HW won't provide anything into 2nd monitor status ring.
  as a WAR, add some delay before 2nd HTT msg start sending, > 2us is
required per HST HW, delay 100 us for safe.

Change-Id: Id2a5a8798fde79267f9d6f9ba23d8ed54a400aa7
CRs-Fixed: 2597248
2020-01-12 13:21:06 -08:00
Sravan Goud
d207ff2e28 qcacmn: Provide vendor extended stats from host
Currently in lithium FW is not always in datapath. As a result
can not provide all the wlan vendor extended stats. So as part
of this host provides some of the extended stats.

Change-Id: I876b6e905f7e25b7088f80f07e55e26a7a409241
CRs-Fixed: 2594797
2020-01-12 06:24:30 -08:00
Daniel Kim
8e63ff7840 qcacmn: Use correct phy id in the reg services
To support dynamic mode switch (phase 2), correct phy_id
should be used. Instead of pdev_id, target phy_id should
be used to retrieve correct channel range sent in target
capabilities (mac_phy_caps).

Change-Id: If0e2503cc99636b775721ecb3628290d19e5575c
2020-01-12 00:12:47 -08:00
Balamurugan Mahalingam
4120f06921 qcacmn: define SHADOW_REGISTER macro for QCN9000
Define shadow registers for QCN9000.

Change-Id: I47fc7057838bf6491dc292660a69b47a655fe0e9
2020-01-12 00:12:33 -08:00
Vignesh Mohan
86eba5902e qcacmn: Reinit DFS after HW mode switch (phase 2)
Supported dynamic HW mode switches:
DBS (full band 5G and 2G) <-> DBS_SBS (low band 5G, high band 5G and 2G)

Description of the changes:

1. NOL conversion:
  a. Introduce a temporary NOL list copy structure in DFS psoc obj.
  b. When mode switch is triggered:
    i.   Stop the NOL timers and clear the data, to avoid processing NOL
         expiry during mode switch.
    ii.  Allocate the psoc NOL copy for the target num_radios.
    iii. Store the NOL data of each radio to the target pdev ID
         (pdev ID after mode switch) in the psoc NOL copy,
	 using a unified mux/demux API.
  c. After mode switch is completed:
    i.   Resume NOL by re-initializing the list from the temporary psoc
         copy.
    ii.  Free the psoc copy after mode switch is complete.
    iii. Note: changes are made to support pause and resume of NOL,
         increasing NOL timeout by a few milliseconds.

2. PreCAC list conversion:
  a. When mode switch is triggered:
    i. Stop the existing preCAC timer and send ADFS abort command to FW.
  b. When mode switch is completed:
    i.  Unify/separate the preCAC list if the target mode is DBS/DBS_SBS
        respectively, using a single API.
    ii. Start ADFS again.

3. Radar detection lock:
  a. While detecting radar, acquire a lock to avoid handling user triggered
     mode_switch during this process. Release the lock once radar
     processing is completed and CSA start is triggered.

4. Radar detection/CAC completion defer during mode switch:
  a. While detecting radar or CAC completion, check if mode switch is
     in progress. If yes, defer the processing and wait for mode switch to
     complete before handling the events.
  b. Note: Precedence is Radar over CAC, i.e., if CAC processing is waiting
     and radar is received, CAC completion is no longer handled.

CRs-Fixed: 2580403
Change-Id: I506f3b569bad2e351c6f336e50f203cf5fa8b223
2020-01-11 22:28:17 -08:00
Chaithanya Garrepalli
79b64ac4ba qcacmn: fix potential memory leak in dp_rx_process
There is a chance of leak of RX buffers if peer disconnects
while we are in middle for processing the list of MSDUs in a
AMSDU

Change-Id: I0081ec96da95ea570903dbd5d91c866c8c141667
2020-01-11 22:28:04 -08:00
Linux Build Service Account
5e7141ceb3 Merge "qcacmn: Do not get/put the pm_runtime if RPM is disabled" 2020-01-11 20:06:29 -08:00
Linux Build Service Account
131bc0cd37 Merge "qcacmn: CFR: Process PPDU status TLVs and extract CFR information" 2020-01-11 20:06:29 -08:00
Tiger Yu
0778a3973d qcacmn: Do not get/put the pm_runtime if RPM is disabled
Do not get/put the pm_runtime if RPM is not enabled to avoid the WMI
command sending block.

Change-Id: Id6cddc4d5b6322fea063f08a1b641034ba0272d9
CRs-Fixed: 2587797
2020-01-11 19:23:39 -08:00
Neha Bisht
741041405a qcacmn: Structure optimized through poke-a-hole tool
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in wmi module
(for both 64 bit and 32 bit platform)

Structure                     Bytes saved(64bit)     Bytes saved(32bit)
fd_params                               8 bytes                 4 bytes
wmi_mgmt_params                         8 bytes                 4 bytes
wmi_offchan_data_tx_params              16 bytes                8 bytes
sta_uapsd_trig_params                   8 bytes                 0 bytes
wifi_passpoint_network_param            8 bytes                 8 bytes
ctl_table_params                        8 bytes                 4 bytes
mcast_group_update_params               8 bytes                 0 bytes
rtt_meas_req_params                     8 bytes                 4 bytes
wmi_host_peer_adv_stats                 8 bytes                 8 bytes
wmi_host_rf_characterization_event_param4 bytes                 4 bytes
wmi_host_oem_indirect_data              8 bytes                 8 bytes
wmi_oem_response_param                  8 bytes                 0 bytes

Change-Id: I539e0fe6c599aab70952b1ad26f92c0b9b94429f
2020-01-11 16:19:06 -08:00
Neha Bisht
503663c6da qcacmn: Structure optimized through poke-a-hole tool
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in obj_mgr and scheduler
modules.
Structure           Bytes saved (64bit)   Bytes saved (32bit)
scheduler_ctx       8 bytes               4 bytes
wlan_channel        8 bytes               8 bytes

Change-Id: I298946b55328d8d9b564c140e0a59e0b8702fab0
CRs-Fixed: 2587842
2020-01-11 16:18:50 -08:00
Venkata Sharath Chandra Manchala
09d116aee9 qcacmn: Avoid invalid invalid_peer_head_msdu list
Add a check to validate invalid_peer_head_msdu before accessing
to avoid NULL dereference.

Change-Id: I9218bdd1100b48a32240546f380b1437ae72c406
CRs-Fixed: 2585651
2020-01-10 20:12:26 -08:00
Ashish Kumar Dhanotiya
ef9d824e14 qcacmn: Fill center frequency also in channel list with power
Currently get channel list with power api fills only
channel number and tx power, fill center frequency also
in the response with this api.

Change-Id: Ib4487e20d7da0c59d6b4a041deac4d4ecc8dd8c1
CRs-Fixed: 2597550
2020-01-10 20:12:11 -08:00
Shwetha G K
d4e0f6104e qcacmn: Provide sys entries to list down top allocations
Provide sys entries to list down top mem and dma allocations (based on
configurable threshold). This can help to check allocations at run-time
and can provide clue if some function is allocates memory continuously.

CRs-Fixed: 2589632

Change-Id: If9a6da535233fc48828f2e9fb2bdacb8153270e4
2020-01-10 16:55:58 -08:00
Shwetha G K
9be8b1fe75 qcacmn: Add support to disable the panics in memory debug
Support to disable panics in qdf memory debug. This can be used when KASAN
or SLUB or SKB debug options are enabled

CRs-Fixed: 2580399
Change-Id: If8617a16d0b96279f0afef8299632662dea498bf
2020-01-10 16:55:39 -08:00
Shwetha G K
21378e0c93 qcacmn: Support to disable the memory debug at load time
Disable the mem_debug when qdf argument mem_debug_disabled=1 is passed
through uci command "uci set wireless.qcawifi.mem_debug_disabled=1".

CRs-Fixed: 2572159
Change-Id: I6ab5e1f28ce4c58d46c7467bac3853054f4cf56c
2020-01-10 16:55:18 -08:00
Krishna Rao
44de5a5d45 qcacmn: Add dwell time parameters to cfg80211 scan request API
Add active and passive scan dwell time parameters to cfg80211 scan
request API.

Change-Id: I39f479d7b941e4671f1ad4495ab48031153dd5e7
CRs-Fixed: 2598504
2020-01-10 13:49:54 -08:00
Venkateswara Swamy Bandaru
46082ed4e3 qcacmn: Fix issue in RNR IE processing
Fix RNR IE processing by correctly adjusting offsets.
neighbour ap info field processing is present only at
beginning of IE skip it only once.

Change-Id: I05923e4ff9efa00aeed141b0cff8b62913622cf6
CRs-Fixed: 2592014
2020-01-10 13:49:39 -08:00
Abhishek Ambure
f39c249a32 qcacmn: Add support for LOWI 6GHz enhancements
Append 4 bytes enhancement flags in ANI_MSG_APP_REG_RSP message.
NL_ENABLE_OEM_REQ_RSP i.e. 0x00000001 in ANI_MSG_APP_REG_RSP message
represents host driver support for NLA type request and response
for oem commands.

Change-Id: I5d07d017a27b676537c24fbf15f224af8964c665
CRs-Fixed: 2591896
2020-01-09 23:00:33 -08:00
Gerrit - the friendly Code Review server
842d9b1bc5 Merge changes into wlan-cmn.driver.lnx.2.0 2020-01-09 15:00:23 -08:00
Shwetha G K
6d85a9e8da qcacmn: Track netlink allocations
Track netlink allocations when mem debug is enabled.

Change-Id: Icba58f93cf0364678d730f32bd56645efab934e1
CRs-Fixed: 2588037
2020-01-09 04:51:33 -08:00
Yu Wang
a0dc6b9144 qcacmn: implement interfaces for configuring BT coex chain mode
Add interfaces for get/set BT coex chain mode.

CRs-Fixed: 2565088
Change-Id: If74dcba4ad3b69caa895264eaff64ef06b3b0714
2020-01-09 02:40:41 -08:00
Yu Wang
1cd103900e qcacmn: Initial version of coex component
Add initial set of coex files, implement the basic functions.
Coex component is used to process coex related configurations.

CRs-Fixed: 2565088
Change-Id: I8b9600809691b808f97c621cb329a6ab9941814c
2020-01-09 02:40:23 -08:00
Yu Wang
e7f177ac80 qcacmn: add new component id QDF_MODULE_ID_COEX
This new component COEX is added for coex related
configurations/operations.

CRs-Fixed: 2565088
Change-Id: I3faa2d18b341d91278268f52d9d7d05a1eba445f
2020-01-09 02:40:11 -08:00
Padma Raghunathan
5cd2e56349 qcacmn: CFR: Process PPDU status TLVs and extract CFR information
Channel Frequency Response(CFR) feature requires PPDU information
for correlation with CFR data. Host subscribes for the relevant PPDU
status TLVs via the Host RX monitor status ring. During monitor status
ring reap, all information needed for CFR correlation is accumulated
in a HAL PPDU structure and delivered to WDI event subscribers.

Change-Id: I3662b60375cb8886447a2fba3efead6a1ef3a98d
CRs-Fixed: 2593408
2020-01-09 10:34:35 +05:30
Padma Raghunathan
fe453dfd10 qcacmn: CFR: Monitor/Data ring filter settings
Channel Frequency Response(CFR) captures FFT bins corresponding to a PPDU
received and this is relayed to user space application. Since FFT bins
alone will not be meaningful, additional information about the PPDU such
as Peer addr, BW, NSS, etc are extracted from multiple PPDU status TLVs
and passed on to userspace along with CFR data.

Host RX monitor status ring is configured during CFR enable and the host
subscribes to relevant PPDU TLVs that provides all necessary information
for CFR data correlation.

Change-Id: Ia8080fe96c330db42d371634ba4363eb36c05402
CRs-Fixed: 2593416
2020-01-09 10:34:29 +05:30
Amruta Kulkarni
0f0a36c8d4 qcacmn: Change info/err prints to debug in roaming path
The printk buffer is protected by a global raw spinlock for readers
and writers. This restricts the contexts that are allowed to
access the buffer. So large latencies exists when printing to
kmsg done with QDF trace levels WARN, INFO, ERROR. This results
in roaming KPI for maximum transition time exceeding the expected
100ms.
So change info/err prints to debug prints in roaming path
to reduce delays in roaming time.

Change-Id: I9cdf043da6e88d735ab39812e74ed24784ceede3
CRs-Fixed: 2594867
2020-01-08 20:11:15 -08:00
Hariharan Basuthkar
8e28cdda42 qcacmn: Add an API wlan_reg_get_opclass_details
Add an API wlan_reg_get_opclass_details, to get the operating class
table details from the regulatory component. Also, add a new structure
regdmn_ap_cap_opclass_t in the regulatory component, to fill members
of the mapapcap_t structure.

Change-Id: I8b6a3867a766038663c10ce2f01a8b7d310c7375
CRs-Fixed: 2580505
2020-01-08 13:13:00 -08:00
Karthik Kantamneni
cc5c789e8e qcacmn: Fix compilation errors when WMI_EXT_DBG is enabled
When WMI_EXT_DBG is enabled some of the WMI macros used
are defined in later section of file causing compilation errors.
These errors are due to recent code refactor changes.
To avoid compilation errors place the code using macros after
they are defined.

Change-Id: I6965595d17820768924080c0100b0ea6aeef5eb2
CRs-Fixed: 2594750
2020-01-08 04:53:25 -08:00
Ankit Kumar
276b775f4d qcacmn: Hw vlan config wmi interface declaration
Hw vlan configuration wmi interface declaration for sending
command to fw to configure hw vlan configuration.

Change-Id: I11f78c7d5a0782ebaeef6aa43016600a345711b6
CRs-Fixed: 2596298
2020-01-07 13:43:40 -08:00
Surya Prakash Raajen
3206d614d1 qcacmn: Fix unknown symbol error for ce_tasklet_debug in 32bit
Fix unknown symbol error for ce_tasklet_debug_enable in 32bit

Change-Id: I76843f9569b79d4128932c2c2e27c8446285e831
CRs-Fixed: 2597243
2020-01-07 08:31:07 -08:00
Nandha Kishore Easwaran
54532861c7 qcacmn: Disable wake irq for QCN9000
Disable wake IRQ for QCN9000 since it doesn't require wake
feature.

Change-Id: I62e8712f9c7c7624c84889740249f3b70b21d6ff
2020-01-07 04:39:13 -08:00
Sandeep Puligilla
904e527aa7 qcacmn: Add new feature to control fils discovery on 6Ghz Sap
6Ghz SAP needs to send either a probe response or fils
discovery at every 20ms.

Add a new feature to configure the probe response or
fils discovery frame.

Change-Id: I3b9842021db94515ae4dccbcdc573a4cd84caa56
CRs-Fixed: 2591147
2020-01-07 00:41:39 -08:00
Pragaspathi Thilagaraj
412c1e6a88 qcacmn: Add diag log support for connection/roaming/11kv debugging
Add data structures to support diag log payloads. Define
new diag logs with the log id defined at the global diag
logs definition.
Below new diag logs are introduced:
LOG_WLAN_AUTH_ASSOC_TX_RX_INFO_C
LOG_WLAN_ROAM_TRIGGER_INFO_C
LOG_WLAN_ROAM_SCAN_INFO_C
LOG_WLAN_ROAM_RESULT_INFO_C
LOG_WLAN_RRM_TX_RX_INFO_C

Change-Id: I08b8ce156b405e555bc9c981b46ee8924bc76364
CRs-Fixed: 2595648
2020-01-06 01:14:32 -08:00
Surya Prakash Raajen
b976076b3b qcacmn: Track tasklet execution and total time (sched+exec)
Add support to track tasklet execution and total time in different
buckets for debugging purposes

Change-Id: Ide459c385b2a44c0f16d05b37879c8b462782d72
CRs-Fixed: 2589199
2020-01-05 10:16:57 -08:00
Jinwei Chen
0181445b71 qcacmn: fix dp_tx_desc invalid accessing due to race condition
crash scenario:
  a. dp_tx_vdev_detach will reset the vdev of TX desc to NULL
by dp_tx_desc_flush.
  b. in the meantime, if TX completion is coming and when all TX desc
is recycled, the pool will be freed if pool status is invalid before.
  c. invalid TX desc accessing will happen in (a).

add TX desc pool lock protection in dp_tx_desc_flush.

Change-Id: I65c570aa6a3044a478dbe51bbf396cf24612f675
CRs-Fixed: 2595755
2020-01-04 22:12:21 -08:00
Naga
3ea157570e qcacmn: Replace kernel calls with pfrm wrapper
HIF layer have kernel calls for interrupt registration
which need to be replaced in case of whunt framework,
as interrupt generation will be simulated by framework
itself, hence adding abstraction to call either kernel call
or whunt calls based on platform bus type.

Change-Id: Ife113d6338defa8e693e761992ce3a1bb9524306
CRs-Fixed: 2582523
2020-01-04 05:44:39 -08:00
Yu Ouyang
78100a4cfe qcacmn: Fix function parameter type conflict issue
Parameter freq type has a conflict in reg_is_dsrc_freq(qdf_freq_t freq)
and reg_is_dsrc_freq(uint16_t freq) functions.

Change the type to qdf_freq_t in these functions.

Change-Id: I4c348778a7cb2fd588799332241701357de90422
CRs-Fixed: 2595642
2020-01-04 04:25:52 -08:00
Adil Saeed Musthafa
e76b6f2458 qcacmn: command to modify OMN timer, primary IF in dynamic mode switch
* Add command to modify OMN (Operating Mode Notification) timer value for
hw-mode switch. These commands can enable/disable the sending of Opmode
IEs in the beacons after HW mode switch and also configure the time for
which the IE will be sent after the switch.

* Add command to change primary interface when switching dynamically to
DBS mode.

Change-Id: Iceb8e29a46fa4873d3cbd7e41ec0da3782a5dd22
CRs-Fixed: 2560684
2020-01-03 20:04:15 -08:00
Ananya Barat
763f8beda2 qcacmn: Reverting type of channel number variables in ch_params
The variables center_freq_seg0 and center_freq_seg1 in struct
ch_params are used to represent channel numbers. Their types
were wrongly changed to qdf_freq_t in change ID
e205befb82f643808973286ae578d7add7738eec. Change their type
back to uint8_t.

Change-Id: I13c629850bf207c6088b44c8695167e96dc33476
2020-01-03 09:04:39 -08:00
Rakesh Pillai
ae0f601eac qcacmn: Ratelimit error log for REO CMD send failure
REO CMD send failure floods the console with error logs.

Ratelimit the error log for REO CMD send failure
and increment stats to keep track of the number of
failures.

CRs-Fixed: 2593996
Change-Id: Id415a17b1ba1f4c044bf34eb31e81e2cea825f80
2020-01-03 07:48:31 -08:00
Jinwei Chen
1d2e65a76c qcacmn: fix STA + SAP IPA de-frag issue
Currently wlan host will re-inject defrag data with RBM 6 to
REO, this data buffer will go to REO-->REO2SW4-->IPA-->FW2RXDMA,
fix below issue introduced by this RX buffer path.
a. FW assert due to FW2RXDMA DMA address not 4 bytes aligned.
b. host skb double allocation due to qdf_nbuf_linearize() for frag skb.
c. Invalid RBM 6 for fragment RX due to RX buffer resue.

Change-Id: I36d831fc14b6b9aa0cea32682823de348f7eecd3
CRs-Fixed: 2591453
2020-01-03 04:43:01 -08:00
Alan Chen
80c475929e qcacmn: Increase SCAN_PNO_MAX_NETW_CHANNELS_EX macro to 100
PNO scan is failing to start because it is coming with 97 channels
but the current max number of channels in PNO scan is 60. To allow
for a larger number of channels, increase SCAN_PNO_MAX_NETW_CHANNELS_EX
to 100.

Change-Id: I3ac08f83f9f500899656caf48c112c33580cef70
CRs-Fixed: 2585685
2020-01-02 14:31:41 -08:00
Manoj Ekbote
b91d7bee26 qcacmn: Store DBR pdev objects in psoc
In dynamic HW mode switch feature, DBR pdev object of primary device
needs to be re-assigned after HW mode change. Store the DBR objects
in psoc for all devs and then use the mapped pdev to retrieve the
corresponding DBR object.

Change-Id: Ie56bdf9d430a5a3ca7e4e9a872018257d032c908
CRs-Fixed: 2589447
2020-01-02 13:09:39 -08:00
Prathyusha Guduri
d32c59edb5 qcacmn: Enable HAL_IS_DECAP_FORMAT_RAW for all profiles
HAL_IS_DECAP_FORMAT_RAW was only defined for low memory profiles. Enable
it on all profiles

Change-Id: I064109e6756b25252bedf96065f59ad6ed360bcc
2020-01-02 06:44:38 -08:00
aloksing
18f309c7f4 qcacmn: Add debug support for vdev/peer reference and release
Allocate node for new entry and add it to existing list of function or line
If function or line already present in list then increment count

Change-Id: I3d737dcd33862f133b52c6d694c89f6d6b1517a5
2020-01-02 05:18:15 -08:00
Srinivas Dasari
5567f874e7 qcacmn: Define QDF_MAX_CONCURRENCY_PERSONA based on WLAN_MAX_VDEVS
Currently, QDF_MAX_CONCURRENCY_PERSONA allows a maximum of 4
MAC addresses to be assigned to different interfaces. NAN
discovery interface is a new interface and it needs a MAC address
to be assigned. QDF_MAX_CONCURRENCY_PERSONA needs to be increased
to 5 to provide the same.
WLAN_MAX_VDEVS defined in Kbuild already takes care of the
maximum no.of vdevs(6) supported. QDF_MAX_CONCURRENCY_PERSONA can
be made dependent of WLAN_MAX_VDEVS which caters the same purpose.
Define QDF_MAX_CONCURRENCY_PERSONA accordingly.

Change-Id: If5085703ab9c0cc70ce4fc0d20bedc20f382b4bd
CRs-Fixed: 2592018
2020-01-02 03:48:16 -08:00
Srinivas Dasari
88f39efbd9 qcacmn: Get vdev_id from NAN enable response event
Firmware sends vdev id allocated for NAN vdev as part of
NAN enable response. Get the same and use it for further
operations

Change-Id: I2e1e0dbab160904e12efc53f83203e4e153d099d
CRs-Fixed: 2592017
2020-01-02 03:48:00 -08:00