Commit Graph

34 Commits

Author SHA1 Message Date
Kiran Kumar Lokere
e2ada05cee qcacmn: Config support to use BSSID in probe request RA
User configuration support to use scan request BSSID value
in Probe Request frame RA during the scan.

Change-Id: I40d07e4c3e4814a9c816b3e426dcbb63df7ddf27
CRs-Fixed: 2945679
2021-08-27 01:06:23 -07:00
Aditya Sathish
6b048962f6 qcacmn: Add support for scanband config for cfg80211 scan
cfg80211tool athX scanband <val> config is used to
select a specific band to scan (i.e., 2.4GHz and/or
5GHz). The initial support for this command was
added as an iwpriv for WEXT-based scanning through
IOCTL. However, on bringing up cfg80211 support,
support for not extended for the cfg80211-based
vendor scan.

Add support to ensure that this command will
control band configuration for scanning for cfg80211
vendor scanning.

CRs-Fixed: 2969914
Change-Id: Ie3b7140ea78f15533e73fbe6251e670e6faa6d29
2021-07-02 02:46:47 -07:00
Liangwei Dong
d4b3e3d043 qcacmn: Don't unlink connected bssid
In dual station case, wlan0 is connected to AP, wlan1
connects to the same ap and will get failed because two
interfaces can not connect to same band (same ap).
At present wlan1 will do unlink bss of ap after connect fail.
This may corrupt the bss tree in kernel because the bss is
still pointed by wlan0’s wdev -> current_bss.
Fix by avoid the unlink bss if the bss is still connected
in any interfaces.

Change-Id: I27c76eca2d4f130addabbdc2600f6959d24c8511
CRs-Fixed: 2837496
2020-12-16 09:55:49 -08:00
Debasis Das
10aab5f245 qcacmn: Make API that informs about scan status non-static
The API wlan_cfg80211_scan_done() abstracts the kernel
API cfg80211_scan_done().This should be made accessible
throughout the driver by making it non-static.

Change-Id: Ic1a882a115d11339909e62e53f040774d5370981
2020-09-08 00:47:40 -07:00
Alan Chen
321ed86cde qcacmn: Add console logging for bss found during scan
Add logic to log number of bss found in dmesg during scan.

Change-Id: Idfa5c548c509f2f0669fd635eb4cae16b23f3990
CRs-Fixed: 2759312
2020-08-22 20:31:42 -07:00
Sourav Mohapatra
918e46deec qcacmn: Add policy attribute to QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN
According to new changes in kernel 5.2 version onwards, driver has to
provide the policy for a NL command to be verified against while
registering wiphy to the kernel.

To accommodate these changes, add policy to the following vendor
command that is being registered in the driver.

	QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN

Change-Id: I7cd4e6c50a48580a124e36c32b9cbebe557c04bf
CRs-Fixed: 2621311
2020-03-13 08:39:43 -07: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
Ashish Kumar Dhanotiya
3863721077 qcacmn: Unlink hidden bss entry from kernel
Kernel maintains a list of bss and it adds/updates the bss
entries whenever driver informs it. When driver receives
beacon or probe response from any ap it informs kernel to
update the bss list and whenever it disconnects with the
AP driver unlink the bss in the kernel.

If the AP is hidden, when driver gets beacon from this
hidden AP it informs the kernel to update the bss list.
kernel add this entry to it's bss list with NULL SSID.
Now when driver receives probe response from this hidden
AP it again informs the kernel to update the bss list,
as this is probe response and ssid is not hidden,
kernel treats this entry as new entry and adds it to
its bss list and links this entry to the older hidden
AP entry (But still these are two entries for hidden AP).

When driver gets disconnect from the AP it unlink the
bss entry corresponding to this AP from kernel's bss
list, but since there are two entries for the same AP
as the AP is a hidden AP, driver should clear hidden AP
entry (Which was added as part of beacon) which is
not happening currently.
Now when AP moves from hidden to broadcasting SSID
in it's beacon, kernel drops this beacon entry as its
confusing because there is already a beacon entry with
hidden bss for this AP. During connection driver tries
to update the entry in the kernel and it fails as kernel
drops the beacon resulting into the connection failure.

To resolve this issue, whenever driver unlink the bss
entries from the kernel bss list unlink the hidden bss
entries also from the kernel's bss list.

