Commit Graph

10394 Commits

Author SHA1 Message Date
Santosh Anbu
6f28758c51 qcacmn: Handle down event in disconnection progress state
For STA mode with STA CAC enable in  auth/assoc state of assoc sm,
a northbound disconnect request would have to wait until CAC and
assoc is completed and connect request is removed from serialization
queue. During which OSIF timeout is seen as CAC can exceed the
serialization timeout of 60s.

Add change to handle EV_DOWN in disconnection progress state which
brings down the connection immediately on receiving a disconnect
request.

Change-Id: I301e49164c69df99e4617dd6fbc012e449963521
CRs-Fixed: 2882876
2021-02-21 23:48:57 -08:00
Hariharan Basuthkar
5af6064a0c Revert "qcacmn: Fix reg rule parsing order"
This reverts commit I5bb22a1dcd3f1c95d8f4498b03d6cc6eedcfe44c.

Change-Id: Ib7bf273a53f382da36106eab0a1b26af33d35a65
CRs-Fixed: 2880944
2021-02-20 23:34:56 -08:00
Bapiraju Alla
e9dd7d1d40 qcacmn: Update error if failed to read at least one INI parameter
INI parameters parsing can fail because of fail to read INI file or
failed to parse at least one parameter. In some scenarios, driver should
assert if parsing is failed for atleast one INI parameter.

To differentiate these two failures, return different error status
values.

Change-Id: I187d2b2e8f55af47a14561302d8b62e84de7da5a
CRs-Fixed: 2878966
2021-02-19 13:45:01 -08:00
Abhishek Ambure
cd38c6bd4e qcacmn: Add host support for OCV service supported by FW
FW advertises WMI_SERVICE_OCV_SUPPORT bit in service ready event if
firmware supports Operating Channel Validation feature.

Change-Id: Ida1ee9874f9cd32a684ceee728e3323306137c64
CRs-Fixed: 2880794
2021-02-19 05:40:14 -08:00
sheenam monga
df4587eb5f qcacmn: Add additional attributes for the QCA vendor command
QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO to get finer details on roaming
behavior, TSF out of sync count, and the latest TX rate, Rate Index used
for the transmission.

Change-Id: I34d112a263a587603f555069c0244f61dc44ec73
CRs-Fixed: 2876411
2021-02-19 02:35:22 -08:00
Harsh Kumar Bijlani
725ee94dca qcacmn: Fix wifistats issue for WIN
For WIN, a specific raw event handler is used for handling
WMI_CTRL_PATH_STATS_EVENTID received from FW.

As a part of control path stats infrastructure, event handler
for WMI_CTRL_PATH_STATS_EVENTID is different and this results
in wifistats functionality break for WIN side.

Make changes to use WIN specific event handler.

Change-Id: I2ac677c3ca55cd783734d1137c39b8ee1d5dcbf5
CRs-Fixed: 2878466
2021-02-18 07:47:10 -08:00
Karthik Kantamneni
3c3d944246 qcacmn: Enhance error signature in qdf_check_state_before_panic
Improve error signature in qdf_check_state_before_panic API.

Change-Id: I5774c07e9359b711f0863c40072962b802318f2f
CRs-Fixed: 2879026
2021-02-18 07:47:05 -08:00
Vijay Krishnan
31dfdf84bf qcacmn: Enable dfs_err logs on default
During wifi load and unload, multiple memory allocations and deallocations
are done in the path of dfs_deinit_precac_list, and at a particular
instance there is a crash seen due to an invalid paging request.

The QDF_TRACE_LEVEL_ERROR logs are not enabled by default. These prints
can be useful in debugging the issue when it occurs the next time.
Hence, the dfs_err prints are enabled by default.

When a crash occurs with the dfs_precac list functionality, debugging the
crash with dumps in T32 is difficult. During wifi unload, the api
wlan_dfs_pdev_obj_destroy_notification is called. On first step, the pdev
component is detached making the pdev component as NULL and after that
dfs component is detached. So when crash happens at this point, pdev
component is already NULL and analysing dumps with T32 is useless at this
stage.

