Remove operationChannel from structure csr_roam_profile, remove
the code where value assigning to operationChannel take place.
Change-Id: If7cd64d4d7513000181f92faabd6c863341c71f9
CRs-Fixed: 2503043
After got restart channel rsp from fw, vdev state will change
as: ST-RESTART_PROG->ST-CONN_PROG.
In lim_send_sme_ap_channel_switch_resp, if channel is non-dfs,
vdev state will change to up; if dfs channel, later it will
change to DFS CAC when starting cac timer.
Current issue is if there is ap stop after restart channel rsp,
while processing WLAN_VDEV_SM_EV_DOWN, there is no hanler in
ST-CONN_PROG > ST-DISCONN_PROG.
From design perspective, In SAP, ST_CONN_PROG is a dummy state,
ideally, SAP state should change as below without preemption :
RESTART_PROGRESS->CONN_PROGRESS->UP
RESTART_PROGRESS->CONN_PROGRESS->DFS_CAC_WAIT
To fix issue, change vdev state to DFS_CAC_WAIT in
lim_send_sme_ap_channel_switch_resp; So WLAN_VDEV_SM_EV_DOWN will
be handled in DFS_CAC_WAIT state.
At the same time, set DFS_CAC_WAIT when starting SAP, and clear
sap_move_to_cac_wait_state in sap state machine.
Change-Id: Iee89521471e456a553f40577da6d1e69aef3b803
CRs-Fixed: 2501339
Currently the driver choses a default channel for SAP
in case of failures, logic of which is incorrect as
it does not take into account the hw mode, and all
other checks such as SRD, unsafe, DFS etc.
The channel chosen after this maybe not as per
expectation.
Fix is to chose a default channel from the acs channel
list itslef so that the checks of SRD etc. ae honored.
Change-Id: Ife8a6b88938fd566bed92a5bde1cb0fe34a45462
CRs-Fixed: 2476351
If no channel is found suitable for ACS, don't scan
all the channels as done currently by the driver, and
send ACS fail code to the userspace as SAP cannot be
started on the band specified by the use.
Change-Id: I18edff6aaf384384841487d06474fd5fba28fc2f
CRs-Fixed: 2476347
Do more frequency list population in a number of functions
to make sure the resulting tCsrChannelInfo structures
have the right channel frequency info.
Meanwhile, enlarge the buffer allocated for freq_list in
csr_roam_copy_profile to make sure all channel frequencies
can be replicated.
Change-Id: Ia8b90581211d657851e1d8fc2556dcb633c8001a
CRs-Fixed: 2500236
1) freq_list value population:
Allocate memory for freq_list within tagCsrChannelInfo
whenever ChannelList is allocated for the same struct.
Populate channel frequencies into freq_list whenever
ChannelList is populated for the same struct.
Free the memory used by freq_list whenever ChannelList's
memory is to be freed for the same struct.
2) Special treatment for sme_rrm_send_scan_result:
To ease the freq_list population within function
sme_rrm_send_scan_result, a parameter(freq_list) has
been added into the parameter list of it.
Meanwhile, all callers of the same function have been
modified to pass freq_list to it.
3) Fix a number of camel cases detected by checkpatch.
Change-Id: I732b084d3e1edfc4f26e7ed44be1c6e826be8602
CRs-Fixed: 2496716
Currently the driver does not update the ACS primary channel,
and secondary channel (in case of 40, 80MHZ) in scan fail
cases or all the channels in the particular band for which ACS came
were unsafe, SRD, DFS, indoor etc., which leads to
SAP bringup fail.
Fix is to update the primary, secondary channels in case of
scan, or select channel fail.
Change-Id: I66ce390f89bf69ee0695526fccbd2d412e0edf87
CRs-Fixed: 2450028
Add op_freq in csr_roam_profile. Finally remove
operationChannel from csr_roam_profile in next
few changes.
Change-Id: I7a3d7fe7e77b18424f487429aaa19ca1a97b8aba
CRs-Fixed: 2489914
For some branches, we disabled BUILD_DEBUG_VERSION, to avoid compile
issues, add macro for new function which only will be used at
QDF_TRACE().
Change-Id: Idd0bb3a98ef92b837e14bd4e8e3c374b1b6a7e58
CRs-Fixed: 2492501
Update the sap ctx channel list according to acs cfg, and
not to sap_ctx->channel_list as it would get free in ACS
scan callback, but acs cfg list would remain intact.
Change-Id: I845d5cc3d025b0f2605027f517575f0ad70b07dc
CRs-Fixed: 2478162
Currently, there is no logging for channel switch reason.
Add csa_reason to know the reason for the channel switch.
Change-Id: Iec02d7fa2b1ec51acb97005da220db7de705d7e0
CRs-Fixed: 2483206
If p2p GO interface receives the dfs event,
as part of random chan selection logic
driver needs the interface type to query
policy mgr for PCL. To use the new API
utils_dfs_get_vdev_random_channel to support
GO random channel selection.
Change-Id: I098bb84455afc8dbee74f2df07a01499f7d07bd1
CRs-Fixed: 2467803
The SAP channel change can be called in scheduler thread and thus
waiting for hw mode change in scheduler thread will always lead to
timeout and thus channel switch failure.
Fix is to avoid wait and continue channel switch after hw mode
change is completed.
Change-Id: I951fab6c95ff2a84d6a619859295b830685fac4e
CRs-Fixed: 2484147
With new configuration g_sta_sap_scc_on_dfs_chan = 2:
1. SAP is allowed to start on dfs channel if no STA interface
active on the same mac.
2. SAP is allowed SCC with STA on DFS chan without DFS master
functionality and ignore Radar event
3. Skip cac if dfs master capability disabled based on
the configuration and current connection combination.
Change-Id: If2ffb253e51c94c06a105b2691c19f7d246fcc98
CRs-Fixed: 2468004
Get vdev ref before accessing vdev and release vdev ref after accessing
vdev, otherwise vdev may be accessed after free.
Change-Id: Idd6f7218ab70f399cb6bbfad8572df5c55e38a48
CRs-Fixed: 2480224
Previously no logic for channel switch
restrictions in sap_random_channel_sel.
Enable flags to allow user to control the
DFS random channels switches through INI
gSapPreferredChanLocation.
Change-Id: I992616a8be71018f5ea372d286238b4c87aa8338
CRs-Fixed: 2478371
Currently the driver does not check whether the
ACS cfg's chanel list is valid or not and checks
for the best channel within it in the function
wlansap_is_channel_present_in_acs_list, which can
lead to potential pointer deference.
Fix is to check the channel list and then only
process for comparison.
Change-Id: Icda2e7c8f260eb636c8159fbbb697400dddbdf74
CRs-Fixed: 2479941
Currently the driver checks whether the DFS channel is
in the range of acs channel list given, i.e the start
and end channel, which is not always correct as the channel
range does not imply that all channels in that range are present.
Fix is to explicitley check for the number of channels, and
compare each channel in the acs channel list with the DFS
channel.
Change-Id: Ib0b2d66dc325c340ab5cc837109a4f63e48ef4df
CRs-Fixed: 2466223
When ini acs_with_more_param is configured as 1, more params should be
added into ACS calculation process. Currently, even acs_with_more_param
is set as 1, mac->sap.acs_with_more_param is still 0 and no params are
added to ACS calculation process.
Make mac->sap.acs_with_more_param change as ini acs_with_more_param.
Change-Id: I4ced3b1d7d07c0f919183df42191e51ba66b90e8
CRs-Fixed: 2458086
The Linux Coding Style doesn't allow mixed-case names and
so-called camelcase notation, so rename the statusCode to be
compliant with the coding style.
Change-Id: I98e0af710401a9718bdc1402617253eb970c5861
CRs-Fixed: 2463825
If sap_get_channel_list return 0 channel, didn't release vdev reference
acquired by wlan_objmgr_get_vdev_by_macaddr_from_psoc() in function
sap_channel_sel().
Release the vdev reference at the end of function sap_channel_sel().
Change-Id: Ib8d240e464ea893d97fef5f563bfb080646bae46
CRs-Fixed: 2457532
Scenario:
1. Start SAP on any potential LTE-COEX channel.
2. SAP would restart when it gets the event of unsafe channel.
Observation:
SAP restarts on a channel not in ACS channel list.
Expectation:
SAP should restart in channels given by the user
space only which are configured by hostapd.
Issue with driver:
Currently in wlansap_filter_ch_based_acs, the driver
eliminates the channels based upon the ACS start, and
end channel, and not the channel list, which can lead
to almost all the channels being picked, and none eliminated
if the start channel was 1, and end channel was 165, even
when only two channels, say 1 and 165 only were present
in ACS channel list.
Fix:
Fix is to eliminate all the candidate channels which were
not part of the ACS channel list, and pick only those channels
that were part of initial do_acs request.
Change-Id: Ib3b0b0a77c07b423b66e99feb085a370ed01f2de
CRs-Fixed: 2454270
While getting reassociation request frame, user space hostapd will
trigger diassociate with reason code 13. Association can't be
established.
The root cause is host driver forwards more 6 bytes to user space.
The 6 bytes is current AP address in association request frame.
Hostapd can't paras association request frame because the additional
6 bytes.
Skip current AP address before forwarding reassociation request
frame to user space.
Change-Id: I94a7c26289f24a1f0716fe64c4ee58eae1a913c6
CRs-Fixed: 2435392
If FW does not support WMI_SERVICE_DUAL_BEACON_ON_SINGLE_MAC_MCC_SUPPORT,
in AP+AP case start the second SAP on same band and
different channel will be failed.
For force mcc to scc switch enabled case, override the second AP's
chan to same chan of first AP instead of return failed in start AP.
Change-Id: I83ad3db3160cfc2dd66163bb1e1b2e19ae7c5fa3
CRs-Fixed: 2439440
CSA on DFS channels requires CAC period after RESTART response, peers
can leave during CAC period due to HB failure. But peers remain
connected in SAP and are not deleted.
Now if vdev down is called during CAC wait period, the peer delete
all is not called, and vdev delete is sent without sending peer
delete to firmare leading to assert.
This change adds the logic to internally disconnect all peers before
channel switch if CAC is required on new channel, i.e new channel is
DFS and pre-CAC is not done and ignore cac is not set.
Change-Id: I923fd11d1b9d4a2c606b19ff94baaf44397d3e20
CRs-Fixed: 2449104
Currently the driver flushes all the scan results during
ACS request, and then scans the specific channels as
mentioned in the request, which leads to a scan again
for the STA interface as no scan results are available.
Fix is to have a timestamp, and get only the latest scan
results, instead of the scan database flush.
Change-Id: Icc343fcca77fb7074071ca1d467947ef70fd1930
CRs-Fixed: 2446490
Scenario of the issue is :-
1. Keep sta+sap_scc_dfs_ch as 0 to disable the dfs concurrency
2. Start a SAP on any 5ghz channel(NON-DFS).
3. Start a STA on a DFS channel.
Expectation: The SAP should not do MCC, SCC as the above
mentioned ini is 0, also MCC is not prefereed in a HW
solution where DFS is preferred, hence the SAP should go
to 2.4ghz and DBS should be the expectation.
Observation: The SAP does not do a DBS operation, and falls to
MCC here.
Reason: When the SAP gets a PCL in the path of SAP restart,
the PCL feels that a new SAP is going to come up, and hence
gives the best channel (first element of PCL ) as its own,
which leads to restart being rejected, as the SAP cannot start
on a channel which is the same as existing.
The final channel then selected is the STA channel, leading to
DFS SCC which is also not allowed. Hence the SAP is now stuck
in MCC(STA+SAP , one on DFS, and the other on NON-DFS channel).
Fix: The fix is to get an alternate channel for SAP restart, other
than the channel on which the SAP is already up, to lead to DBS,
if the STA channel is not suitable for SCC operaion.
Change-Id: Iab3ad22b2f970ca26ce3e6bc7a9b5ee34bc7e7ba
CRs-Fixed: 2443718
Use updated cp stats component to get peer rssi and tx rate,
rx rate for big data logging as legacy infrastructure is
deprecated.
Additionally add support for RX multicast broadcast packets from FW.
Change-Id: Idcab4a022a4e7e34bd15878f95ad8248ca3aa9dd
CRs-fixed: 2428582
In case of no scan result, ACS logic should select one channel based on
any of the below condition (as per mentioned order):
1. First valid channel from PCL
2. First safe channel from safe_channels
3. ACS start channel
Change-Id: Ife1d7a0a963b7773b92c091ed7cc976fcda25347
CRs-Fixed: 2430935
When SAP works in ACS mode, it needs to restart with a safe channel
if current channel is unsafe. Sometimes no channel is selected from
pcl channels. SAP can't just pick up one safe channel because the
channel may be DFS channel while SAP may disable DFS master capability.
SAP should select one valid channel for LTE COEX.
Change-Id: I303165f82b5c2a8d06447df4ba23fdcba5b1083c
CRs-Fixed: 2415007
Overwrite 2nd AP's channel with 1st AP only when:
1. Current operating mode is single mac
2. or 2nd AP is coming up on 5G band channel
Change-Id: I8260721a5f9b8547d93ed7c6775741e6a8cc2a44
CRs-Fixed: 2427083
If the first DFS AP is in CAC progress and second
AP starts on DFS chan, move the second AP to CAC
wait state as well.
Otherwise, when CAC end, the second AP will always
stay in "WLAN_VDEV_S_START" state and can not
handle CAC end event.
Change-Id: I440ce3339dd2afb62bdb574f2f785d733a980933
CRs-Fixed: 2426714
Currently HDD is populating SAP configuration values and
sending it down to SAP module instead use the respective
MLME CFG public API's to get the configuration values.
Move following CFG values:
1. auto_channel_select_weight
2. reduced_beacon_interval
3. dfs_preferred_channel_location
Change-Id: Ic0936a9d96d0587d927ea4d906bd659969415847
CRs-Fixed: 2425524
If no channel is safe in ACS channel list, select default channel
instead of returning start failure for SAP.
Change-Id: I974a573f5000720a62e58aaff5a71412c2fae7bf
CRs-Fixed: 2424847
Currently HDD is populating SAP configuration values and
sending it down to SAP module instead use the respective
MLME CFG public API's to get the configuration values.
Move following CFG values:
1. sap_chanswitch_beacon_cnt
2. sap_chanswitch_mode
3. protEnabled
4. chan_switch_hostapd_rate_enabled
5. tx_leakage_threshold
6. ht_capab
7. UapsdEnable
8. obssProtEnabled
Change-Id: Id62492d5374b9a3f8ab9cbf57e474cc9f78a791d
CRs-Fixed: 2411126
In case of STA+SAP, if STA connect to new channel, driver check
if SAP channel switch is required. Before this it wait if channel
switch is already in progress, if not it continue and check if
channel change is required. While waiting in case where event was
set and channel switch was not in progress, the even gets reset
after waiting.
So if event is not set again, i.e in case SAP channel change is not
required. Any subsequent wait on the event will result in timeout.
Also while changing channel this event is reset and then the
concurrency checks are made and if checks fails the channel change
may not happen leaving event in reset state.
So wait for event only if channel switch is already in progress.
Also reset the event once all concurrency checks have passed and
channel change is started.
Change-Id: Iffcd8b2bf9dc7cbbd7d939983601cc395ef4c515
CRs-Fixed: 2425145
Random failure is observed when trying to parse RSN IE from
assoc_ind->assocReqPtr in sap_fill_owe_ie_in_assoc_ind.
It should be parsed from ASSOC_REQ_IE_OFFSET.
Change-Id: I8f532f8850a7d997e0227a9e00d4285297243495
CRs-Fixed: 2408770
Most of the identifiers used in the wlansap_roam_callback() prototype do
not match the ones used in the implementation, and furthermore the one
that does match does not conform to the coding standard, so update both
the prototype and the implementation to have identical, conforming
identifiers.
Change-Id: I3cf3622121d15bb6c9fb2f9a63a0f9b99dd675f6
CRs-Fixed: 2423731
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename SAP identifier pScanResult to be
compliant.
Change-Id: I7a43a55f19d3d9bed4ba84d80347c49c944af45f
CRs-Fixed: 2423730
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tWLAN_SAPEvent typedef does not
meet any of those criteria, so replace it (and the "pt" variant) with
a properly named struct.
Change-Id: Ie39e51a24a16f0c19b7b0fe926748a6b90d31632
CRs-Fixed: 2423729
Function sap_update_unsafe_channel_list() is conditional upon feature
flag FEATURE_WLAN_CH_AVOID. However there isn't a stub implementation
for when the feature is not enabled, and as a result in-function
conditional compilation is required at the call site. This is contrary
to the coding style, so introduce a stub implementation for when the
feature is not present. In addition make this function static since
the scope is local to a single source file.
Change-Id: I12f010ac8f6d2cb63794e3295977bfac4266cca1
CRs-Fixed: 2423728