Change-Id: I629475db8e8f10a6bc403314a984939e38d0a4da
CRs-Fixed: 2488955
2019-07-19 00:54:27 -07:00
Gurumoorthi Gnanasambandhan
d9ee8fd96b qcacmn: Add option to set high priority scan
For enhanced  repeater independent mode scan request
from wpa_supplicant needs to be set in high priority scan.

Change-Id: I4f95d0e7b2f1d9eb68ed14efd4ee3932ced5af61
CRs-Fixed: 2432916
2019-05-10 16:28:44 -07:00
Shashikala Prabhu
7b635b9857 qcacmn: Add support to send user vendor ie info to target
When user sets the vendor ie for probe request frame, it is not
included in the broadcast probe request sent by FW.

Add support to send vendor ie info in scan start command to FW. Therefore,
FW can include this vendor ie in the broadcast probe request frame.

Change-Id: Ie5fc0c074bd7543568a135d3ef4662bf09b274f6
CRs-Fixed: 2400265
2019-03-08 12:05:57 -08:00
Abhishek Singh
7062efab4c qcacmn: Fix Connection issue when AP change from hidden to non-hidden
If AP change its status from hidden to broadcasting SSID in its beacon
kernel drop the beacon entry as its confusing. Now during connection
driver try to update the entry in kernel and it fails and as kernel drop
the beacon the connection fails.

To fix this detect if AP changed its ssid type from hidden to
broadcasting and unlink the old bss from kernel in that case.

Change-Id: I10ec42749ebcd2ddea23f7f3a94d862124df156d
CRs-Fixed: 2410430
2019-03-07 20:47:10 -08:00
Pragaspathi Thilagaraj
cc3af93f48 qcacmn: Converge PNO related ini items to scan component
Add basic infra to move the following PNO  to converged scan
component:
CFG_ENABLE_DFS_PNO_CHNL_SCAN 	 CFG_PNO_SCAN_SUPPORT
CFG_PNO_SCAN_TIMER_REPEAT_VALUE	 CFG_PNO_SLOW_SCAN_MULTIPLIER
CFG_PNO_CHANNEL_PREDICTION	 CFG_TOP_K_NUM_OF_CHANNELS
CFG_STATIONARY_THRESHOLD	 CFG_CHANNEL_PREDICTION_FULL_SCAN_MS
CFG_ADAPTIVE_PNOSCAN_DWELL_MODE	 CFG_SCAN_BACKOFF_MULTIPLIER
CFG_MAWC_NLO_ENABLED	         CFG_MAWC_NLO_EXP_BACKOFF_RATIO
CFG_MAWC_NLO_INIT_SCAN_INTERVAL	 CFG_MAWC_NLO_MAX_SCAN_INTERVAL

Change-Id: I81bdbd917969fc8a73e6e5359ca69f78acdf723c
CRs-Fixed: 2357605
2019-01-23 15:14:34 -08:00
Abhishek Singh
0c1dedb899 qcacmn: Add support to acquire wake lock during user scan
Acquire wakelock to handle the case where APP's send
scan to connect. If suspend is received during scan, scan will be
aborted and APP will not get scan result and will not connect.
eg if PNO is implemented in framework.

Fix is to avoid the system suspend by taking the wake-lock
during scan. Added INI wake_lock_in_user_scan to control this.
The INI is disabled by default.

Change-Id: I62fdbbcbc6f049cb4e36e774d5a417600a2dfa86
CRs-Fixed: 2381622
2019-01-22 12:40:20 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
Min Liu
2fa0775090 qcacmn: Use vdev instead of pdev as parameter
For the case that there is leakage of vdev due to incorrect reference
count usage, and another vdev for the adapter is created, get ref of
vdev by mac address might get the incorrect vdev object since both vdevs
will have the same mac address and the leak one will be first matched
since it is created first.

To address this issue, use vdev pointer in adapter instead of pdev as
input parameter of related functions.

Change-Id: I855497358b5dabf3fc5c0f71a859dd7cae1b450a
CRs-Fixed: 2312155
2018-11-15 01:38:30 -08:00
Basamma Yakkanahalli
be68e7fa06 qcacmn: Add support to enable strict passive scan
Normally probe request is sent in a passive channel if the
beacon received from the AP. With the strict passive scan
feature, STA doesnot send the probe request even if it
receives beacon from AP.