Therefore, modify the order of dfs detach in
wlan_dfs_pdev_obj_destroy_notification. First detach the dfs component and
then detach the pdev component.

CRs-Fixed: 2872097
Change-Id: I157c6e6272bf4dd3676588b7ee6889fdb2efa5dc
2021-02-18 07:47:00 -08:00
Lincoln Tran
98c5d1eef3 qcacmn: Register NDI tx beamform support bit
Add WMI service bit handling for NDI beamforming support.

Change-Id: Ib1a4dc0042510137412f3ad4ded61ea680596978
CRs-fixed: 2876723
2021-02-18 05:35:10 -08:00
Amruta Kulkarni
d5cc294f49 qcacmn: Support roam invoke request in connection manager
Add support for roam invoke request in connection manager.

CRs-Fixed: 2869259
Change-Id: I618add058d39e9452530b1950cff57bfe6100448
2021-02-18 03:12:24 -08:00
Himanshu Batra
051c1e0d79 qcacmn: Make CM ser disconnect req as blocking or non blocking
Make CM serialization disconnect req as blocking or non blocking based
on feature macro

Change-Id: I71d664e28cba35d44c0c1fac2bd6a38c4bc4c9df
CRs-Fixed: 2879850
2021-02-17 22:09:37 -08:00
Linux Build Service Account
92f26e1300 Merge "qcacmn: Add wrapper API for indoor channel check" 2021-02-17 14:39:29 -08:00
Lincoln Tran
a410298d7b qcacmn: Add wrapper API for indoor channel check
Add the wrapper for the reg_is_freq_indoor API so other modules can
invoke it.

Change-Id: I8e5ec63b117b49a8bdd99d2afdee80b080694a4f
CRs-fixed: 2876035
2021-02-17 14:01:10 -08:00
Linux Build Service Account
3f720bf6b6 Merge "qcacmn: Fix out of bound issue in util_scan_parse_mbssid()" 2021-02-17 11:39:15 -08:00
Jyoti Kumari
a426e5e166 qcacmn: Fix out of bound issue in util_scan_parse_mbssid()
During multiple BSSID scan ie parse, there is memory allocation
on new_ie variable of size 1024 which may create buffer overflow
in util_gen_new_ie() if ie length is greater than 1024.

As part of fix, allocate memory of size ie length in new_ie.
And also add check before copying to pos variable in
util_gen_new_ie().

Change-Id: I55e0819817b5a616684067170bf28a314a145fc2
CRs-Fixed: 2867353
2021-02-17 11:13:18 -08:00
Linux Build Service Account
754b0aaaa8 Merge "qcacmn: Update regulatory database to version 34" 2021-02-17 09:08:46 -08:00
Linux Build Service Account
f11591063e Merge "qcacmn: Update interface mangager event data" 2021-02-17 05:37:06 -08:00
Linux Build Service Account
9dc712d2d7 Merge "qcacmn: Unmark 'NOL chan' before channel list update" 2021-02-17 05:37:06 -08:00
Linux Build Service Account
214232ac60 Merge changes Iea1ecb62,I22e11ff8 into wlan-cmn.driver.lnx.2.0
* changes:
  qcacmn: Add service bit to support backward compatibility
  qcacmn: Add service bit to support backward compatibility
2021-02-17 05:08:20 -08:00
Linux Build Service Account
41e7e67376 Merge "qcacmn: Add service bit to support backward compatibility" into wlan-cmn.driver.lnx.2.0 2021-02-17 05:05:11 -08:00
Linux Build Service Account
7087e4eddf Merge /local/mnt/workspace/move_prj/src/qca-wifi-oss into wlan-cmn.driver.lnx
Change-Id: If3eddffec819f3ca199bb7a68f9c62463b36e6fa
Signed-off-by: Linux Build Service Account <lnxbuild@localhost>
2021-02-17 17:36:46 +05:30
Lincoln Tran
3cb704cae0 qcacmn: Update interface mangager event data
Add fields to the validate bss data struct to pass more information
to the interface manager when validating a candidate.

