In api wlan_add_age_ie(), age ie is included in scan
result.
Remove api wlan_add_age_ie() as the bss age is
calculated using NL80211_BSS_SEEN_MS_AGO.
Change-Id: Ided2364ce7a52d942d29343455fc7ae511be9a18
CRs-Fixed: 3391276
The kernel-doc script identified some documentation issues in the
os_if folder, so fix most of them. However do not modify the file
qca_vendor.h since most of the issues there are present upstream, and
the downstream file should match the upstream file.
Change-Id: I71948fb497c1ea2d1dd46308277d99beefde18b8
CRs-Fixed: 3390428
To protect user privacy, print SSID with QDF_SSID_FMT
and QDF_SSID_REF, then SSID will be hide in logs if
anonymization is enabled.
Change-Id: Ifad0ccd76bd1184a9b1d20f3d7fa4455df924843
CRs-Fixed: 3291826
Send only the scan entry for Tx profile to upper layer. As in cfg80211,
it goes through every nontx profile to from a new frame.
Change-Id: I4f01a1a5ed61bfd2a2b8a541c8d3be14ffa2e3c9
CRs-Fixed: 3251364
If there are more than 1 preferred network list in schedule scan, after
6 GHz channels added to pno channel list of 1st network list, channel
num is updated and set for 2nd network list wrongly, then OOB happens when
6 GHz channels are added to 2nd network list.
Change-Id: I2658620ce4e6e8dcf93e810c7bc10364e4de7a73
CRs-Fixed: 3280705
When the SSR and interface down happen in parallel,
the driver rejects the interface down since the
recovery is in progress. Kernel ignores the -EAGAIN
request from the driver and as part of NET_DOWN notification
in cfg80211_netdown_notifer the kernel invokes the
___cfg80211_scan_done to free the request but doesn't not send
scan_result indication, since it expects the scan_done work to
get scheduled and then broadcast the request to upperlayer.
The scan done checks currently only if the interface is up replace
it with driver specific internal driver state.
Change-Id: I0e5ac319783b9c1a69e7e19674f76f20da1d1590
CRs-Fixed: 3202812
Currently 6 GHz channel flags are not set for channels
present in the list from PNO scan request but are set for
all other 6 GHz channels which are added when either of the
two below conditions are satisfied
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in PNO scan request.
2. At least one 6 GHz channel is present in the PNO scan req.
Add flags for channels in the PNO scan request based on the
scan_mode_6g ini configured similar to active scan request.
Add changes to remove the RNR flag for the channel if the
corresponding short SSID entry is present in the RNR db
Cache since if colocated SSID is different userspace doesn't
include corresponding 2.4/5 GHz channel information in PNO
request.
Change-Id: I22c4f7ecf65d4ab09dfbbe126aefe02f9145de42
CRs-Fixed: 3119113
First host checks below two things in PNO scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in pno scan request.
2. At least one 6G channel is present in the pno scan req.
If any of above conditions satisfy, Host fills all remaining
(other than channel(s) present in pno scan req) valid 6 GHz
channel(s) to pno scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).
Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for pno scan
to firmware.
By this driver allows Firmware to scan 6G channels based on
RNR IEs only (for colocated APs reported by 2.4/5 GHz APs).
Change-Id: Ib6118c4525e9fbe233eb6a7e07a4a3345d486e8a
CRs-Fixed: 3103923
Currently driver just cancels the scan request and does not free
scan request memory if netdev is NULL or get vdev ref fails,
which leads to memleak.
To address abobve issue, free the scan request if netdev is NULL
or if get vdev ref fails.
Change-Id: Id6605e76a8c0977df93428f2aeb73c0bdfb84685
CRs-Fixed: 3107784
First host checks below two things in host scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in host scan request.
2. At least one 6G channel is present in the host scan req.
If any of the above conditions satisfies, Host fills all
remaining (other than channel(s) present in host scan req)
valid 6 GHz channel(s) to scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).
Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for host scan
to firmware.
With this change, driver allows Firmware to scan 6G channels
based on RNR IEs only (for colocated APs reported by 2.4/5
GHz APs).
Change-Id: I2d9d2aac58bbc521b2476756d5919647bdc265cc
CRs-Fixed: 3103873
Add LOW_SPAN_ACTIVE_DWELL_TIME and LOW_SPAN_PASSIVE_DWELL_TIME
macro support to keep all 2.4g/5g active/passive dwell time
same for low span scan mode.
Disable adaptive dwell to firmware so that firmware cannot
modify dwell time.
Change-Id: Iff05dd7b37a40226c61b28a1e59ea8aa8c57cb52
CRs-Fixed: 3076163
Add the attribute QCA_WLAN_VENDOR_ATTR_SCAN_PRIORITY to configure the
priority of vendor scan relative to other scan requests.
Add the valid values that this attribute can take.
Also, add an API to convert NL80211-based scan priority value to internal
scan priority value.
Change-Id: I6c62166c2dd6ea0880b332496b1e4bb0b41840c6
CRs-Fixed: 3044332
User configuration support to use scan request BSSID value
in Probe Request frame RA during the scan.
Change-Id: I40d07e4c3e4814a9c816b3e426dcbb63df7ddf27
CRs-Fixed: 2945679
The log output will be too verbose when the following scenario
is hit:
1) hostapd is started on chan 149 with cc=US
2) ref-sta connects to sap
3) ping -i 0.01 to ref-sta from dut
4) set cc=JP on dut
and the verbose log output will result in a wlan scheduler
watchdog bite on some platforms.
Use rate limited versions of log outputting api to avoid the
instabilities brought by this.
Change-Id: Id87d81070334aab145bae6909857fd5d2851008a
CRs-Fixed: 2868738
Add 4.9 ghz frequency check also in scan command. This change
is needed so that scan entry is formed and association happens in 4.9ghz.
Change-Id: I2fbf719ea6a5e747e07a5973a2da3d2ca2d11b7b
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
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
Use safe API - wlan_objmgr_iterate_obj_list to enumerate
vdev. It will check vdev in "create" state by
wlan_objmgr_vdev_try_get_ref.
Change-Id: I650801c07846e22f1863925ed4316c0a24bd9cae
CRs-Fixed: 2849177
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
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
Currently, list empty checks for scan_req_q is done outside the lock.
This is causing synchronization issue during scan and SSR/vdev delete
in parallel.
To avoid this, check for scan_req_q empty inside the lock.
This change also updates the return type of
wlan_schedule_scan_start_request to QDF_STATUS, which is expected by
caller API.
Change-Id: I8b6febdd98af7856fb047b1c9d852e4944a137b5
CRs-Fixed: 2763173
The mac address is tried to be logged from a NULL
bss data pointer, which leads to unwanted behavior.
Remove the logging of mac address from the NULL
bss data pointer.
Change-Id: I83a9e8b1dac0bd4983bf074863987d39187f9db9
CRs-Fixed: 2761731
Currently, vendor scan request is enqueued in the scan queue first and
then posted into the scheduler queue. Now if there is an SSR in between,
then scan request will be freed twice. Once in SSR context and again
in the caller context because scan scheduling fails due to user disabled
the scan.
To resolve this, post the scan request in scheduler queue first. Once
scan request scheduling is success, then enqueue the scan request in
scan queue. This approach can lead to a race condition like after
scheduling scan request, host may get scan response from firmware even
before the scan request is queued. To avoid this race, scan request
scheduling and enqueue should be protected by scan_req_q_lock.
Change-Id: Ic26da0181fb9a902a8a4abb8f68d9fc668f1b3f2
CRs-Fixed: 2714495
The roam sequence in LFR-3.0 is roam scan start notification
from firmware followed by roam start indication and then
roam synch,roam synch frame events. Roam start is sent
after candidate selection and host driver will disable
queues when roam start is received.
But for emergency roam trigger, firmware sends roam start
indication directly without notifying roam scan start to disable
data path queues immediately after deauth received from the AP.
So roam start is received before roam scan is started at firmware
and before candidate selection is done.
After roam start notification, host sends scan abort for all scan
on vdev by setting scan command request type to
WMI_SCN_STOP_VAP_ALL. This results in roam scan getting aborted at
firmare in emergency deauth roaming case and roaming fails.
Introduce new vdev id value based on which the scan module will
abort only host triggered scans setting the flag
WMI_SCN_STOP_HOST_VAP_ALL in the scan request.
Change-Id: I3a162c55d4a008ff986fd957bed395b39c060bb5
CRs-Fixed: 2636410
Enhance logs for PNO scan to remove duplicate
or unwanted prints and keep only useful logs to debug.
Change-Id: Ibe24714e925a00933911c801685528849e160480
CRs-Fixed: 2636641
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
During scan request from framework wlan_cfg80211_scan gets
invoked. If the cfg80211_scan_request parameter has number
of ssids set to zero then driver will set the scan mode to
passive mode. This will result in fw doing passive scan
instead of active scan. Probe request will not be sent to
discover the peer. This will sometimes result in failure
to discover P2P GO peer.
Set the scan mode to active mode in scan request message to FW.
Change-Id: Ic28757cb69ec62e554ac8baccce17cac504a0bef
CRs-Fixed: 2606614
Add active and passive scan dwell time parameters to cfg80211 scan
request API.
Change-Id: I39f479d7b941e4671f1ad4495ab48031153dd5e7
CRs-Fixed: 2598504
Replace channel ID with channel frequency in
wlan_cfg80211_is_chan_ok_for_dnbs.
Change-Id: I0e275da65258f87abfc36d6c9148f9f4437a4389
CRs-Fixed: 2552022
Due to channel number ambiguity with introduction of 6Ghz operation
policy manager APIs are updated to use frequency values instead
of channel number. Update corresponding caller functions to
adapt for frequency usage.
Change-Id: Icc882d28d73d55fce5abaedbdff5f90bec095b61
CRs-fixed: 2550069
As a part of 802.11ax amendment, 6GHz band operation is added.
Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.
As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.
Change-Id: I33e31fa124cedfab31dd1827721a420ad6cdba07
CRs-Fixed: 2519512
Currently in the scan path frequencies received
in the scan request are getting converted to channel
number and again converted to frequncies.
For 6GHz support in the scan path do not convert
frequency to channel number, instead use frequncies
received in scan request to send the scan command to
FW, remove the dummy conversion from chan to freq and
freq to chan.
Change-Id: Ieab7dded0678fac54796bba3b1b210c910f6173e
CRs-fixed: 2534897
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
Currently the drivers blocks every simultaneous scan
that comes to the driver, and returns BUSY.
here if the STA SCAN which is low priority after connection
comes, and at the same time ACS has completed and the hostapd
tries to do a HT scan, it would get error as BUSY, and it
will try to scan again and again until successful or the timeout
happens. This will in turn delay the hotspot bringup as start
ap does not come until the hostapd does a OBSS scan.
Fix is to skip the check of simultaneous scan for SAP, and make
the priority of scan request high for SAP scan.
Change-Id: I163dbb2fdca1245742cca049de47478117197412
CRs-Fixed: 2471897
The current OSIF logging macros use a "cfg80211" prefix. This is
confusing because that prefix should only be used by the Linux
cfg80211 module. To avoid confusion rename the macros to use an
"osif" prefix.
Change-Id: Id3273498f623d04beec879aa9d77c1d33986357a
CRs-Fixed: 2469485
Currently dwell time is determined by scan policy flags from kernel.
Sometimes when we suspect the scan result is not full enough, we need
to set dwell time by force through ini.
Add ini to decide whether to honour NL80211 scan policy flags, so that
we can disable dwell time changed by scan policy flag from kernel.
Change-Id: Ia0b9f957a7de901513479522e008e4bcbd6b2c0e
CRs-Fixed: 2428630
For enhanced repeater independent mode scan request
from wpa_supplicant needs to be set in high priority scan.
Change-Id: I4f95d0e7b2f1d9eb68ed14efd4ee3932ced5af61
CRs-Fixed: 2432916
Currently in the case of concurrent sessions running,
the driver updates the active dwell time for the scan
request to the default value, overwriting the already
filled active dwell time which the DUT got from the
AP as part of RRM request, which results in violation
of protocol.
Fix is to not update the concurrency params if the scan
request is of type RRM.
Change-Id: Ifbb4b45fc111851f544fd39187e4113bda5f7348
CRs-Fixed: 2436893
Currently, the vdev connection status is checked by getting
the bss peer of that vdev, and if the bss peer is in associated
state then vdev connected status is sent as true. It can happen
vdev is present and bss peer is deleted after getting the bss peer
from vdev pointer. Then bss peer can not be dereferenced to get the
its status.
Instead remove all the duplicate api's tdls_is_vdev_connected,
pmo_core_is_vdev_connected, and wlan_vdev_is_connected with
wlan_vdev_is_up. wlan_vdev_is_up gives success status
if associated.
Change-Id: I863c3c0689f329870bd08c813813c16956135209
CRs-Fixed: 2426092
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within os_if replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: I1cf6f897d1d2722d112dd3f802d789652373eaed
CRs-Fixed: 2418254