This can be enabled by using below command.
iwpriv /cfg80211 wifix pas_scanen 1/0

Added a support to send strict passive scan flag to FW in
cfg80211 framework during scan start command.

Change-Id: Ia2c069872541dba64c3d11fc0b533c2d202ee898
CRs-Fixed: 2280181
2018-07-23 23:22:08 -07:00
Shashikala Prabhu
48ecda84bf qcacmn: Fix 4.9GHz cfg80211 issues
Send correct channel list to Firmware. When cfg80211 is enabled, STA
is scanning in a set of wrong channels. When scan callback happens
from cfg80211 module the cfg80211 module gives us the channel numbers.
There are some channel numbers which are same in both 5GHz and in
2.4Ghz bands. For example, channel number 1 maps to frequency 4942MHz
in 5GHz band, but in 2.4GHz band channel number 1 maps to frequency
2412MHz. So cfg80211 may give us a wrong channel number. Since we have
the exact frequency of the channel we should use that instead of the
one given by cfg80211.
The channel object given to the driver by cfg80211 during scan callback
is the same as the one registered to cfg80211 by the driver. So we can
use the channel frequency inside the channel object for scan which is
not changed by the cfg80211 module.

Use regdb function to convert channel number to frequency while receiving
scan entries from FW. Use pdev band (5/2.4GHz) information to map to
correct 2.4Ghz/5Ghz channel frequency.

Half/Quarter rate flags in the scan_ctrl_flags are not set. Set
Half/Quarter rate flags in scan_ctrl_flags.

Change-Id: I9df8f0e90938f86f6987574f8259a5cf66b672aa
CRs-Fixed: 2180273
2018-04-13 14:51:30 -07:00
Soumya Bhat
8b2a535e7a qcacmn: Extend cfg80211 scan cleanup API to support netdev level cleanup
In existing code scan queue cleanup is done during radio detach,
leading to access of freed vdev netdev.

Extend cfg80211 scan cleanup API to support netdev level cleanup.

Change-Id: Ice6b6d262788e71c6d229ed7de6ab0e17f270b6c
CRs-Fixed: 2185302
2018-03-05 04:28:19 -08:00
gaurank kathpalia
26f9833fb8 qcacmn: Send per chain rssi to upper layer
Add support to send the per chain rssi to upper layer
for each beacon and probe responses.

Change-Id: Ife6cb9e8e65591baf485c54a985f84d842400321
CRs-Fixed: 2177638
2018-02-27 01:57:52 -08:00
Jiachao Wu
a00b71b980 qcacmn: Use after free when clean up scan queue
When invoked wlan_cfg80211_cleanup_scan_queue, it will try to clean
up pending scan requests in queue from kernel. However, when the
netdevice is down, this request could be already freed by kernel.
To fix this issue, also add the pointer to netdevice in scan_req
so what we can check the status of netdevice in scan_req instead
of cfg80211_scan_request which might already be freed for this case.

Change-Id: I6189c52b638bc4f408e4d4c694c178c7d2f3de52
CRs-Fixed: 2164404
2018-01-14 21:27:44 -08:00
Yue Ma
04dfab5ac6 qcacmn: Add API to init scan runtime suspend lock
Commit fb9d5acfed and 645749571d introduce an API to deinit scan
runtime suspend lock in order to fix a memory leak issue. However,
it breaks SSR because scan lock init and deinit are not matching
during SSR which results double free happens in the rmmod after
SSR. Add the API to init scan runtime suspend lock so that it can
be added in the correct place during SSR.

Change-Id: Ied85b16b199fdbf43fef4c966bed56c9f7bb0e86
CRs-fixed: 2120661
2017-10-12 14:21:48 -07:00
yeshwanth sriram guntuka
074f5e91b8 qcacmn: Send default ies in scan request to fw
On framework initiated scan, ies are not sent in
scan request from upper layer and default scan ies are
not sent as part of scan request sent to firmware. This
results in not including oce ie in probe requests for
framework initated scans

Fix is to copy default ies to ie field in scan request
sent to firmware.

Change-Id: I895563bafc2a2b6e483d08cb28ee44ad34f5af70
CRs-Fixed: 2087124
2017-09-21 23:30:19 -07:00
Abhishek Singh
fb9d5acfed qcacmn: Add API to deint scan runtime suspend lock
Add API to deint scan runtime suspend lock, which can be called
before HIF is closed, to avoid crash while acessing HIF pointer.

