Commit Graph

2076 次程式碼提交

作者 SHA1 備註 提交日期
Abhishek Singh
60f7ef7fb1 qcacmn: Remove unused filter params from scan filter
Remove unused filter params from scan filter. Also
change the type of few, to decrease the memory required.

Change-Id: I3f86d416805174b56c8998f5a4a4723d9ebdd90b
CRs-Fixed: 2723220
2020-07-08 21:02:39 -07:00
Shwetha G K
1e31344702 qcacmn: Profile scan APIs to debug scheduler watch dog bite
Profile the scan APIs to debug the scheduler watch dog bite
due to callback scm_scan_event_handler exceeded its allotted
time of 10s

CRs-Fixed: 2713584
Change-Id: I494ce9df4cd6c7458c367527c8e5d47a9262739a
2020-07-08 00:09:47 -07:00
Pragaspathi Thilagaraj
81b14a586e qcacmn: Add API to get FILS pmksa entry cache id and SSID
Add new API to lookup the pmksa entry by fils cache id
and SSID.

Change-Id: I654d2b29b97a3b02ab6da7d2cfa0884bb8e5d2a1
CRs-Fixed: 2719643
2020-07-07 21:38:43 -07:00
Ashish Kumar Dhanotiya
eba983ed1e qcacmn: Fix return type of auth type and akm
Currently api osif_nl_to_crypto_auth_type is trying to convert
the nl specific auth types to driver specific auth types but
it does not return the correct value, this api always returns
auth type as none as it never updates the return value after
the initialization.

While parsing WPA and WAPI, open authmode and cipher and akm are
set as none by default.

Thus return converted value of the auth type. Also fix the
return type of the akm conversion. Also avoid setting
open authmode and cipher and akm as none while parsing WPA
and WAPI ie.

Change-Id: I260e58a28ddbf6b20a290488e205586a624c9b46
CRs-Fixed: 2725323
2020-07-07 16:23:18 -07:00
Abhishek Singh
9cf786a2ab qcacmn: Use crypto APIs in scan filter
Use crypto APIs in scan filter to match the security.

Change-Id: I8b4d6f6085e3bfcdd8af2b4d9243c27e070cda78
CRs-Fixed: 2718079
2020-07-03 04:28:29 -07:00
Ashish Kumar Dhanotiya
737eb69429 qcacmn: Add new scan type SCAN_FOR_CONNECT for conn_manager infra
Add new scan type SCAN_FOR_CONNECT to support connection manager
infrastructure.

CRs-Fixed: 2713772
Change-Id: I631f3f0324e82ef6cd8b2befbed020649c80bc4c
2020-07-02 08:48:14 -07:00
Amar Singhal
07cc4bb4b1 qcacmn: Maintain wiphy init and de-init states
Wiphy is attached to pdev after pdev has been created, but before pdev
is opened. So maintain the state of wiphy in pdev open and close
callbacks. While calling regulatory callbacks, check the wiphy init
state.

Change-Id: I51243017ac24bc4473abddbfd0506b9e3490de4a
CRs-Fixed: 2718363
2020-07-02 05:55:54 -07:00
Surabhi Vishnoi
9762d883bc qcacmn: Add ucfg_cfr_capture_data api in CFR component
This API is used to parse the cfr capture metadata received in HTT msg
HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND from firmware. It reads the cfr dumps
from host allocated mem chunks for CFR using offset index received in
HTT msg, populates the CFR dumps into streamfs and updates the read
index of memory chunks allocated for CFR during init.

Change-Id: I2f49e308c3659779b8da7ae1baaceb5bfa968b4e
CRs-Fixed: 2687062
2020-07-02 05:55:48 -07:00
Abhishek Singh
e2097ddb09 qcacmn: Replace different struct of SISD with struct wlan_ssid
There are different version of SSID structure used in driver, replace
them with struct wlan_ssid.

Also move struct element_info from scan module to generic structures.

Change-Id: Ia32f82d943980c23b4ff478f5a06c5c053036de5
CRs-Fixed: 2721872
2020-07-01 00:26:20 -07:00
Ashish Kumar Dhanotiya
e7e012dc4d Revert "qcacmn: Update freq range 5170-5250 to indoor only for APL9"
This reverts commit I7c52fc76b5a8d6a47d515025d05b110332347246.

