Currently dual STA is not supported in WLAN IPA component,
where first STA interface info will be overridden by second
STA including iface_ctx and interface registration to IPA
driver.
When second STA is switched to SAP and a ref-client is
connected to SAP, IPA datapath will be enabled for Wifi
sharing feature. But wlan0 interface is not registered
to IPA driver and this will lead to packet drops for
STA on the RX IPA exception path. IPA driver relies
on information such as vdev_id wlan driver registered
to correctly set skb->cb[0] and wlan driver uses
skb->cb[0] to find the correct vdev to pass packets up
to stack. Since STA interface info is not in IPA,
vdev_id for RX exception packets are thus wrong.
Fix is to store multiple STA interfaces in iface_ctx
and all of them are registered to IPA driver.
Change-Id: I745618c22e24b6c56719f8ae5faf653f55b99bca
CRs-Fixed: 2573567
In function wlan_hdd_rx_rpm_mark_last_busy math division is performed
on unsingned 64bit integer. This leads to driver load failure on 32
bit machine targets. So avoid the math division for 64bit integer.
Change-Id: I967a0a64b421b47113821e1af5379cdd0125a34d
CRs-Fixed: 2576125
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.
Change-Id: Ib00135ca59b4c5f0f05edc93dca115bf17174a36
CRs-Fixed: 2561671
In the latest kernels asserts if there is any unitialized work
gets flushed, stop_bss work is presently getting flushed from
multiple places and it is initialized only when there is no
channel to start the sap.
Fix it by intializing the work when the adapter is created.
Change-Id: I232247c2389f865471c7c2175bb93e254b29fc29
CRs-Fixed: 2565974
When the chip is in power save mode, it fails to report valid
TSF in the WMI_VDEV_TSF_REPORT_EVENT_ID. Even the retry may fail.
Fix this by restarting the capture when the Tx/Rx resumes.
Change-Id: Ibd0aa9275583ba40e5f53a11910960351bb76e7d
Define debugfs node in driver to
export MIB counters to user app.
Define macro WLAN_FEATURE_MIB_STATS for this
feature that gets MIB statistics from fw.
Change-Id: Icae8826309094d17e8f6d4503f617a3a7116d3c9
CRs-Fixed: 2548241
There is a race condition while handling the below scenario,
1. NAN enable request is received from framework.
2. Policy mgr opportunistic timer expired and set hw mode
initiated to Single MAC mode in scheduler thread at
the same time
As the opportunistic timer handler doesn't have any info if
NAN enable initiated in DBS mode, it's configuring the hw
mode to Single Mac Mode just before NAN enable request is sent
to firmware. So the NAN enable request is sent to firmware in
Single Mac Mode which is not allowed by firmware.
NAN enable/disable is also similar to connection in progress
status in case of STA. So provide NAN enable/disable status
through hdd_is_connection_in_progress() to the opportunistic
timer handler. Opportunistic timer handler restarts the timer as
connection(NAN enable/disable) is in progress.
Also set hw_mode_change_in_progress before checking the
connection progress status. This is to avoid a possible race in
the below scenario,
1. NAN-enable sets the state but scheduler thread had read the
state just before that
2. NAN-enable read the hw_mode_change_in_progress just
before it gets set by scheduler thread.
Change-Id: I1a184c84520deb3f6ad1ec010a0fdefda96a5364
CRs-Fixed: 2566841
Remove logs in csr_nonscan_active_ll_peek_head to prevent
excessive logging while testing CVE-2017-0624
Change-Id: Ie5ab57d36fc05a3eac0d4fdba33a72b11eb7c561
CRs-Fixed: 2573914
In case set key is sent to firmware and Roaming updated the session
before set key resp is processed in LIM, the limPrevMlmState will
be 0 and thus updating limMlmState to limPrevMlmState will result
in improper limMlmState, leading to sync issue.
So do not update the limMlmState in invalid state in set key resp.
Also update limPrevMlmState to limMlmState during roaming.
Change-Id: I96291e7c3eb34df8b5741745448c76cf63b1f200
CRs-Fixed: 2574731
cfg80211_ap_stopped() not supported anymore for kernel 5.4.
changes added to protect call to cfg80211_ap_stopped under kernel
version compilation flag.This will allow the call to be invoked for
MSM kernels which have been patched, but not for any other kernels,
including the GKI kernels.
Change-Id: I05470469eb82da174e5b9c46f7d19fc77aaca85d
CRs-Fixed: 2558981
Peer assoc command send to firmware updates peer params in
firmware ex. peer_new_assoc, peer_associd, need_gtk_2_way etc.
If RSN capability flags are present in peer assoc request of SAP and
P2P-Go peers, host updates need_gtk_2_way, need_ptk_4_way peer assoc
params to firmware.
If need_gtk_2_way, need_ptk_4_way params are not updated for RSN capable
peers of SAP/P2P-Go, firmware is not able to hanlde data packets(HTT)
before the key installation(WMI) is successful.
Change-Id: I0a24aab3ac4ff4ca061782f6a4d0ba62dd227b04
CRs-Fixed: 2575133
Host configures number of TIDs supported by in WMI_RESOURCE_CONFIG
command.
Firmware supports 8 TIDs per peer, with the existing formula to
calculate num_tids_supported i.e. 2 * (no_of_peers_supported is 32 +
num_vdevs is 4 + 2) firmware can allocate max 76 TIDs. As 76 TIDs are
not enough to serve 32 peers, as a new peer requests to allocate TID
after 76th TID, firmware crash is observed.
example as, SAP is running in DUT and 7 clients are conneted, connect
DUT STA to AP. Here total number of peers are 10 and required TIDs 80
i.e number of peers(10) * TIDs per peer(8) = 80, which exceeds limit of
76 number of TIDs configured at the initialization.
Hence, Host enlages the number of TIDs supported for Low Latency targets
i.e. USB or SDIO based solutions. Host calculates max number of TIDs
supported as follows,
num_tids_supported = (8 * no_of_peers_supported + num_vdevs + 2)
Change-Id: I024e03e4ac46f8118da544889de3ffd7cc67a1b4
CRs-Fixed: 2573130
1) Change the following functions to make them use channel
frequencies intead of channel IDs:
csr_process_roam_sync_callback
csr_save_to_channel_power2_g_5_g
csr_save_tx_power_to_cfg
2) Remove some local variable and code within function
csr_save_tx_power_to_cfg as they're not used.
3) Retain the code for channel ID utilization within
csr_get_channel_power_info as they're used to
indicate diag info to upper layer apps.
Change-Id: Ib294fd04f770c008afaa0049fb1951aa912caf34
CRs-Fixed: 2573403
In the 5.4 Linux kernel, the ndo_select_queue function signature has
changed. Add support for it under the kernel version compilation flag.
Change-Id: I7298f27ada14c0d96c19f5168a20971ad760fd77
CRs-Fixed: 2558984
At present policy_mgr_check_concurrent_intf_and_restart_sap
will allocate memory for sta_ap_intf_check_work_info for each
work scheduling of sta_ap_intf_check_work. Potential race condition
would be the pm_ctx->sta_ap_intf_check_work_info is overwritten
in other thread context which is calling same function.
It is not necessary to maintain the memory
sta_ap_intf_check_work_info dynamically since only one work
sta_ap_intf_check_work is expected to run at same time.
Move the sta_ap_intf_check_work_info memory allocation to
psoc open handler and free it when psoc close.
Change-Id: I29b2f2528a6d537cb853968153340a75fd5fe88b
CRs-Fixed: 2571624
For the vendor command QCA_NL80211_VENDOR_SUBCMD_SET_SAP_CONFIG,
if invalid channel is specified, wlan driver return success.
It should return error for such case.
Change-Id: Ic5dbfaf04a41ee75b97ecba52a577e9ebf78dc05
CRs-Fixed: 2573244
The current function doesn't handle "hw_mode" parameter.
And if band is specified the function needs to find the
correct "phy cap" in mac_phy_cap list.
The "supported_bands" can be a bit mask of
(WLAN_2G_CAPABILITY | WLAN_5G_CAPABILITY), use "&" to find
the phy cap of requested band.
Remove unused API wma_get_phyid_for_given_band.
Change-Id: I4b120d681b820e2a6e2b82f33d67fbcf6136af09
CRs-Fixed: 2571400
While pesession is created, the vdev id and opmode is not
logged. Thus it become difficult to check for which vdev the
session is created.
Add logs to print vdev id and opmode while creating pesession.
Change-Id: Ie550630c96342a812994fa6cb00b30427d3f5e93
CRs-Fixed: 2573242
When the chip is power save mode it misses the gpio strobe
from the host platform. The TSF is not latched is not latched
in this case. As a result the reported TSF in the
WMI_VDEV_TSF_REPORT_EVENTID is not correct.
Fix this by adding a retry mechnism when the reported TSF is not proper.
Change-Id: Ica2d5c796e9d021b65e898ee3defe88d62183911
Validate the HE mcs map in assoc response frame while sending it
in peer assoc command to FW. If the valid MCS is not found in assoc
response frame then populate HE mcs map from beacon HE caps as the
session Nss is derived from beacon capabilities.
Change-Id: Icea452bc23b86f8a45f6096ffcacbc6f8545aab5
CRs-Fixed: 2566959
There are two path in code to deauth a associated STA in SAP mode:
1. Deauth issued from user space
2. Deauth issued from peer
Rectified the check for ongoing deauth before queuing for another.
Change-Id: Ib3f45968c770b1df25c77aed9fd1e3bc8edd6e72
CRs-Fixed: 2567087
SAE key derivation requires use of a secret element, PWE. This
element is deterministically discovered by repeatedly hashing
the password with some additional information until the
resulting hash is the abscissa of a point on the elliptic curve
(for ECC) or by exponentiating the hash digest to a constant to
produce an element (for FFC). This "hunting-and-pecking" loop
method is prone to side channel attacks.
To avoid this, a direct hashing to element technique in SAE is
introduced in IEEE P802.11-REVmd/D3.0. Support new RSNX IEEE
as part of the hash to element PWE derivation. The user space
sends the RSNX IE in the connect request.
Add support to save RSNXE from connect request and pack this IE
over SAE assoc request. Also send the IE in assoc IEs in RSO
commands.
Change-Id: I8eb756840400753794b1b80befe3a20f7d7c7705
CRs-Fixed: 2569596