Commit Graph

7985 Commits

Author SHA1 Message Date
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
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
Yu Ouyang
82e3fbda26 qcacmn: Support ROME SDIO
To support ROME SDIO card, change in HIF SDIO layer. Without CNSS or
CNSS2 module, it can bring up adapter successfully.

Output few logs in SDIO read and write thread, and optimize HIF
SDIO layer logging.

Change-Id: I96ba731a7fa572131aaaec8ab25d9cffc41ec0b2
CRs-Fixed: 2542051
2020-01-01 22:17:23 -08:00
Srinivas Dasari
9c6a4d5279 qcacmn: Get the firmware capability NAN_VDEV_SUPPORT
Firmware advertises service capability bit NAN_VDEV_SUPPORT for
separate NAN vdev creation. This capability can be used to create
separate interface for NAN discovery and process corresponding
commands from userspace.

Change-Id: I4f81b354433c34e8bfe264f69e4eeaf6670f2fac
CRs-Fixed: 2592016
2020-01-01 12:00:01 -08:00
Hariharan Basuthkar
f8f30ced97 qcacmn: Get opclass from freq and width given a country code
Add the API wlan_reg_get_opclass_from_freq_width, to give country_iso,
channel frequency, channel width and behaviour limit as input, and get
the operating class as output.

Change-Id: I96c39119ab855d10965b2603e8b15c21699daa68
CRs-Fixed: 2583789
2020-01-01 07:27:58 -08:00
Surya Prakash Raajen
141db5f642 qcacmn: Fix unknown symbol error in HIF_CE_DEBUG_DATA_BUF case
When HIF_CE_DEBUG_DATA_BUF is enabled for some apis when module is
inserted, it throws unknown symbol error, fix them by exporting the
required apis.

Change-Id: Icf6fc40f7df1c463ad7a6f9eff38adcbdf9276b7
CRs-Fixed: 2593859
2019-12-31 02:44:38 -08:00
Chaithanya Garrepalli
3583cfb2c9 qcacmn: always match vdev_id to search from peer from hash
In vdev to vdev roaming on HKv2 we can have dp peer on
different LMACs with same mac address. To get the right
peer on PDEV use id match while searching from hash table

Change-Id: I60b4d7018120c9bd6a56913822ce42f24598184a
2019-12-31 02:44:30 -08:00
Chaithanya Garrepalli
52511a17d1 qcacmn: check for vdev_id mismatch to deliver NBUFs to stack
Check for vdev_id mismatch to deliver NBUFs to stack to avoid
hold peer reference while giving nbuf list to stack

Change-Id: Ic475e00d5b1793ada7b26b7af3322ca2fa51836f
2019-12-31 01:24:43 -08:00
Aniruddha Paul
33fce952a9 qcacmn: Fix the next link descriptor read issue
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.

Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
2019-12-30 05:53:14 -08:00
Yu Ouyang
efa9f5d2a9 qcacmn: Add FCC10_FCCA into arry g_reg_dmn_pairs[]
When enalbe DSRC feature, member reg_dmn_pair_id of struct
country_code_to_reg_domain g_all_countries[] may equal FCC10_FCCA.
However, FCC10_FCCA can't be found in array g_reg_dmn_pairs[].

So, add FCC10_FCCA into arry g_reg_dmn_pairs[].
And, fix one compile issue.

Change-Id: I6069c43505e15312d8bd9be48495998c31f1f8eb
CRs-Fixed: 2590094
2019-12-30 02:43:25 -08:00
Manoj Ekbote
a9d046c655 qcacmn: Export wlan_abort_scan API
Export wlan_abort_scan API so that scan abort can be done at
pdev level.

Change-Id: I1be18677fd186c6b80acaa87fa2b10258663788c
2019-12-28 15:50:33 -08:00
Gerrit - the friendly Code Review server
65a41056b3 Merge changes into wlan-cmn.driver.lnx.2.0 2019-12-28 00:28:30 -08:00
Adwait Nayak
e2ee56e574 qcacmn: CFR WMI implementation
CFR config is passed on to FW through WMI
CFR feature code is moved into feature specific WMI file.

Change-Id: I00b57ea2ef4ec5520eb565910ac2c0a6478170e3
CRs-Fixed: 2582846
2019-12-27 16:31:14 -08:00
Paul Zhang
c1b915da06 qcacmn: use debugfs to show ini configs
Create new interface ucfg_cfg_ini_config_print/cfg_ini_config_print
to save the ini configs to buffer.