Change-Id: I3e24134e02a5a1a3f4a0f901b1c0742c21bd52fa
CRs-Fixed: 2719624
2020-06-30 14:58:25 -07:00
Abhishek Singh
62fb09b241 qcacmn: Fix race between ser psoc close and vdev destroy handler
In wlan_serialization_psoc_disable the timers are freed without
holding lock and at the same time the
wlan_serialization_cleanup_vdev_timers from vdev destroy handler
is accessing the timers, this result in cleanup_vdev_timers
accessing freed timer memory resulting in assert.

Fix is to free timer memory while holding timer lock. Also as the
lock can be used by vdev delete handler after freeing in
psoc_disable, move the init and deinit of the lock to psoc create
and destroy handlers respectively.

Change-Id: Idf822a91022de6b51c7ee1895f71b6fb94fedd72
CRs-Fixed: 2721064
2020-06-30 02:34:01 -07:00
gaurank kathpalia
9fa7cd067f qcacmn: Update the Copyright year in bss score files
Update the Copyright year in new bss score file.

Change-Id: Iaafcd74fe7f4b2c1d71e98c2884333d14f5777ff
CRs-Fixed: 2720551
2020-06-29 23:46:59 -07:00
gaurank kathpalia
92354bad4d qcacmn: Update the Copyright year in new connection manager files
Update the Copyright year in new connection manager file.

Change-Id: I599d9fb56ac74d6147774f03683fbef19598d637
CRs-Fixed: 2720551
2020-06-29 23:46:56 -07:00
Surabhi Vishnoi
d2c2a6aec6 qcacmn: Add support for CFR in adrastea target
Add the init and deinit CFR pdev api for adrastea target type.
cfr_adrastea_init_pdev api enables the CFR feature if both host and
firmware supports the feature, initialises the cfr pdev structure
and streamfs.

Also during allocation of memory requested by firmware, skip smaller
chunks memory allocation for CFR capture requested memory as firmware
expects contiguous memory.

Change-Id: Ib893dc8a845fea990a11e95e98d8a656f7df12ba
CRs-Fixed: 2687057
2020-06-29 19:15:56 -07:00
Hariharan Basuthkar
5816c50032 qcacmn: 11ax draft 6.1 6G channelization update
In 11ax draft 6.1, the 6G starting frequency has been shifted by 10 MHz
to the right from 5940 to 5950. Make the following changes in various
variables and structures in the regulatory component:

1. Add a macro SIX_GHZ_NON_ORPHAN_START_FREQ.
2. Add an orphan channel frequency - 5935 MHz to the chan enum.
3. Shift every enum in channel_enum by 10 MHz to the right.
4. Shift MIN_CHANNEL_6GHZ and MAX_CHANNEL_6GHZ by 10 MHz on the right.
5. Shift every center frequeny by 10 MHz on the right in
   bonded_chan_40mhz_list_freq, bonded_chan_80mhz_list_freq,
   bonded_chan_160mhz_list_freq.
6. Shift every center frequeny by 10 MHz on the right in channel_map_us,
   channel_map_eu, channel_map_japan, channel_map_global and
   channel_map_china channel maps.
7. Change 6G starting frequency from 5940 to 5950 for operating class
   131 to 135 in the global_op_class table.
   table.
8. Add operating class 136 in the global_op_class table.

Change-Id: I3c82e2eb98cdaf0ff8754bd990529a1833276304
CRs-Fixed: 2704977
2020-06-27 22:45:43 -07:00
Lincoln Tran
a86b23ee68 qcacmn: Update scheduler_msg callback type
This fixes a CFI failure in callback assignment.

Currently, the callbacks in scheduler_msg are void function
pointers. Update them to have a defined type as
scheduler_msg_process_fn_t to catch type mismatch during
compilation.

Other changes to conform to this new type include:
	1. Cast callback to qdf_mc_timer_callback_t when
	   referencing, and back when assigning
	2. Cast wlan_serialization_generic_timer_cb to
	   take fit into scheduler_msg
	3. Cast target_if_vdev_mgr_rsp_timer_cb to fit
	   into scheduler_msg

