qcacld-2.0 to qcacld-3.0 propagation
Add iwpriv interface to get channel width when working in sap mode.
Change-Id: I9900655861032636af1b4147ec6322e5aa76e614
CRs-Fixed: 1009861
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in sap/src.
Change-Id: I92193d6209c5e62468197a1aae8a4187f60b0891
CRs-Fixed: 1075555
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in sap/dfs.
Change-Id: I05b091f33d94a0219d4113d49c392828ed4350b8
CRs-Fixed: 1075555
qcacld-2.0 to qcacld-3.0 propagation
Currently driver populates default supported and extended supported
rates in beacons even if hostapd.conf file wants to change
supported and extended supported rates.
Fix this by parsing beacon head and tail to get supported
and extended rates and populate them in sap config.
If Driver force acs is enabled, driver acs will get priority.
In case of driver based acs, driver should
ignore basic and extended rates from hostapd.conf and should
populate default rates.
Change-Id: I3226438b908a96f1b1bd3c2968a0c20eef81a799
CRs-Fixed: 1035768
qcacld-2.0 to qcacld-3.0 propagation
Add support for vendor command which informs the driver about the
ACS policy.
QCA_NL80211_VENDOR_SUBCMD_ACS_POLICY is used to inform driver about
ACS policies.
QCA_WLAN_VENDOR_ATTR_ACS_DFS_MODE attribute tells if DFS channel
should be enabled or disabled in ACS.
QCA_WLAN_VENDOR_ATTR_ACS_CHANNEL attribute provides channel number to SAP
module to skip ACS and use this channel as operating channel.
Change-Id: I1ba69ed8fdf1c56a90e857054c725b830293d6bf
CRs-Fixed: 997433
qcacld-2.0 to qcacld-3.0 propagation.
Currently, SAP start's on 2.4ghz channels on detecting unsafe
channels even though operating band ACS hw mode is configured
on 5ghz channels.
Fix is to start BSS on band based on ACS hw mode
Change-Id: I210937b4b464c408d5a22c348c028fa9a11b2142
CRs-Fixed: 1005327
qcacld-2.0 to qcacld-3.0 propagation
At the time of driver load, sap session is opened as part of
hdd_init_ap_mode but in case of sap restart, sme_open_session
is called from sapFsm.
At the time of opening session, sme_open_session register
wlansap_roam_callback callback for connection status.
If this callback is not registered, HDD will not get connection
status and HDD will start cleanup after SAP connection timeout which
will result in SAP failure.
Need to register wlansap_roam_callback as part of sme_open_session
when session is not created as part of hdd_init_ap_mode.
Change-Id: Ifd2cec5fec432f1dcd2b39c59df1f1c5b13c55d5
CRs-Fixed: 1051097
qcacld-2.0 to qcacld-3.0 propagation
use the same reason code in the disassoc, which the upper
layer has passed to the driver
Change-Id: I6302a5c8318a8e3c1221b9272637455da4e7f150
CRs-Fixed: 852387
In sap_random_channel_sel function, new channel and channel width will
be calculated based on the available channels. New channel width is
populated to only new_chanWidth and this new channel width value will be
assigned to new_ch_params in wlansap_set_channel_change_with_csa.
This channel width from new_ch_params will be used as new channel width
on restarting SAP on Radar detection.
wlansap_set_channel_change_with_csa will get called only when radar is
detected when SAP started beaconing (after CAC wait).
If radar is detected during CAC_WAIT state, new_ch_params will not be
having new calculated channel width, it will be having zero, So during
this scenario SAP will be restarted with 20MHz bandwidth.
To fix this, populate new channel width to new_ch_params in
sap_random_channel_sel along with new_chanWidth.
Change-Id: If07f875dda3a4f6d29480c84b784ca7995c19c7f
CRs-Fixed: 1063038
(cherry picked from commit 714eb0a7fae9c4e50b1c52fa27001705991ab6eb)
qcacld-2.0 to qcacld-3.0 propagation
We do not support SAP on DSRC channels, so skip the DRSC channels
during sap channel initialization.
CRs-Fixed: 1050454
Change-Id: If5544027bca7bc0a578978dfe91adc37e897e992
(cherry picked from commit 0005bfa2adcbe4bc06b96523bb387a7df902a6c7)
(cherry picked from commit b8f62655ae5a86b745ca099fa371914a702abf59)
qcacld-2.0 to qcacld-3.0 propagation
During P2P functionality, Host will send GO NEG REQ and
receives ACK completion from firmware which will be queued
to indicate HDD. Meanwhile if host receives GO-NEG RESP it
will be sent directly to HDD via function callback. In HDD as
we got GO NEG RESP before ACK completion for GO-NEG REQ, HDD
will generate pkt completion for GO NEG Request.
Now GO NEG CONFORMATION frame will be sent and driver will be
expecting completion for this. The GO NEG REQ ACK completion
which got buffered in PE will be delivered to Supplicant and
Supplicant assumes that this is the ACK for GO NEG CONF frame.
This causes early termination of remain on channel due to which
firmware may drop the GO NEG CONF frame and may not retry as ROC
is terminated.
Fix this by making ACK Completion indication to HDD via function
callback.
Git-commit: 32ddf4196f423b8eaea7ec6c0816e2961aa7fc45
Change-Id: I0dd3acb236b270839649d2becfdc007e7aae9fdd
CRs-Fixed: 1012547
(cherry picked from commit a3996d421de7f55d5a6f7da19d7ff4b568ce7c50)
(cherry picked from commit 42405db3bd3f4b10800cde8cdcd14f521461a5a7)
qcacld-2.0 to qcacld-3.0 propagation
In function "sap_select_channel" avoid selecting DFS channel if
DFS master mode is disabled.
Change-Id: I4b45401500db32f0677e5364e4cf415dca2ca23c
CRs-Fixed: 939153
(cherry picked from commit 0a1ecad5876e7526a9283cba331e22453e03490e)
Check for active STA and SAP connections before switching the operating
channel of SAP to a DFS channel. SAP moves to a DFS channel only if
this movement ensures that the SAP does not go off the DFS channel which
is needed for continuous radar detection.
The existing check looks for the number of open sessions. But these
sessions may or may not be active. So, replace this check with suitable
APIs which will check for active sessions.
Change-Id: Ib37427a9c62a785abb5e22c14ec23f09e60bf4b7
CRs-Fixed: 1063212
(cherry picked from commit d470e33f6d390b84dd98892a1b4526fd45348c2b)
NULL check is not required before freeing the memory allocated to
dfs_radartable.
Add the changes to remove unnecessary NULL checks.
Change-Id: I063c036024e6bfc235a418056d15843646bc5a3c
CRs-Fixed: 1063843
qcacld-2.0 to qcacld-3.0 propagation
As per the current logic during start bss failure scenario
SAP/GO session is not closed resulting in vdev leakage.
Due to above leakage new interface creation with same MAC
address results in target assert.
Make change to cleanup SAP/GO session on start bss failure.
Change-Id: I785b4486f439646e2119adc87895ed95c6b80de6
CRs-Fixed: 954601
qcacld-2.0 to qcacld-3.0 propagation
Currently there are many logs which adds new line
explicitly. As part of logging enhancement, remove
such extra space lines.
Change-Id: Idee9ff6a2e0452991f7d50a986c26f36303defd1
CRs-Fixed: 974415
qcacld-2.0 to qcacld-3.0 propagation
In some case when complete preferred channel list is unsafe,
SAP won't be able to pick any channel as operating channel.
This will lead to SAP start failure.
Fix this issue by making first channel from preferred channel
list as operating channel.
Change-Id: Id2bd177b15bd7089250a49019a9c751a691dac01
CRs-Fixed: 1026420
qcacld-2.0 to qcacld-3.0 propagation
Memory allocated for dfs filters in dfs_attach() API
does not get freed in failure case.
Add changes to fix memory leak issue.
Change-Id: Icdd4a382685471c0d3cf8115cec30fcb307eedfb
CRs-Fixed: 1038603
In sap_acs_channel_check fix ‘if’ condition will be always true for any
given channel, this will fail to validate if the given channel is in ACS
channel range.
Fix the if condition check from logical OR to AND to validate given channel
is within the ACS start and end channel range.
Change-Id: I1d69c9d440e641b052fd6098d1c99f22a64e9a9d
CRs-Fixed: 1056036
KR and CN have different DFS regions than what kernel provides.
Assign the correct DFS regions for KR and CN. Also use "enum
dfs_region" as the parameter type in functions that have
dfs region as parameter.
CRs-Fixed: 1047214
Change-Id: I2ddd67d3c29a448dd2a1d3a63113750783fb6731
Add support for pre CAC on SAP for the user requested channel.
The reason for the requirement is to have SAP operations without
interruptions due to CAC. After starting SAP on the 2.4GHz
channel, the driver will start a pre CAC on the 5GHz DFS channel
requested. If no radar is detected, SAP is expected to switch
from the 2.4GHz channel to the DFS channel mentioned in the pre
CAC request. If radar is detected SAP will continue to operate on
the 2.4GHz channel. To provide the pre CAC channel to the driver,
vendor commands/attributes are used .
Change-Id: I4cf4bb5a861eea05f37fafb3bf35d327f5377aab
CRs-Fixed: 1045242
RSSI_COMB is not reliable indicator of RSSI for extension80
when operating in 80p80 non-contiguous mode due to existing
hardware bug.
Add workaround in software to use pulse_rssi instead of RSSI_COMB.
Change-Id: I89c829ecefca2dcc75bb494943c98bdb77470de6
CRs-Fixed: 1043760
gPolicyManagerEnable INI item is no longer needed. Remove this
INI item and make policy manager code enabled by default.
Change-Id: I57822f47325c03e940b2802fb02900c64d3587e1
CRs-Fixed: 1034888
This is qcacld-2.0 to qcacld-3.0 propagation.
Destroy sap_dfs_cac_timer at callback function based on check if timer
is still valid.
Change-Id: Ib8b92ac11444b63a0d8002edff35cd9238bb2573
CRs-Fixed: 967907
Ensure that the SAP operations make use of the mandatory
channel list during SAP channel selection with INI option
'gWlanMccToSccSwitchMode' set to the value of '4' which
will make use of this channel list while trying to avoid
MCC scenarios.
Change-Id: Ia43ee1d2c598c81a5ef0add9246c400577f6f694
CRs-Fixed: 1014128
Ensure that the SAP context is sanitized before extracting
the global handle. The context passed in the callback could
be freed by the time it is accessed.
Change-Id: I4a08717abce2a0ecbe4055360fd8d31c3e50a701
CRs-Fixed: 1031855
Ensure that the SAP context is validated before access in
its callback. The global SAP context is now an array of
contexts rather than a single global context to help
validate the session. Increasing the SAP open session
timeout helps to configure all the commands to the FW and
helps to further avoid any crashes.
Change-Id: I6f722dcc4ab671fef010c816a7c7d38fc1bdebe4
CRs-Fixed: 1031855
All the regulatory and channel management functionality
moved to CDS.
Cleanup the SME redundant functionality related to channel
parameters generation and update all the code references
to CDF API's
Change-Id: Iaf4e15b4ebb7107d8bbf7a54e42f9ea9358dcdaf
CRs-Fixed: 994562
Add NULL check for pointer qdf_ctx as it returned from call to
function 'cds_get_context' may be NULL and could be dereferenced.
Change-Id: Iea44cd1a2d20ee04d1720c4e8af1065320a589fd
CRs-Fixed: 1024778
Correct the channel parameters that are calculated and used to indicate
the channel switch notification sent to user space. The channel bonding
values should not be used to get the channel width information since
they can be used only in STA mode to enable or disable the channel
bonding. Fix the same by getting the updated channel switch information
from the session entries.
Change-Id: Ia51779cddb2b9c3108b211822f104c45f88e53fd
CRs-Fixed: 1021380
Ensure that the channel list used for ACS channel selection
is sorted for all the possible channel width cases. In the
current implementation, channel list sorting is not done for
channels widths 80, 80+80 and 160MHz. Along with this the
ACS channel range is getting set before the 11ac override,
leading to incorrect hardware mode. Fix the same by setting
the ACS range after 11ac override and ensure that channel
list is sorted in all the valid channel width cases.
Change-Id: Ic773b3a4b1c049bc2053c1d0d17dd047d7a88324
CRs-Fixed: 1022304
In STA+SAP concurrency case the SAP channel is changed to due
to concurrency operation. Since the new channel params are not
updated in sap context, the old channel params are sent to WMA,
hence the PHY MODE is passed as UNKNOWN to FW.
Set the channel params when the SAP operating channel is changed
due to concurrent operation.
Change-Id: I8ac503a1b8993401b6fbdc247872539b72901564
CRs-Fixed: 1014368
Fix the segmentID propagation from radar summary report to phyerror
event structure to correctly identify the segment, on which a phyerror
is received for pattern match processing. Also, to enhance the debug,
add all the radar summary parameters to dfs event and print while
processing the phyerror for a pattern match.
Change-Id: I1325ad541cf69685606e4905275244e207d95b29
CRs-Fixed: 1009784
Modify the set hardware mode command sequence during channel switch
in the case of SAP/P2P-GO and STA/P2P-CLI as per the latest FW
requirements. This is primarily to accommodate the time take for
calibration during hardware mode change which could lead to
momentary data stalls.
The new sequence is as follows:
1. Send (E)CSA
2. Do vdev restart/vdev up
3. For DBS downgrade:
a. PM will initiate HW mode change to DBS right away
4. For single MAC upgrade:
a. Opportunistic timer is started, PM will check if MCC
upgrade can be done on timer expiry
The old sequence is as follows:
For MCC upgrade:
1. Send (E)CSA
2. Opportunistic timer is started
3. vdev restart is initiated on the new channel
4. PM will check if MCC upgrade can be done on timer expiry
For single mac upgrade:
1. Send (E)CSA
2. PM will initiate HW mode change to DBS right away
3. vdev restart is initiated on the new channel
Change-Id: I4bce2ee176cae43b6a46c47216ed7ab47a82a54c
CRs-Fixed: 1006992
Replace the obsolete WMI command WMI_SOC_SET_PCL_CMDID with
WMI_PDEV_SET_PCL_CMDID. WMI_PDEV_SET_PCL_CMDID carries the weightage
for all the channels (preferred and non-preferred) in the same order
and length as that of the command WMI_SCAN_CHAN_LIST_CMDID. This is
in contrast to the command WMI_SOC_SET_PCL_CMDID which carries only
the preferred channel list.
Change-Id: I040f4307491d3242d2e9409dbbe8005c4b307bf5
CRs-Fixed: 989502
Use the pcl channel list to do random channel selection when the
radar is detected.
Change-Id: I286bf447a398bf1d9a7a1493ac4bbfd9847de148
CRs-Fixed: 988325
Currently channel width has different enum values in
different modules. Move the channel width enum definition
to CDS to maintain single channel width enum value in
the driver
Change-Id: I6a46d0c02546263080a15a3ec7c52486fc51e98e
CRs-Fixed: 983914
Add kernel documentation for regdomain data structures. Also
rename some of the data structures to better names.
Change-Id: Iae26079ae8a7f06e2670594694ae36c2c2a0a524
CRs-Fixed: 961806
Data structures defined in cds_regdomain_common.h are similar
to those defined in cds_regdomain.h. Therefore remove the file.
Change-Id: I929b03058e9441e4a652314789cf91dbd94d0329
CRs-Fixed: 961806