Change-Id: Ida9269cdaea33a387e2acd1e3d9670d152b6016f
CRs-Fixed: 2065228
2017-06-22 06:35:01 -07:00
Sandeep Puligilla
15677ec859 qcacmn: Add protection to access scan queue
scan request queue is accessed in multiple
process contexts so added mutex to scan request
queue. Scan request mutex needs to be acquired
before accessing the scan request queue.

Change-Id: I3f0fe0513d5846f4eaf313848f00f86d29a66e35
CRs-Fixed: 2057127
2017-06-16 07:33:34 -07:00
Dustin Brown
f3351d97d7 qcacmn: Expose scan_backoff_multiplier for NLO/PNO
For Network Listen Offload and Perfered Network Offload, the fast scan
period is multiplied by scan_backoff_multiplier after max cycles have
occurred. Expose scan_backoff_multiplier to consumers of the WMI API,
so this parameter can be configured.

Change-Id: I478fb61cd096d3496205f4ff556e180dabf99b77
CRs-Fixed: 2035201
2017-06-09 21:36:26 -07:00
Abhishek Singh
9f6058d24d qcacmn: Add support for PMO suspend and resume scan API
Register PMO suspend and resume scan API. In suspend API, abort
all pending scans.

Change-Id: Iec03383a958f1bf93d77a86c351532270c7fdcb8
CRs-Fixed: 2038163
2017-05-19 13:51:42 -07:00
Abhishek Singh
ac80309005 qcacmn: Add runtime suspend logic for scan
Add runtime suspend logic for scan, to block runtime suspend when
scan is started and unblock when scan is completed.

Change-Id: I61c9afaf996d1ac97bfb5ffb0cd8a3abc971051e
CRs-Fixed: 2035675
2017-05-11 06:25:40 -07:00
Abhishek Singh
f95b9e4248 qcacmn: Add wait for cancel scan on pdev and vdev
Add cancel scan sync api which will wait for scan to be aborted on
pdev or vdev.

Change-Id: Ie02eb981154856cda38ef70f42fdfcf82bb88961
CRs-Fixed: 2038092
2017-05-11 02:13:25 -07:00
Om Prakash Tripathi
7d867d6729 qcacmn: cfg80211 scan change for WIN
Change-Id: I2d2863c7193de8e79c7ff76039f9b64ecaf90100
CRs-Fixed: 2001106
2017-04-28 03:43:53 -07:00
Sandeep Puligilla
ea68a2c6f2 qcacmn: Deinitialize the pdev scan private member
Added api to support the deinitialization of pdev scan
private member

Change-Id: Id887eab16f195fc5052f30900451625a586ed9fa
CRs-Fixed: 2033622
2017-04-14 15:06:52 -07:00
Abhishek Singh
8c6e82d763 qcacmn: Add PNO changes for converged scan
Adds PNO related changes for converged scan

Change-Id: Ia18e48645d511134698777b334348d68daf2dbee
CRs-Fixed: 1095299
2017-04-11 11:04:33 -07:00
Sandeep Puligilla
7acd31fa33 qcacmn: Add cfg80211 scan start and stop command
Add cfg80211 scan start and scan stop commands.

Change-Id: I20b6c7743496ae82cc3a93befb5b68812047ec1a
CRs-Fixed: 1095299
2017-03-02 16:11:46 +05:30
Abhishek Singh
9eb058adca qcacmn: Add changes to indicate beacon frame to cfg80211 layer
Add changes to indicate beacon frame to cfg80211 layer from scan
module.

Change-Id: Ia36e957bd2324130c8c3175569ce38267cd3cf53
CRs-Fixed: 1095299
2017-02-28 12:05:46 -08:00
Vivek
3e5a3ba077 qcacmn: Define os private structure in pdev object
-Define OS private memory structure and provide pointer
 to store the private data of each umac module's os specific data
-Initialize pdev's os private structure member 'wiphy'.
-Move vendor command definition to common project.

Change-Id: I2033bfbf0fe38e82c3a14942ac9f9bfda45e2c6c
CRs-Fixed: 2002991
2017-02-23 03:06:53 -08:00