Change-Id: I052bc54826d377ae92f5bcc80ca08afb6f5e01e3
CRs-fixed: 2719975
2020-06-27 06:18:28 -07:00
gaurank kathpalia
9375922ab2 qcacmn: Add basic infra for connection manager
Add basic infra for connection mgr state machine
to handle connect and disconnect requests.

Change-Id: I671f62f66ab511912886c1da84c3a69be0032872
CRs-Fixed: 2707901
2020-06-26 22:48:35 -07:00
Lincoln Tran
a6029b9c59 qcacmn: Add case when to disable burst scan
Currently, file transfer from DUT to comp device is slower
than expected. Disable burst scan in STA+GO/CLI scenario to
resolve this.

Change-Id: Ieded4aaa54f233cc288d6b6f3ef7051bfe5ec81f
CRs-fixed: 2703285
2020-06-26 20:18:43 -07:00
Utkarsh Bhatnagar
2ebcbdbe31 qcacmn: Add boot time log print in scm_add_update_entry
Add boot time log print in scm_add_update_entry so that it
should be printed for every beacon/probe response.
This will be useful in getting the value filled in
NL80211_BSS_LAST_SEEN_BOOTTIME.

Change-Id: I0d348db551ffc9f765d0b6d8e8654573b7b70654
CRs-Fixed: 2716941
2020-06-26 16:48:47 -07:00
Utkarsh Bhatnagar
1035366308 qcacmn: Add only frames with valid channel in scan cache
Kernel reject the beacon/probe resp frame with invalid channel in
DS,HT info and HE IE, but same frame is added in the scan cache
and when mlme refer this frame, connect issues are seen due to
invalid channel.

Thus do not add the entry in scan cache.

Change-Id: Ib2891f95034b04be26c5feefed7c4354d8bb367a
CRs-Fixed: 2708975
2020-06-26 11:09:02 -07:00
gaurank kathpalia
506f49a0ff qcacmn: Move scoring logic to connection manager
Move bss scoring logic to connection manager.

Change-Id: If8484ec2fa8b3e2d153ae4a6caed76f3354b8965
CRs-Fixed: 2707106
2020-06-26 11:08:56 -07:00
Hariharan Basuthkar
d5b80abab6 qcacmn: Make regulatory APIs common for both WIN and MCC
Make reg_is_disable_for_freq and reg_is_disable_ch common for both WIN
and MCC, by moving the definition from reg_utils.c to
reg_services_common.c and declaration from reg_utils.h to
reg_services_common.h.

Change-Id: I6425c99b403580836d1ee41839086f4df3971091
CRs-Fixed: 2718047
2020-06-25 13:17:57 -07:00
Sourav Mohapatra
b510a1e642 qcacmn: Use QDF sleep instead of wait_for_timeout in cancel scan
In the function ucfg_scan_cancel_sync the driver uses
qdf_wait_single_event to wait for the scan event to be cancelled.
This timer is affected by the timer multiplier which causes unwarranted
wait times.

Replace the qdf_wait_single_event with a simple qdf_sleep.

Change-Id: Ib4149dff5677956f5c8bc48f7f72d2bf5eda664f
CRs-Fixed: 2695569
2020-06-25 13:17:54 -07:00
Vignesh U
e5f0e052df qcacmn: Address compilation issue
The function "ucfg_dfs_is_hw_pulses_allowed" should return bool and has
a compilation error
"return' with no value, in function returning non-void".

Return the bool type "false" when the dfs is a NULL object.

CRs-Fixed: 2715235
Change-Id: I8717aaedd1ac8208ce6257721d5890b82ca13a8f
2020-06-24 15:04:52 -07:00
Utkarsh Bhatnagar
0b2b5e9e78 qcacmn: Don't reset cipher_caps in crypto_reset_prarams
Remove cipher_caps from wlan_crypto_reset_prarams as it
is FW capability and should only be set once when vdev
is created.

