Commit Graph

2508 Commits

Author SHA1 Message Date
Aditya Kodukula
1c6fef8450 qcacmn: Modify the minidump_remove function
The wlan_minidump_remove function utilizes the updated kernel API.
So, modify the function definition and parameters accordingly.

Change-Id: Ib62a46688400d5d9c2ff45c17dc41d5f0b7f58d0
CRs-Fixed: 2860432
2021-03-09 21:06:58 -08:00
Ananya Barat
7c33a279fd qcacmn: Do not enable all the dfs error prints by default
A huge number of prints come under dfs_err. Enabling all of these
unnecessarily floods the console and some of these prints show up for
expected behavior such as  the dfs object being null for a 6GHz radio.
Only memory specific prints could be enabled specifically later.

CRs-Fixed: 2887966
Change-Id: I27091924450d1cc3d4e3df38e49f1a537e080bc6
2021-03-07 02:27:41 -08:00
sheenam monga
7ebc682b49 qcacmn: Add support to handle BIG_DATA_P2_EVENTID
Fw advertise big data stats in response of host
command WMI_VDEV_GET_BIG_DATA_P2_CMDID.
Add support to handle BIG_DATA_P2_EVENTID.

Change-Id: I550eb1c99ee1d8c102f9ad673841c410ff0829ef
CRs-Fixed: 2868922
2021-03-05 12:33:42 -08:00
Amruta Kulkarni
64b096fde9 qcacmn: Support roam start and roam abort request in CM
Add support for roam start and roam abort request
in connection manager.

CRs-Fixed: 2882233
Change-Id: I5780e7f22363ee6014d39b0df9cb068b4afdd71c
2021-03-05 10:10:04 -08:00
Lincoln Tran
9f2767dd41 qcacmn: Update set country API to return failure
When country has not changed, reg_set_country will drop the request.
Return failure in this case so caller will know if no action is taken.

Change-Id: If6095887c6166edc626eab3bde312cc0aa8490b2
CRs-fixed: 2892356
2021-03-05 01:18:33 -08:00
Abhishek Singh
9b797fd035 qcacmn: Add logic to remove preauth and roam ser command
Add logic to remove preauth or roam command from serialization
depending on the state the roaming was in.

Change-Id: Ia381d040ce7e15a725eb2402896bf476d3236566
CRs-fixed: 2882994
2021-03-05 01:18:30 -08:00
Ashish Kumar Dhanotiya
ad9b0c99d0 qcacmn: Replace wlan_cm_roam_resp struct with wlan_cm_connect_resp
Structure wlan_cm_roam_resp and wlan_cm_connect_resp are identical
structures and in current code these structures are used for connect
and reassoc functionalities with different functions as these are
identical structures and only one structure can be used to reduce
the duplication of the code.

To address this code duplication issue replace wlan_cm_roam_resp
structure with wlan_cm_connect_resp.

Change-Id: I90949c25f46acd2fa78cebb70c9a04f0718b90c4
CRs-Fixed: 2875232
2021-03-04 06:37:09 -08:00
Shashikala Prabhu
e601f0d39d qcacmn: Modify the WIDE_BW_CHAN_SWITCH IE length check
Modify the length check to drop beacons which has
WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH IE length less than 3. This is to
accommodate the addition of fields to this IE in the future.

Change-Id: I8cba60b631022f4348cce90ae41a003964040ad1
CRs-Fixed: 2884249
2021-03-02 14:22:50 -08:00
Shwetha G K
a48ce19f53 qcacmn: Validate the periodicity based on target
Allow cfr period to be multiples of 1ms for targets like
qcn9000, qca6018, qca8074v2 and qca5018.

For other targets, restrict it to be multiples of 10ms.

CRs-Fixed: 2878062
Change-Id: I7f5638adf8ef39f7b8b681ae6693f5f032217e88
2021-03-02 10:10:04 -08:00
Shashikala Prabhu
c45259af49 qcacmn: Add missing qdf_mem_free in CFR pdev obj create function
Add missing qdf_mem_free in wlan_cfr_pdev_obj_create_handler().

Change-Id: I2f5528a95ec8429ab0a5853db4a0f34a6425903c
CRs-Fixed: 2887089
2021-03-01 18:54:10 -08:00
sheenam monga
fe43d91ba9 qcacmn: Remove unused function wlan_reg_get_channel_state
Remove unused function wlan_reg_get_channel_state

Change-Id: I6f1a0366bae0eff5acbc3dd902f730fd554aee17
CRs-Fixed: 2869902
2021-03-01 09:09:36 -08:00
Jianmin Zhu
0eb2a50ed8 qcacmn: Remove WLAN_REG_IS_24GHZ_CH in wlan_reg_get_bonded_channel_state
Remove WLAN_REG_IS_24GHZ_CH in wlan_reg_get_bonded_channel_state.
Remove definition of following:
WLAN_REG_IS_24GHZ_CH
wlan_reg_is_24ghz_ch
WLAN_REG_IS_5GHZ_CH
wlan_reg_is_5ghz_ch

Change-Id: I7bea616f0bb8e0b98bfe03e9fd66ef24588f59e3
CRs-Fixed: 2883685
2021-03-01 09:09:32 -08:00
Vignesh Mohan
51d711ef4c qcacmn: Introduce an API to fetch the bonded channel pair
Introduce a regulatory core API to fetch the bonded channel
pointer given a frequency and a channel width, using the
static bonded channel arrays for different bandwidths.