Change-Id: I7bc80d56d3a806a53c299d1347d4a656a6856248
CRs-Fixed: 2579558
2019-12-27 03:26:11 -08:00
Vevek Venkatesan
27e7bb4d79 qcacmn: cdp: Converge cdp_cmn_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- txrx_peer_unmap_sync_cb_set
- txrx_fw_stats_get
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: I4472dc0905edb7700acb4401b117c8876ba455f3
CRs-Fixed: 2541460
2019-12-27 03:25:49 -08:00
Pavankumar Nandeshwar
61392d0275 qcacmn: cmn_ops changes in umac, tgt_if for umac-dp decoupling
umac and tgt_if module changes due to umac-dp decoupling changes in
cmn_ops APIs.

Change-Id: If8a7bdb879660f1d15a067ce9c76f96e6dfb7140
2019-12-27 03:25:25 -08:00
Pavankumar Nandeshwar
a234716d1d qcacmn: cmn_ops changes in datapath for umac-dp decoupling
Change cmn_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: I5716a87cad56b1dfe8dd56f193bbb6ff923a6af1
2019-12-27 03:24:59 -08:00
Surya Prakash Raajen
a3baeee819 qcacmn: Memory optmization of Node/peer structure variables
Remove unused variables and reduce the memory by
the structure padding.

Change-Id: Ic49829ab463d75af6d7fc1ac36df16cabdf447e2
CRs-Fixed: 2587049
2019-12-27 01:40:40 -08:00
Surya Prakash Raajen
bf5195f2e6 qcacmn: Memory optmization of Node/peer structure variables
Remove unused variables and reduce the memory by
the structure padding.

Change-Id: I8feca8b6e3c340601a2097ccf6ce18d5840f29b9
CRs-Fixed: 2587049
2019-12-27 01:40:32 -08:00
Hariharan Basuthkar
da52df55d0 qcacmn: Add the operating classes 129 and 130
Add the operating classes 129 and 130 to the US, Europe, Japan,
and Global operating class tables in the regulatory component.

Change-Id: I930019c2b14451de57a92c069a77c27fb56d273b
CRs-Fixed: 2587094
2019-12-26 13:21:43 -08:00
Ashish Kumar Dhanotiya
89029e4d9e qcacmn: Send CTL info to firmware
In regulatory non-offloads feature, send conformance_test_limit_2G,
conformance_test_limit_5G, reg_domain, reg_domain_2G and reg_domain_5G
information to firmware using WMI_PDEV_SET_REGDOMAIN_CMDID.

If all these attributes are not populated then CTL power limit is
not applied by the firmware.

Change-Id: I1523ab447aec64ec0af42da32318136f90fd17ca
CRs-Fixed: 2518246
2019-12-26 11:38:36 -08:00
Uraj Sasan
e8b8de05c0 qcacmn: Adds support for scan_start_offset in TLV
Sends "scan_start_offset" via TLV path to FW.
The value is in milliseconds

Change-Id: I82a8a501d0551ee758fcade74ab26038566b2031
2019-12-26 03:40:59 -08:00
Rakesh Pillai
4863352e53 qcacmn: Unmap the htc connect buffer after connect failure
The htc connect message buffer is not unmapped,
if the firmware does not send wmi ready event to the
host.

Scenario:
- Host sends htc init command.
- The command is queued into the src ring.
- The firmware has crashed before the Copy Engine
  could copy the message to the destination ring
- Due to the above point, no copy completion
  interrupt is received.
- The host times out during its wait for the wmi
  ready event.
- Hence the htc init command buffer stays unmapped
  and unfreed.

As a part of the wma ready event missing cleanup,
the htc connect buffer is not unmapped. Fix this
to avoid missing to unmap the buffer.

To avoid a side effect of sending a completion for
HTC connect command, all the commands are freed in
the htc completion handler in case of SSR.

CRs-Fixed: 2512344
Change-Id: I05026b3cbb764197e6df85c41634002d271a50e5
2019-12-25 22:11:36 -08:00
Tiger Yu
dc29b1f9d7 qcacmn: Limit logging when handling tx comp status if vdev is NULL
Use dp_info_rl instead of QDF_TRACE when handling tx completion status to
avoid excessive logging when vdev is destroyed in the another thread.

Change-Id: I1044c6d747ba1c7036664fe0265ec4855b7b4c47
CRs-Fixed: 2591486
2019-12-25 01:51:21 -08:00