Change-Id: I8beab7ead2217ead532bfaacc0eea133d90cdd0e
CRs-Fixed: 2716728
2020-06-24 15:04:44 -07:00
nakul kachhwaha
89a67f807e qcacmn: iot_sim beacon content change update
Adding support for beacon content change.

Change-Id: I8f804dd7d2cbbe7d3b7dea58841d7321f28101c7
CRs-Fixed: 2694454
2020-06-24 03:35:01 -07:00
nakul kachhwaha
c5cdd1eaaf qcacmn: iot_sim add support for drop operation
Adding support for iot_sim drop operation.
Drop operation will be handled in Rx direction.

Change-Id: If2e1c9663a69fcd16715cdd1d28639a388ea1c0c
CRs-Fixed: 2686309
2020-06-24 03:34:57 -07:00
Jayachandran Sreekumaran
81b11d79c5 qcacmn: umac code clean up for iot_sim
Put iot_sim code under simulation feature flag.

Change-Id: Iccfb84c53172d5a4cccd00490d5720d99097401e
CRs-Fixed: 2707113
2020-06-24 03:34:51 -07:00
Jianmin Zhu
4f9ae24e67 qcacmn: Replace channel with frequency for 6G
Replace WLAN_REG_IS_24GHZ_CH with WLAN_REG_IS_24GHZ_CH_FREQ

Change-Id: Ia2ff3a317f0286b0a6ca4d8642007e1a608c3e3d
CRs-Fixed: 2714721
2020-06-23 04:01:17 -07:00
Vignesh U
ace59f2d1f qcacmn: Update OCAC completion Host structure and processing routine
The OCAC completion event 'wmi_vdev_adfs_ocac_complete_event_fixed_param'
has been updated to include center frequencies of 2 segments in MHz for
165Mhz Agile mode.

Update the corresponding Host OCAC completion data structure
'vdev_adfs_complete_status' to include 2 center frequencies to support
165MHz Agile mode.

Also FW might send a delayed OCAC completion status after the Host has
configured a new agile channel. So all the OCAC completion events should be
validated if the status is received for the current agile channel.

Update the OCAC completion processing API to include 2 center frequencies
and chwidth so that, it is possible to check if the OCAC completion status
is received on current agile channel or an obsolete agile channel.

CRs-Fixed: 2705671
Change-Id: Iab8980f8d030120d107f068d890c9694d28ee98c
2020-06-19 21:47:30 -07:00
Santosh Anbu
5b4ee46d8e qcacmn: Check queue size of queue operation
As part of activation of pending cmds after removal of a blocking cmd,
we iterate over the pdev pending list until the queue size and move
non-scan pending cmd to active queue and go to the head of the queue
in the next iteration.

Since we start from head of queue with decreased queue size value, the
last few cmds in the pending is never iterated since queue size has
already reached zero leading to cmds left in pending queue forever.

Add change to restore pending node to previous node of the command that
is moved from pending queue.

Change-Id: If500906c853f21319c04a21c8c68690a71e51ec2
CRs-Fixed: 2713555
2020-06-19 19:45:21 -07:00
bings
5ecc1e1ae8 qcacmn: set key as valid after wlan_crypto_save_key
For wep mode, when key is received from cfg80211, wlan_crypto_save_key
is called to save the key, then wlan_crypto_default_key is called to
save default key id.
key should be valid when save default key id.

set key as valid after wlan_crypto_save_key

Change-Id: Ic13e311593154911ee21db5172188c7037f429a3
CRs-Fixed: 2654882
2020-06-18 23:22:04 -07:00
Sandeep Puligilla
0c68762f84 qcacmn: Increase scan active dwelltime for NAN+STA mode
STA not able to scan APs when NAN+STA concurrency is enabled.

Increase the active scan dwell time from 40ms to 60ms when
NAN+STA is enabled.