Change-Id: I82536585517da87ec0883c6010461d7ee929bd18
CRs-fixed: 2836749
2021-02-17 02:10:30 -08:00
Priyadarshnee Srinivasan
9f20356fa4 qcacmn: Unmark 'NOL chan' before channel list update
After NOL expiry of the radar hit channel, the scan channel list
of the FW is updated to include 'NOL expired' channel as well
so that FW can initiate subsequent scan on this channel.
Only those channels which are not marked as NOL in regulatory
are updated in the scan channel list.

However, in the current flow of events, the scan channel list is
first updated via dfs_nol_update() API and then channel is
unmarked as NOL in utils_dfs_reg_update_nol_chan_for_freq() API.
Hence the NOL expired channel is not updated to FW and subsequent
scanning does not happen on this channel.
Ensured that the channel is cleared of NOL flag before updating
the scan channel list.

CRs-Fixed: 2877337
Change-Id: I7331bcc12c1dd6a26407c0753f28481cee1ce628
2021-02-17 02:10:26 -08:00
Gururaj Pandurangi
8492c0f971 qcacmn: Add service bit to support backward compatibility
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.

Change-Id: Iea1ecb62841c539c13a804ae9c475831b2d4c89c
CRs-Fixed: 2874250
2021-02-16 23:52:09 -08:00
Gururaj Pandurangi
901a17b4ae qcacmn: Add service bit to support backward compatibility
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.

Change-Id: I22e11ff847cd384fac8ea0061e5df42cea0c8de8
CRs-Fixed: 2874245
2021-02-16 23:52:04 -08:00
Gururaj Pandurangi
ae259a4256 qcacmn: Add service bit to support backward compatibility
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.

Change-Id: I727fd5a055e4e400ebc174cfb504d60e3335c3c4
CRs-Fixed: 2872244
2021-02-16 23:52:00 -08:00
Kai Chen
e211b632c0 qcacmn: Use tsft timestamp for CBF in pktlog
Use tsft timer time stamp in HTT STATS IND header for
management TLV of CBF record since pktlog parser use
tsf time stamp in the ptklog record as packet receive
and transmit time.

Change-Id: I9643df11c0f9aa158f7b94e4b2083531044bcf66
2021-02-16 19:16:05 -08:00
Pavankumar Nandeshwar
4ae78ae165 qcacmn: Update the vdev id while updating the ast entry
In client roaming scenarios, when the ast entry is
updated, make sure the ast entry is updated with
new vdev id.

Change-Id: I0bd5235eeb28909cabe48f577d4477789d7be9e8
2021-02-16 17:02:41 -08:00
Lincoln Tran
b16b4608c3 qcacmn: Fix reg rule parsing order
Currently, reg rules are processed in the order of LPI, SP, VLP. The
order from halphy is SP, LPI, VLP. Update the processing order so
correct reg rules are passed north.

Change-Id: I5bb22a1dcd3f1c95d8f4498b03d6cc6eedcfe44c
CRs-fixed: 2874752
2021-02-16 17:02:38 -08:00
Vivek
f07ebaf7d8 qcacmn: Change default scan max timeout value for CM scan
The current value of scan timeout value is 10 secs.
Earlier for ap platform the scan timeout wass set to default as 50 secs
and and also for ap platform the scan could be triggered for internally
triggered connect and the max scan timeout
of 50 secs should not result in supplicant timeouts.

So setting the max scan timeout value of 50 sec for ap platforms

CRs-Fixed: 2870782
Change-Id: Icd2841f1f5503623f15bdbdea3430ef6559b9a1b
2021-02-16 08:59:24 -08:00
Santosh Anbu
45532c9924 qcacmn: Remove duplicate functions in connection manager
This is a cleanup fix to remove duplicate functions and remove unused
debug logs.

Change-Id: I0ebd203f0d19ad52cf97dcfe32914df59d1ea102
CRs-Fixed: 2863865
2021-02-16 06:55:48 -08:00
Ashish Kumar Dhanotiya
5796dd49e2 qcacmn: Fix disable channel list command
Currently driver is using sap notify api of regulatory to
update channel list for disable channel list command
which is not the correct way as sap notify api is designed
to be used by sap releted operations.

To address above issue write a separate api for
disable channel list command.