Change-Id: I87d91a45c59ba7d9ba6d692bb29822b184b4604b
2021-03-01 05:29:47 -08:00
Will Huang
cb60cd6b2b qcacmn: Add back dfs_set_nol() to common code
dfs_set_nol function is also required by MCC DFS function, Change-Id
I6c74dd13a16acb2a67bb3b477b13bc0e4ee165ce move implementation from
common code to WIN, add back it.

Change-Id: I46c16eec82024c3af4b4cee02ff19edb0023d3b6
CRs-Fixed: 2875061
2021-02-28 20:00:49 -08:00
Himanshu Batra
311a257c9e qcacmn: Avoid NULL pointer dereferences
Add checks to avoid NULL pointer dereferences

Change-Id: I4b53936d6e08b5bb27c77dd9097a14c87d38f5a6
CRs-Fixed: 2887354
2021-02-26 11:50:35 -08:00
gaurank kathpalia
10469149f2 qcacmn: Optimize event_handled while handling events
Optimize event_handled while handling connection manager events.

Change-Id: I0e6604fe8757c4a812941e178dbcfe6b00d677eb
CRs-Fixed: 2885958
2021-02-25 07:36:03 -08:00
Lincoln Tran
6118d488dd qcacmn: Expose freq validation API
Create a wrapper for the reg_is_freq_present_in_cur_chan_list API so
other modules can invoke it.

Change-Id: I0e21b15f1e08bb4301329b6b1a3c3c40edc09060
CRs-fixed: 2884768
2021-02-24 23:33:17 -08:00
gaurank kathpalia
fffe13cbc9 qcacmn: Fix the pointer reset in cm_allocate_and_copy_ies_and_keys
In cm_allocate_and_copy_ies_and_keys instead of target's pointer
source's pointers are reset thus making the following code void

Fix this by resetting the target pointers which needs to be allocated
with new memory.

Change-Id: I4417492c43eb27833d365ec4aa644e07ed4eca51
CRs-fixed: 2884187
2021-02-24 01:51:45 -08:00
gaolez
76469c8aee qcacmn: Optimize congestion calculation logic
In current code logic, in case of channel utilization value is 0, the
congestion value treated as “not present” and give it a medium score.
This will cause a very clean channel get a medium score.
To fix the issue, need calculated congestion score from 1-100 and
not 0-100.

Change-Id: Iff030cf4a682d6e585d6f812a522cb8b6683cc44
CRs-Fixed: 2812978
2021-02-24 01:51:40 -08:00
Shiva Krishna Pittala
a577961e92 qcacmn: Optimize scm_age_out_entries()
To check if a scan entry is a non-Tx VAP of our connected BSS, the current
implementation of scm_age_out_entries() searches through all scan entries
to find out our connected BSS. This check takes O(n) time where n = number
of scan entries. Running this check in the main loop of
scm_age_out_entries() results in an overall time complexity of O(square(n))

Time complexity can be improved if we do one iteration over scan entries
to find out our connected BSS, and save it in a local variable, and then
use that local variable in the main loop of scm_age_out_entries().
With this approach, we just do two iterations over scan entries
instead of nested iterations.

CRs-Fixed: 2877884
Change-Id: I51be764f4aa6f65ba9068d46eaa42791ac0f8d97
2021-02-23 10:52:04 -08:00
Abhishek Singh
1c177a9a31 qcacmn: Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr
Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr, as
interface manager .h files take care of it.

Change-Id: I5b1e07beecd93c98429318372ed72fdf414712a4
CRs-fixed: 2878656
2021-02-23 05:31:13 -08:00
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
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
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
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
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
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
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
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
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
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
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
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
Shwetha G K
363cc4acca qcacmn: Change dev_sanity_check as non-inline function
Change dev_sanity_check API as non-inline function to
optimize the code size.

Change-Id: Ice0b589b7303317ed3a402605949050d2af4820a
2021-02-10 03:29:43 -08:00
Shashikala Prabhu
b69d3780be 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_ELEMID_COUNTRY
2. WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH
3. WLAN_ELEMID_VHT_TX_PWR_ENVLP
4. WLAN_EXTN_ELEMID_MAX_CHAN_SWITCH_TIME

Change-Id: I860bee8633849215d46c2dfe60a1a98d7c80f510
CRs-Fixed: 2873039
2021-02-09 23:07:24 -08:00
Abdul Muqtadeer Ahmed
f44435fb3c qcacmn: Change default value of ini is_bssid_hint_priority
The default value of ini is_bssid_hint_priority change 1 for AP
and 0 for non AP in documentation.

Change-Id: I4181ba5b72a5d6f013be74adaa579fb23370e25c
CRs-Fixed: 2869604
2021-02-08 15:01:19 -08:00
Pragaspathi Thilagaraj
a71fd7e785 qcacmn: Add support for PMK validity time & reauth threshold
Add support for PMK validity time & reauth threshold

Change-Id: I31d8826ea79d6a7f8d60424130b352a98b445043
CRs-Fixed: 2869653
2021-02-08 10:51:45 -08:00
Rakshith Suresh Patkar
cb5da5d67e qcacmn: Update missing ie pointers in util_scan_copy_beacon_data
util_scan_copy_beacon_data copies beacon and updates ie
pointers for the cache entry. However, two of the ie pointers
listed below are not updated:
 1) hecap_6g - pointer to he 6ghz cap ie.
 2) srp - pointer to spatial reuse parameter sub extended ie.

These non updated pointers will cause use after free issues
if the parent scan entry is freed.

Update ie pointers for hecap_6g and srp.

Change-Id: I6d0a6129941e3dc1267404a4191ab368c013a102
CRs-Fixed: 2862607
2021-02-06 05:53:18 -08:00