Change-Id: Ie3f3cccecaed3a5622a9f93f952edc0aec4f56d9
CRs-Fixed: 2699662
2020-06-18 19:17:21 -07:00
Srinivas Dasari
cf645a8923 qcacmn: Specify the size of array dbgid-strings as WLAN_REF_ID_MAX
Currently, size of the array to return dbgids in string format is
not specified explicitly. This array is expected to be updated
with the corresponding string when a dbgid is added in the
enum wlan_objmgr_ref_dbgid. Any miss in the updation would lead
to array out of bound access as the API string_from_dbgid()
tries get string corresponds to the newly added dbgid also.
Specify the maximum possible size as WLAN_REF_ID_MAX explicitly,
so that it returns "null" if the string corresponds a dbgid
is not defined.
Return the string only if the id matches or return "Unknown".

Change-Id: I1c835b8e9d681bf23f1bce866aa523cb41b9a134
CRs-Fixed: 2702696
2020-06-18 05:47:35 -07:00
Ashish Kumar Dhanotiya
f816484b13 qcacmn: Update freq range 5170-5250 to indoor only for APL9
Based on the latest update in the regulatory, update
frequency range 5170-5250 to indoor only for APL9 reg domain.

Change-Id: I7c52fc76b5a8d6a47d515025d05b110332347246
CRs-Fixed: 2707525
2020-06-16 14:17:43 -07:00
Vivek
80a5429aa1 qcacmn: Add vdev id when printing serialization pdev queue
While printing the serialization pdev queue, we are not
printing the VDEV id.

Add VDEV id while printing the serialization pdev queues

Change-Id: Ie6ecbf36da3026550fbe54137c546cf8bd7940e4
CRs-Fixed: 2703604
2020-06-16 01:52:59 -07:00
Santosh Anbu
896773b223 qcacmn: Return false if VDEV start fails for STA VDEV
Add change to return the error value to the caller in case when
the VDEV start fails for STA VDEV.

Change-Id: I8585e1233609113158231ec7104cf5046af23cd5
CRs-Fixed: 2698826
2020-06-14 01:18:21 -07:00
Hariharan Basuthkar
6cb56806d3 qcacmn: Place wlan_reg_is_6ghz_supported under CONFIG_REG_CLIENT macro
Place wlan_reg_is_6ghz_supported under CONFIG_REG_CLIENT macro as it
is an MCC specific API.

Also, within reg_update_pdev_wireless_modes, return QDF_STATUS_E_INVAL
if pdev_priv_obj is NULL.

Change-Id: I1ec23b2f44aec037ba99a2fd71812c8287c9f4dc
CRs-Fixed: 2704712
2020-06-12 01:04:17 -07:00
Amar Singhal
af142cc672 qcacmn: Use channel flags to determine DFS channel
Use channel flags to determine DFS channel. Channel state is
set to CHANNEL_STATE_DFS even for passive channel.

Change-Id: I5ff88f05d2967f9e93de028d59d91369b66303c5
CRs-Fixed: 2695162
2020-06-10 20:23:17 -07:00
sheenam monga
c070294c55 qcacmn: Don't update frame type to invalid for MCSC_RSP code
Currently, for action code MCSC RSP frame type is updated to
MGMT_FRM_UNSPECIFIED and is not received by framework.

Fix is to update frame type to MGMT_ACTION_MCSC_RSP, so that framework
can receive MCSC packets in case of action type MCSC_RSP.

Change-Id: I81f107558959dcf1c4967e677d6e1ba3d71e3596
CRs-Fixed: 2707310
2020-06-10 18:13:51 -07:00
Lincoln Tran
e37321aa90 qcacmn: Revert wlan_serialization_generic_timer_cb
Revert the change for wlan_serialization_generic_timer_cb
from change I760b41b81c006187efb162d410390e1c11878b82.
The change introduced a CFI error because timer callbacks
do not expect a return status.

Change-Id: Iebb17fb82c5b3d4b1393e2b3417c766d118c0674
CRs-fixed: 2687777
2020-06-09 12:28:18 -07:00
Edayilliam Jayadev
fb564225fb qcacmn: Check agile frequency forms a valid 80+80 channel
For agile scan request in 80 + 80 MHz check whether the user given
agile frequency forms a valid 80+80 channel.