Change-Id: I79ded748bd46ec4be431c1ff6ab64c6ac8bf46be
CRs-Fixed: 2875324
2021-02-16 04:46:27 -08:00
Hariharan Basuthkar
cded00d118 qcacmn: Update regulatory database to version 34
1) Map Chile to FCC2_6G (Hex Code 0x05) for 6G, and to FCC14_World for
   2G/5G.
2) Map San Marino to ETSI1 for WIN and DSRC, and to ETSI13_World for MCC.
3) Map UAE to ETSI13_World for WIN and MCC.
4) Add hexcodes for 6G sub domains.

Change-Id: I1627f2e739ad7b862e684673c36de7a823dcb714
CRs-Fixed: 2857528
2021-02-16 03:51:30 -08:00
nobelj
5144f963ef qcacmn: Added field to get valid sequence number
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.

added field to get valid sequence number.

Change-Id: I21b1c34c0d66cb46c3a0baaaa231c952de065534
2021-02-15 22:33:03 -08:00
gaurank kathpalia
5e808c71c3 qcacmn: Handle Connect/disconnect req in during roaming
Handle Connect/disconnect req in during roaming.

Change-Id: I84612631e52fa7c736272f7d1dc4fb911dbb0401
CRs-Fixed: 2873931
2021-02-15 22:33:00 -08:00
Himanshu Batra
02d0594adf qcacmn: Avoid NULL pointer dereference
In case of handling connect scan response, if cm_req is not found for
scan id, cm_req will be NULL and is getting deref at
cm_send_connect_start_fail.
Add fix to avoid NULL pointer dereference

Change-Id: I6b30a4bc41d3b0568dd307c91a7a7202d92b9c87
CRs-Fixed: 2877829
2021-02-15 09:27:47 -08:00
Karthik Kantamneni
143de06652 qcacmn: Add support to handle OOR error on WBM ring
Add support to handle regular OOR frame error received on WBM ring

Change-Id: Ib290c4911e969debbf482f9495cab83a744f69d7
CRs-Fixed: 2876270
2021-02-15 06:21:32 -08:00
Shashikala Prabhu
a5d8ab2306 qcacmn: Add length check in beacon IE parsing function
Add length check in scan beacon IE processing function for the below IEs to
avoid any possible memory corruption.
1. WLAN_EXTN_ELEMID_SRP
2. WLAN_EXTN_ELEMID_HEOP
3. WLAN_EXTN_ELEMID_MUEDCA
4. WLAN_EXTN_ELEMID_HE_6G_CAP
5. WLAN_ELEMID_XRATES
6. WLAN_VENDOR_WPA_IE_LEN
7. WLAN_VENDOR_WME_IE_LEN
8. WLAN_VENDOR_ATHCAPS_IE_LEN
9. WLAN_VENDOR_ATH_EXTCAP_IE_LEN
10. WLAN_VENDOR_SFA_IE_LEN
11. WLAN_VENDOR_SON_IE_LEN
12. WLAN_BWNSS_MAP_OFFSET

Change-Id: I8441178c8e9da6f9e7a16915e7664bca090fe86e
CRs-Fixed: 2874025
2021-02-15 00:23:43 -08:00
nobelj
49f6e0ba94 qcacmn: Add new WDI event index for tx capture
added new WDI event index for tx capture, share same index cause
corruption when switching different feature without delay.

Change-Id: I9e7a849968544957491891629eb42974c8b65728
2021-02-12 16:51:45 -08:00
gaurank kathpalia
adea92b026 qcacmn: Move cm_bss_select_ind_rsp outside CONN_MGR_ADV_FEATURE
Move cm_bss_select_ind_rsp outside CONN_MGR_ADV_FEATURE.

Change-Id: I1a1b82a50592911f99bb65d6996165e38c699791
CRs-fixed: 2876302
2021-02-12 16:51:42 -08:00
Vevek Venkatesan
38af510319 qcacmn: add dedicated workqueue for Tx ring delayed reg write
Add delayed SRNG register writes support for Tx Ring, also add
dedicated workqueue to do the delayed Tx SRNG register writes.

