Function sapconvert_to_csr_profile is allocating memory for
pRSNReqIE without checking if it is already populated. This
will leak memory if this function is getting called for sap
restart. Fix this by first freeing memory if already allocated.
Change-Id: I562b1dabb330057b4f1b934b0edad692330aab70
CRs-Fixed: 2046608
A new external acs configuration parameter acs_policy.
This parameter indicates the external ACS module whether
its mandatory or preferrable to select a channel
from the preferred channel list provided by the
driver
Change-Id: I80925109349c68c95f25ba27d87bd68964c4eb04
CRs-Fixed: 2037034
Present wlansap_close API walks out without releasing the sapctx when
hal context is null which creates the memory leak.
Release sapctx in all cases when caller requests to close the
sap session.
CRs-Fixed: 2040045
Change-Id: I3c8f0a33c11de9d88d6b29f726f36a838f2428d2
P2P-GO whenever goes offchannel, issues NOA. With this behavior, we
have issue whenever legacy STA connects to P2P-GO as legacy STA
does not understand NOA. To handle this case, changes are done in HDD
and SAP component and the revised behavior will be:
1. By default no change in NOA.
2. Whenever first legacy STA connects to GO, SAP informs HDD with
new parameter station type. HDD will communicate the same to
p2p protocol component. Once the connected station is authorized
p2p protocol component will disable NOA (i.e. P2P-GO will start
issuing Self-CTS whenever it goes off-channel).
3. Whenever last legacy STA disconnects from GO, p2p protocol
component enables NOA (i.e. P2P-GO will start issuing NOA whenever
it goes off-channel).
Change-Id: Iadab47c9a2aeb434371d4c262623d7196f3b1ab4
CRs-Fixed: 2035609
center frequency of 40/80/160 are not valid frequency
for regulatory component, so regulatory api's may not
covert freq to channel or chan to freq. use dfs api’s
to covert the same.
Change-Id: I3bb7d4997d0dbcbd757537fe3fee9ad5f7f97904
CRs-Fixed: 2017481
Replace the legacy regulatory apis with regulatory component
public service apis
Change-Id: Ifd8c93fc8f57116cfc432b853248b35fd7ed1b94
CRs-Fixed: 2008013
There are few instances in current driver code, where SAP's
session is getting opened or closed internally by SAP module
which is wrong. It should come from HDD module.
Resolve above mentioned issue by following:
1) allocating and opening sap session through wlansap_open and
wlansap_start APIs respectively.
2) freeing and closing sap session through wlansap_close and
wlansap_stop APIs respectively.
Remove all other instances of sap_open_session and
sap_close_session.
Change-Id: I9ac9f68c9cd1f8c856b6228d4e3b32d3310c936a
CRs-Fixed: 2036385
Divide sap_open_session in to two parts. One where sme_open_session
is happening and the other one where sap context is getting initialized
to some values.
Divide sap_close_session in to three parts. One where sme_close_session
is happening, another where sap context is getting reset, and the
remaining one where global dfs parameters are getting reset.
Change-Id: I3126acbf4174261938c1f1ff19637bce87d7bddf
CRs-Fixed: 2036385
For regulatory offload, send the regulatory config settings to regulatory
component to compute the current channel list. Query channel list for
each band. Populate the channel list in wiphy. Also do not register
regulatory notifier with the kernel anymore.
CRs-Fixed: 2008013
Change-Id: Ia4995c7498d97fe1e37717e65daa9dcacb2f21b3
qcacld-2.0 to qcacld-3.0 propagation
sap_OpenSession is called in add_virtual_intf context, while
sap_CloseSession is called in stop_ap context. Sap can't start
successfully in dfs channel if hostapd is killed and restarted,
because sap_CloseSession clears pMac->sap.sapCtxList.
Restored pMac->sap.sapCtxList in start_ap context.
CRs-Fixed: 2032512
Change-Id: Ief31b4994ad74159795619f3d4f13891f28585de
qcacld-2.0 to qcacld-3.0 propagation
Currently if acs configs channel width as 40/80MHZ, it may select
invalid channel as its second channel.
When doing sap_select_channel, if acs configs channel width as
40/80MHZ, every candidate channel and its adjacent channel should
be checked whether it can satisfy 40/80MHZ or not. Mark the weight
of the channel that can't satisfy 40/80MHZ as max value
in sap_sort_chl_weight_all, so it will not be selected.
Change-Id: I69abbb752be8d0fae2644a9000156735048d6d16
CRs-Fixed: 1085469
In case of dfs offload, do not run cac timer, as cac will also be
offloaded in that case. Decide the same based of service bit info.
Change-Id: If4dd62628270ff0ba8632a9cd644a9d7ed6f31a4
CRs-Fixed: 2021357
Add support to fill cac duration and dfs region in vdev
start command, these values are used in firmware on phyerror
processing and cac timer offload cases.
Change-Id: I8bfbd4a3f59002f92ee2e5e321c15da849fce9ec
CRs-Fixed: 2021357
This is a qcacld-2.0 to qcacld-3.0 propagation.
Fix the variable uninitialized compile error.
Change-Id: I941d76a75a52b4cc6bd3de831b04f960f506f802
CRs-Fixed: 2022835
After removing legacy policy manager header file had to add
correct header files from host common to allow the compilation
to happen successfully.
Change-Id: I566b8f09776520e8a43eb48cc944ce627dc0c5cf
CRs-Fixed: 2009818
qcacld-2.0 to qcacld-3.0 propagation
In function sap_process_avoid_ie, if type of avoid_ch_ie is not
QCOM_VENDOR_IE_MCC_AVOID_CH, we need to get next node(scan result)
for process. Otherwise the dead loop causes VosMcThread stuck.
Change-Id: If0e736c5b8a5638ea2bc96c3afb25be286959942
CRs-Fixed: 2019048
Currently, vdev_id and session_id are assumed to be the same, but are
generated in two separate code paths. Unsurprisingly, this leads to a
whole host of desync issues. Instead, modify sme_open_session to take
a session_id, which will be populated with an objmgr vdev_id. This means
vdev_id and session_id can no longer desync, as there is only a single
source for both.
Change-Id: I104aba29beb3c19d0ef2ff23380e3d005e01ced0
CRs-Fixed: 2022136
Add new dot11mode and update the utility functions to derive
the dot11mode based on the userspace config, INI config and
FW capability.
Change-Id: I5780120ef7bc2b78fd596e937fe14a2c8ad88348
CRs-Fixed: 1073481
qcacld-2.0 to qcacld-3.0 propagation
Currently when cac ends, it will trigger eSAP_START_BSS_EVENT
with peer local id 0. If there is no peer with 0 local id, sap
starts fails.
Actually valid peer local id should be saved in sap context,
so it can be used in sap_signal_hdd_event.
Change-Id: I3779cb181390650844475b1a2f18768cb5784cf2
CRs-Fixed: 1096534
wlansap_roam_callback function logging an error message if
roam_status is not handled, in default case of switch, but same
information is logged before switch. So remove this log.
Change-Id: Id53eb392929d9328f959c7e54d7f0a5dd77b0739
CRs-Fixed: 2007415
qcacld-2.0 to qcacld-3.0 propagation
Add changes to correct the function to check for acs channel range.
CRs-Fixed: 1117328
Change-Id: Ie0a53c2f5ee26552d36da0e6c4dcda124abc71a7
On channel change of SAP to 5G, SAP is populating 2.4G basic
rates in 5G beacon.
Set number of supported and extended rates to zero for populating
rates based on network type. CSR layer will pick default rates if
hostapd rates are passed as zero
Change-Id: Ia393f7b6067f31dc8f792cda2bd74c441c2112e6
CRs-Fixed: 1105867
In case of auto channel selction failure, clean exit does not happens
which results as scan completion event timeout in start bss API.
Add appropriate API call with channel selection failure
case.
Change-Id: I66a81f586234adb5a0edc4c85cfbaa221424217f
CRs-Fixed: 2006960
Fix the compiling error for macors SM/MS redefinition in both htc.h
and dfs_phyerr_tlv.h.
Change-Id: I591bc8a55542ff8f3b6ce27201c33164e4bdfb66
CRs-Fixed: 1102190
Some functions are only used in the file which it is defined
in. Add "static" before function to fix compilation error.
Change-Id: Ie99c8e2a2c4dd6564c19876f8456a47786d3e5cb
CRs-Fixed: 1112463
Add changes to enabled driver to use external auto selection
logic instead of current driver based implementation.
In case external application is not present, driver will fall
back to current solution.
Change-Id: Ib7474e82bc7f5878af46c91ea09711775a7c046a
CRs-Fixed: 1110061
If channel set is coming from external application, it could be
possible that it doesn't fall into valid channel criteria.
Add APIs to validate the channel.
Change-Id: I1aa855b64c7702418471111d59c92ebaebe8be49
CRs-Fixed: 1110061
Vendor ACS requires regulatory channel info for each channel.
Add changes to collect channel information of each channel
and save it in sap config.
Change-Id: Ib96c3f7ddfc8476306e9a13127472be9dd0a9488
CRs-Fixed: 1110061
For emulation platform, timer value multiplied by 100,
Set the CAC value accordingly, to get timer expire after
intended duration.
Change-Id: Ia99ee6f36b88bca3c297fc06d1f3b777a2114d14
CRs-Fixed: 1114332
qcacld-2.0 to qcacld-3.0 propagation
wlan_hdd_cfg80211_change_iface will abort if ACS_IN_PROGRESS
is set, which causes iface type mismatch between hostapd and
driver.
When force SCC if same band is enabled, driver will not do ACS
for the second AP. So do not set ACS_IN_PROGRESS if no ACS to
be done.
Change-Id: I2c975c89dc1cf0d11980ad11c8d0d256c680594d
CRs-Fixed: 1105386
Currently sap_add_mac_to_acl() function has incorrect validation check,
size of MacList will be always zero if no elements added to the list.
Validating size always be greater than zero will prevent adding first
element itself. There by breaking whole ACL functionality.
To fix this, remove ‘*size == 0’ condition in validation code.
Change-Id: Ic3e51db798a996870ef65cda0eddfd1ec738d290
CRs-Fixed: 1104152
Change the timeout values at HDD to match sme cmd timeout in all the
instances where HDD is sending cmd via SME command queue.
Change-Id: I00337169804b9ce71562cb114e4c2b92a7534dba
Crs-Fixed: 1100854
In failure scenario host got two commands, one is connect
request on the STA interface and the second one is add
interface/open session on softAP interface.
HDD/SAP queues the eSmeCommandRoam first to
the SME active list and then eSmeCommandAddStaSession to
sme pending list with timeout value of 2 secs at SAP.
Connect takes more than 2 secs due to which addStaSession
gets timedout.
Configure SME active timeout value to 30sec.
Increase the wait time at SAP for open session to 30secs
which is equal to the SME active command timeout value.
Change-Id: I77a0279421566ded7cd0eb7cde7871d3074ec5cf
CRs-Fixed: 1096771
SAP module dubug message log contains QDF
module id.
Replace cds_err API with QDF_TRACE API to
log the correct module id in debug messages.
Change-Id: Ib39a95cd0688d6029c802c4710127a4c72ae6411
CRs-Fixed: 1098145
propagation from qcacld-2.0 to qcacld-3.0
AP+AP case, one is started, another one start fails and its channel
list buffer is NULL. When radar signal found, it will change channel
with second sap's context, then crashed since channel list is NULL.
Change-Id: I73f2c1c2fa0667e7517e2a6867d79175c47d4582
CRs-Fixed: 1091122
propagation from qcacld-2.0 to qcacld-3.0
DUT is SAP + STA SBSC mode, it takes very long time to recover after
SSR. There are two problems:
1. It clear STA session and create new after SSR, but just clear SAP
session. With sessionId in SAP context, it wrongly use new STA session
to close SAP when terminate hostapd. This is the reason why host wait
stop_bss_event for 10 seconds in cfg80211 stop ap. Set sessionId to
invalid if adapter is SAP mode.
2. In dual-wifi mode, it will start second WLAN if SSR and
WLAN_SVC_FW_CRASHED_IND late. Send this event more earlier.
Change-Id: I10a3f300ac5621463fcce4d0a5e18b2cf1cb8491
CRs-Fixed: 1054612
qcacld-2.0 to qcacld-3.0 propagation.
Supplicant may send PNO command as disconnection was already informed
to supplicant while disconnection might still be in progress in PE
layer(DEL_STA/DEL_BSS).
Fix to send disconnect indication to upper layers after complete
cleanup.
Change-Id: I976044186eb8e79f709bda618b38815827a3e0c5
CRs-Fixed: 951162
propagation from qcacld-2.0 to qcacld-3.0
When SAP starts (DFS channel) on default interface and a new interface
for SAP is created, if eSAP_DFS_CHANNEL_CAC_RADAR_FOUND event is
triggered then kernel panic happens. This is because for the new
interface SAP is created but not started and due to this channel list
is NULL. Fix is to add state check for SAP interface to know if SAP is
started or not
Change-Id: If613ec3ed0afad8a66d545bcd858fe73640a0273
CRs-Fixed: 1062516
propagation from qcacld-2.0 to qcacld-3.0
Start SAP with DFS channel on default interface and create new AP
interface without any operation, then terminate SAP and rmmod WLAN
driver, DUT crash since it doesn't clean up sap_dfs_cac_timer. The
solution is return cocurrent session only when state machine isn't
disconnected in sap context.
Change-Id: Iffc1d9239c303c25067da2e2d30e37648a44e599
CRs-Fixed: 1051755
Propagate from qcacld-2.0 to qcacld-3.0
Current value of SAP TX leakage threshold is a fixed value 310,
since different product may need different threshold, add it
into ini file now.
Change-Id: I0df8ac14f5e9e812a8ec5e5127df21eff0a8502b
CRs-Fixed: 955258
qcacld-2.0 to qcacld-3.0 propagation
The length of bss descriptor is calculated using offset of IE
field but when lim tries to get the ielength it doesnt use the
offset which results in incorrect IE length.
To fix use offset to get the ie length from bss descriptor
Change-Id: I7abbde83aea1e0a1cfcd7bdb1a184158f75f2455
CRs-Fixed: 1082001
Propagate from qcacld-2.0 to qcacld-3.0
In rrmProcessBeaconReportReq(), the return value is not the same
enum type with the routine definition. In dfs_process_radarevent(),
2 variables type are not same in a comparison. Add fix to correct
it.
Change-Id: Ibc5fbf70e2632a22971f33b769b31737a40123e7
CRs-Fixed: 979671