CRs-Fixed: 2690964
Change-Id: Ia374333118d4f06861a1cfe0a75db349bca9e879
2020-06-09 06:29:08 -07:00
Ananya Barat
1aa085fcd2 qcacmn: Map Korea to channel_map_us instead of channel_map_eu
In the current implementation, Korea is mapped to channel_map_eu.
Korea is mapped to 5G regdomain APL9 which supports 80MHz channels
upto 161. However, the Europe opclass supports 80 MHz channels only
upto 128. As a result, when the AP tries to switch to the 80 MHz channel
149, the opclass validation logic finds this invalid and fills wrong
channel and opclass number in the ECSA IE. This leads the STA to
disconnect.

Fix this by mapping Korea to channel_map_global for Tx, which will map
it to the Global Operating Class by the following logic:
US Op Class Table : Countries having FCC DFS Region Eg: USA , Canada
EU Op Class Table : Countries having ETSI DFS Region Eg: Denmark
CN Op Class Table : Countries having China DFS Region Eg : China
JP Op Class Table : Countries having MKK DFS Region Eg : Japan
Global Op Class Table : All other countries

Change-Id: I5c6ff14888b218bc4fce707335ba53f60f579e19
CRs-Fixed: 2692802
2020-06-09 04:23:01 -07:00
Shashikala Prabhu
a76f88adb8 qcacmn: Add support to populate target 11AX wireless modes
Add support to populate 11AX wireless modes advetised in ext2 service
ready message. To support older FW that do not advertise this, use
existing host workaround to populate these in host  itself.

Change-Id: I3b3b280672592c858bd3f6f0e368909a16bd30ee
CRs-Fixed: 2650136
2020-06-08 18:37:03 -07:00
Shashikala Prabhu
4a452b5de6 qcacmn: Update 11AX wireless modes in reg psoc structure
FW advertises the 11AX wireless modes in service ready ext2 event.
Add a regulatory API to update these modes in regulatory  psoc
private object.

Change-Id: I51e781f6819dabf2b98e129a996213a7eecbf8b2
CRs-Fixed: 2650136
2020-06-08 18:37:00 -07:00
Hariharan Basuthkar
04f7a32d29 qcacmn: Modify reg_rules in FCC4
As per regulatory update database xls, FCC4 supports 4.9GHz channels,
as well as 5G channels. But currently only 4.9GHz support is present.

Therefore, add the 5G reg_rules in FCC4's definition to support 5GHz
channels.

Change-Id: Ib71c01635f5aef18c4597ee3f699b5b033087112
CRs-Fixed: 2689729
2020-06-08 13:50:27 -07:00
Lincoln Tran
0779b77211 qcacmn: Add regulatory API for phymode change
Add new enum in regulatory to hold all current phymodes.
Add a new API to get max allowed phymode which is not more than the
user provided phymode.

This change simplifies the phymode selection process when starting
or updating the parameters of a vdev.

Change-Id: I12c15e357b80faf2f5272800e55179f02755a263
CRs-fixed: 2658290
2020-06-03 13:33:40 -07:00
Lincoln Tran
f682392d3e qcacmn: Update country to have correct phymode map
The following 3 countries will not support 802.11ax:
1) Belarus
2) Russia
3) Ukraine

This change updates the phymode bitmap for those countries.

Change-Id: I8cd293341d82446cfb5f99eb912a925f4f3398b3
CRs-fixed: 2658290
2020-06-03 13:33:36 -07:00
Lincoln Tran
64db569708 qcacmn: Fix wifi_pos_send_rsp pointer cast
Update the wifi_pos_send_rsp function pointer cast to have the
same parameters as the actual function pointer.

Change-Id: I7e9f5f9972fe96f74c76ffb0fa069a93c98db72b
CRs-fixed: 2685627
2020-06-01 09:34:07 -07:00
Ananya Barat
9cd92dce58 qcacmn: Fill the max 5G bandwidth from the regdomains_5g table
In the current implementation the max_5g_bw was hardcoded as 160 MHz
in reg_get_max_5g_bw_from_regdomain, as this information was not
available in regdomains_5g so far.

However, the regdomains_5g table has been updated to make the maximum
5G bandwidth supported by the regdomain available. Hence updating this
information.

Change-Id: I9b9aea9a81b6b0d6f590c266e49a6b4ca3a9e32c
2020-06-01 05:23:29 -07:00