Change-Id: I8dd157d341f3035e988804eab50d1ca681ab789b
CRs-Fixed: 2868989
2021-02-12 14:40:11 -08:00
Vevek Venkatesan
fdf0a167e5 qcacmn: change the return type of qdf_queue_work to bool
Currently the return type of qdf_queue_work is void,
whereas queue_work return type is bool denoting the status,
so changing the return type of qdf_queue_work to bool,
helps to check the status of the function.

Change-Id: Ifd07923a18641790314b88d38a7eba2a73e498b3
CRs-Fixed: 2876197
2021-02-12 12:27:25 -08:00
Bapiraju Alla
ded2573351 qcacmn: Add bug_on incase of skb set packet length failure
Add bug_on incase of set packet length failure for debugging purpose

Change-Id: Ie91da71c2420c585b27625ec241e62a2706606c4
CRs-Fixed: 2849081
2021-02-11 04:43:34 -08:00
Vignesh U
908d98d67e qcacmn: 5.9G channels should point to global opclass
Make 5.9G channels point to Global opclass because there is no support for
them in US opclass as per the current 802.11 spec(802.11ax D8).

Change-Id: I7278cb8f2dc8eb27d10f0d7834a13c0afd6fc668
CRs-Fixed: 2869445
2021-02-11 00:24:37 -08:00
Vulupala Shashank Reddy
1065dc8179 qcacmn: Refactor compilation flag of pkt capture mode
Refactor WLAN_FEATURE_PKT_CAPTURE_LITHIUM to WLAN_FEATURE_PKT_CAPTURE_V2
to remove hardware name from compilation flag.

Change-Id: I5a30b33d8bd6065d12e7c89c666c2f0cab66344e
CRs-Fixed: 2869827
2021-02-11 00:24:33 -08:00
Lincoln Tran
b3b38d585a qcacmn: Add logic to decide AP pwr mode when starting
Add logic to decide which power mode the AP should start in

Change-Id: I59b64e6ca26d47e395575ab129f35b97ddcc6737
CRs-fixed: 2863552
2021-02-10 20:27:32 -08:00
Kai Chen
2667f112d8 qcacmn: Add CBF support for pktlog
Fix issue on enabling packet log.
Fix issue on logging CBF pkt in AP/STA mode.
Fix issue on setting data length 4 bytes aligned in pktlog header
, htt stats indication message header and Rx management TLV header.
Add CBF support for pktlog WMI enable command for firmware to enable
CBF receive.

Change-Id: Ib0067f32d7414be96503c4c67846c1312a59586e
2021-02-10 20:27:29 -08:00
Ashish Kumar Dhanotiya
4ea435bd55 qcacmn: Add an ini to ignore user configured sched scan params
Currently there is no mechanism in driver to decide whether
to consider the user configured number of sched scan plan or
to configure only 1 schad scan plan.
There is a requirement to configure only one sched scan plan,
add ini support to meet this requiremet.

Change-Id: Iea3bc3f18696837150ce6f4bd60416a8a45bd1d3
CRs-Fixed: 2868125
2021-02-10 12:31:49 -08:00
Hariharan Basuthkar
b6b3ce1a00 qcacmn: Enable the declaration of FCC15 and FCC16
5.9GHz channels are built on the Pine wideband radio even though
the FW does not advertise the 5.9GHz support through the WMI service
bit.

This is because, the 5G regdomain id FCC16, in the case of a wideband
radio is absent in the host regulatory database. Due to this, within the
function  reg_is_fcc_regdmn, reg_get_curr_regdomain does not
return QDF_STATUS_SUCCESS.

To fix this issue, enable the declarations of FCC15 and FCC16 in the
Host regulatory database.

Change-Id: Ib48ab0167a6fa4bafb912ab28b332613bac42f73
CRs-Fixed: 3506736
2021-02-10 10:11:40 -08:00
Nandha Kishore Easwaran
e9dba9646b qcacmn: Fix gpio function arguments in #else path
Fix gpio command arguments in #else case. When WLAN_FEATURE_GPIO_CFG
is set to 0, the else path of macro is executed and the function
arguments are not matching with that of the declaration.

Change-Id: I182a636e53217dfca5a697f280316f30b1afd8ba
2021-02-10 03:29:47 -08:00