提交線圖

727 次程式碼提交

作者 SHA1 備註 日期
Lincoln Tran
b18e7854bf qcacld-3.0: Add check for passive channel for SAP
Add a check for passive channels when checking the restricted
bands on SAP. This change blocks SAP from restarting on a passive
channel.

Implement the function to filter out passive channels from the PCL.

Change-Id: I80a4b78c1af77f5bfa68be3163f9e9a78cc6425a
CRs-fixed: 2817589
2020-11-20 16:24:41 -08:00
Yu Wang
c37adc1bf1 qcacld-3.0: add api to check if the channel is allowed for sap
Check the factors as below to decide whether the channel is
allowed or not:
 * If the channel is in LTE coex channel avoidance list;
 * If it's STA+SAP SCC;
 * If STA+SAP SCC on LTE coex channel is allowed.

Replace policy_mgr_is_safe_channel() with this new function
for sap channel selection and acs channel filtering, to allow
unsafe channels when it's STA+SAP SCC and STA+SAP SCC on LTE
coex channel is allowed.

CRs-Fixed: 2743042
Change-Id: Ic5a84b2628200fe9decf6972f00706f190f04722
2020-11-18 12:03:52 -08:00
Min Liu
1498fd2554 qcacld-3.0: Channel switch on 2G when CC is updated
Current logic in wlansap_get_chan_band_restrict will skip channel
switch for 2G channel which is disabled due to CC update by mistake.
Update the condiction logic to make it work properly.

Change-Id: Ib4c07447f14a47c2934c63ebdc09821eb8e5a3d1
CRs-Fixed: 2818651
2020-11-18 07:46:06 -08:00
Srinivas Girigowda
1e37c63d94 qcacld-3.0: sap: Remove logs for cds_get_context() checks
cds_get_context() function already takes care of logging the
caller function name in case of any error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.

CRs-Fixed: 2815522
Change-Id: I735ba28f98a38e832ecb8781e39d5d8e134ad01f
2020-11-12 05:40:00 -08:00
Paul Zhang
866061de62 qcacld-3.0: remove dup invoking sap_init_dfs_channel_nol_list
When enable SAP, it invokes function sap_init_dfs_channel_nol_list
twice.
1\  __wlan_hdd_cfg80211_do_acs
    -> wlan_hdd_cfg80211_start_acs
    -> wlansap_acs_chselect
    -> sap_init_dfs_channel_nol_list
2\  wlansap_start_bss
    -> sap_fsm
    -> sap_fsm_state_init
    -> sap_init_dfs_channel_nol_list

Remove the function in 1\ path.

Change-Id: I8c0bda1fafadc463f6594e0f4c127e9cf98bf4de
CRs-Fixed: 2808989
2020-11-12 03:28:29 -08:00
gaurank kathpalia
effa6ef7f0 qcacld-3.0: Filter out the 6ghz chan freq from valid freq list
Currently the driver does not have a support to
filter out the 6ghz frequencies from the valid freq
list, and hence there is a high chance of selecting
the 6ghz freq as an operating freq for SAP, which
the legacy clients won't be able to scan.

Fix is to add a support for filtering out the 6ghz
frequencies from the valid freq list.

Change-Id: I3c32b4c8c5b93eae04d49d2d5b6bd4ec9852c2a9
CRs-Fixed: 2808350
2020-11-10 04:57:29 -08:00
Utkarsh Bhatnagar
ff006ecb1f qcacld-3.0: STA SAP concurrency changes for DFS channel
Previously, if STA is connected to DFS channel and SAP starts on
Non-DBS HW, then it is forced to start on DFS channel with BW 160 Mhz
irrespective of BW on which STA is connected without CAC.
Even after STA disconnects, SAP remains on DFS channel with BW 160Mhz.
So, scan will be disabled and STA cannot be connected on any channel
other than DFS channel.
If STA is connected on non-DFS channel on 5 GHz and SAP starts, it
will start on non-DFS channel as primary channel with BW 160 Mhz
without CAC. Also, scanning was also allowed when SAP is started with
BW 160 Mhz. This might violate regulatory in case radar comes up while
scanning.
Standalone SAP on DFS channel was not allowed.

To fix this, Force set SCC for non-dbs HW, this way standalone SAP
can come on DFS channel but scan will be disabled in such case and
STA cannot be connected other than DFS channel.
In case STA gets connected to dfs channel in non-dbs HW, then sap
starts only on STA channel with force SCC with BW
MIN(sta_chan_width, CH_WIDTH_80MHZ).
Afterwards, if STA disconnects, restart the AP with BW CH_WIDTH_80MHZ
on safe channel. Scan will be allowed as the DFS master capability is
offloaded to AP with which STA is connected on DFS channel.
Also, if standalone sap starts, then STA connects to DFS channel then
SAP will restart with STA channel frequency and Channel width
MIN(sta_chan_width, 80MHZ).
If standalone SAP starts and then STA connects to non-dfs AP or SAP
starts when STA is already connected to non-DFS AP, then ch_width is
MAX(sta_chan_width, 80MHZ) (5 Ghz) or 20 Mhz (2.4 Ghz).
If STA disconnects during SAP+STA on non-DFS, SAP won't restart unless
the STA was connected on BW 160 Mhz.

Change-Id: I1cebfc79f170c1e4e2710ed747ec804df3d8b441
CRs-Fixed: 2809255
2020-11-05 09:51:03 -08:00
Will Huang
7553cd4a2f qcacld-3.0: Don't touch CAC timer which is not created for offloaded CAC
CAC timer is only created for non-offloaded CAC case, but in some
cleanup functions, CAC timer is stopped/destroyed without checking CAC
offload flag.

Change-Id: If8422afac2389e134769a762aa87cb7969eef9ec
CRs-Fixed: 2807650
2020-10-30 11:01:44 -07:00
Jianmin Zhu
77f915b7ea qcacld-3.0: Can't restore to 5G channel when 5G re-enabled
If 5G band disabled, all channels of 5G should be disabled, before SAP
switch to 2G channels, we need save original 5G channel, or when 5G
re-enable,  can't restore back to original 5G channel.

Regression of change-Id: I679ce6f72228b431530953a631c8c8afa4597187.

Change-Id: Iabb932102c37cc7b9d4d97a2e22e781958ed906f
CRs-Fixed: 2789341
2020-10-01 19:08:45 -07:00
gaurank kathpalia
1fbd7b0de6 qcacld-3.0: use enum wlan_status_code for wlan status code
Use the new enum wlan_status_code for wlan status code and
remove enum mac_status_code.

Change-Id: If42cfdcf99d34ffa77be53382d02288ab8637c10
CRs-Fixed: 2789000
2020-10-01 16:57:57 -07:00
Jianmin Zhu
64fdb6000a qcacld-3.0: Fail to transfer DBS to SCC caused by channel avoidance
Steps to reproduce:
1. AP_AP mode setup, AP1 occupy channel 1, AP2 occupy channel 44.
2. Set channel1~channel11 as unsafe channel, which cause AP1 try to
switch to 5G band.

Observed Results:
AP1 select channel 36, and channel switch fail.

Expected Results:
AP1 select channel 44 same as AP2, and channel switch pass.

Root cause: in Dual AP concurrency case, when get PCL for one AP, need
find the AP from connection list by vdev id and remove it temporarily,
can't just remove 1st vdev from connection list.

Change-Id: I763bbc89bacdad4389084588ee68c3a1e2f17b7b
CRs-Fixed: 2774570
2020-10-01 12:28:43 -07:00
hqu
f88549090b qcacld-3.0: Fix implicit-fallthrough compile error casued by gcc 9.3
Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.

Fix is to add keyword fallthrough to resolve such compile error.

Change-Id: I3fdc48b1a9ab2345a47ae644e3217b4d29238364
CRs-Fixed: 2785172
2020-10-01 12:28:39 -07:00
Srinivas Girigowda
a2ca355c9f qcacld-3.0: umac: Remove logs for qdf_mem_malloc() checks
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: I9f97967870b3bd05355e21b68a77230b920eeb0a
CRs-Fixed: 2781932
2020-09-25 12:59:50 -07:00
gaurank kathpalia
b81c0ae7d2 qcacld-3.0: Replace tSirMacReasonCodes with enum wlan_reason_code
Replace all enums of tSirMacReasonCodes with common
enum wlan_reason_code.

Change-Id: Ida950a08ac4ceea2911344a8d919b2d93ac7d1fe
CRs-Fixed: 2781197
2020-09-21 16:55:34 -07:00
Srinivas Girigowda
7e11aadd9d qcacld-3.0: Replace QDF_TRACE(QDF_MODULE_ID_SAP,...) with sap log macros
qcacld-3.0: Replace QDF_TRACE(QDF_MODULE_ID_SAP,...) with
sap_{debug|info|warn|err|alert()}

CRs-Fixed: 2755126
Change-Id: I58ef919175e0043b8a5a60c7a14e4ca3e672cb84
2020-08-28 13:03:36 -07:00
gaurank kathpalia
f955b44a6d qcacld-3.0: Enable/Disable SRD support for vdev
Currently the driver enables the SRD channels
support for both P2P_GO and SAP if the SRD master
mode is enabled.

Have individual ini values to enable/disable
the SRD channel for each op-mode as required.

Change-Id: If6e66996ed19dacbde7f71a6702f378a7e9a273c
CRs-Fixed: 2748446
2020-08-27 18:36:55 -07:00
Liangwei Dong
cc9cbfc8de qcacld-3.0: Fix STA+SAP SCC on DFS when sta_sap_scc_on_dfs_chan = 0
When sta_sap_scc_on_dfs_chan = 0, SAP is not allowed to SCC
with STA on DFS channel. Check the SAP target channel DFS flag
considering the target channel bandwidth.

Change-Id: I321c1055574477fe39ca8569f24a4040c8dc1904
CRs-Fixed: 2756518
2020-08-24 03:58:57 -07:00
Srinivas Girigowda
f71adaf0e5 qcacld-3.0: sap: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2752355
Change-Id: Ia9b814f028df9fabe661861d25dbf45deefd008d
2020-08-22 16:00:25 -07:00
Amar Singhal
f8517e79e7 qcacld-3.0: Replace dfs utils call
Replace with dfs utils call utils_dfs_get_vdev_random_channel with
utils_dfs_get_vdev_random_channel_for_freq. We are replacing
channel numbers with frequency.

Change-Id: I0244512f83f45ef7974e39016832784b804286b7
CRs-Fixed: 2753219
2020-08-17 19:59:10 -07:00
Lincoln Tran
eb083f3346 qcacld-3.0: Add logic to check if channel is disabled
Currently, when the country code changes, there is no logic
to restart the SAP on a new channel. Add a case to check if
the channel is not allowed, then calculate a new safe channel
and update the SAP restart reason.

Change-Id: I679ce6f72228b431530953a631c8c8afa4597187
CRs-fixed: 2718324
2020-08-17 15:12:09 -07:00
Utkarsh Bhatnagar
38881687d6 qcacld-3.0: Replace wlan_reg_is_passive_or_disable_ch with freq API
As driver already have frequency API use
wlan_reg_is_passive_or_disable_for_freq instead of converting
freq to channel and calling the channel API
wlan_reg_is_passive_or_disable_ch.

Change-Id: Ib6a9c4c1016911ff7a9598cbfd14797e305c75f3
CRs-Fixed: 2753825
2020-08-15 03:29:35 -07:00
Utkarsh Bhatnagar
6619e25cb6 qcacld-3.0: Fix the channel switch to 2.4Ghz after pre-cac
In case of pre-cac as part of pre-cac vdev delete the whole
mac_ctx->sap is zero in sap_clear_global_dfs_param() and thus the
loop for mac_ctx->sap.sapCtxList always return null sap ctx. Due
to this if radar is dedected on the original SAP, the vdev switch
to new channel is ignored.

Also in case of radar detection if SAP moves to 2.4ghz, the HW mode
change is not attempted and thus vdev restart fails on 2.4ghz if HW
mode is not DBS.

Thus dont reset the mac_ctx->sap in sap_clear_global_dfs_param() and
add check if HW mode change is required when channel change due to
Radar detection.

Change-Id: Id44a0ddbbb20035412b0c039c12f7f59f2c37f1a
CRs-Fixed: 2753029
2020-08-14 14:44:04 -07:00
Gururaj Pandurangi
33b02c097e qcacld-3.0: Support 5.9 ghz channels for US
Add support for new 5.9 ghz channels 169, 173
and 177 in hdd and sap modules

Change-Id: I630df032d93624db20aed9891ec53256fcfd55ab
CRs-Fixed: 2751051
2020-08-08 18:59:27 -07:00
Abhishek Ambure
687d129962 qcacld-3.0: Change HW mode after SAP channel change
After SAP switches the channel, policy manager needs to check if
the host needs to change HW mode. SAP state machine updates channel
change event to hdd to indicate SAP channel switch. Hence move logic
to change HW mode from start bss success event to channel change
event case in sap event callback.
Problem scenario:
1. DUT is in Single MAC mode by default.
2. SAP is up on Channel-1. So SAP is on MAC-0.
3. Host sets Policy Mgr Hw mode = DBS.
4. STA comes up on Channel-36. As host is in DBS mode, STA came up
   on MAC-1.
5. SAP does CSA to Channel-36 (STA’s channel). So SAP moves from
   MAC-1 to MAC-0.
6. Host sets Policy Mgr HW mode = Single MAC (As both VDEVs are on
   same band).
7. Now, SAP does CSA to Channel-11. As Policy Manager Hw mode is still
   Single MAC, SAP is still on MAC-0. So now STA (Channel-36) & SAP
   (Channel-1) are in MAC-0 doing MCC.
Fix:
After SAP switches channel, policy manager checks and changes HW mode
change in hdd sap event callback.

Change-Id: If7964057592d85a11dd77197c889a4ed77ed039a
CRs-Fixed: 2719810
2020-08-05 02:16:46 -07:00
Liangwei Dong
198eb3bdea qcacld-3.0: Fix AP state mismatch between hostapd and driver
AGO/AP is started and beaconing, but the hostapd_cli status cmd still
show "dfs". This will happen when the STA connected on DFS
channel and AGO/AP is starting on same DFS channel.
By design the AGO/AP CAC is skipped due to STA+SAP DFS concurrency.
If we skip CAC timer, we will need to indicate the CAC event
even though driver doesn't perform CAC, otherwise hostapd will
stuck in "DFS" state.

Change-Id: I7961d0b976fd84fc1f29449d98eb150d1463a92f
CRs-Fixed: 2733624
2020-07-28 22:20:06 -07:00
wadesong
4d1b659512 qcacld-3.0: Override phy mode in sap roaming profile
Wlan phy mode in sap roaming profile will become invalid when
the following corner case happens:

  1) sta starts in 5G channel x;
  2) sap starts in 5G channel y, leading to mcc;
  3) sap moves to 2.4G band on the other mac;

In the above case, sap channel frequency will be set to 2.4G,
but the phy mode in its roaming profile will not change.

Override the sap phy mode in its roaming profile so it aligns
with channel frequency again.

Change-Id: I0b243c1d312f77bf4a4d782f6b9d0d75928d0277
CRs-Fixed: 2736429
2020-07-22 05:33:10 -07:00
Lincoln Tran
d5e1f78aa8 qcacld-3.0: Introduce getband vendor command
Update calls from reg_get_curr_band to reg_get_band since
they provide the same functionality.
Update calls to reg_get_band to expect a bitmap since the API
has been updated.
Update getband driver command to convert the bitmap to the
old values. Also add the new vendor command getband.

Change-Id: I069489ebf4826f8f4bfcb974b74e4d0591d5b33f
CRs-fixed: 2726361
2020-07-14 22:45:22 -07:00
Liangwei Dong
cb26ab4de6 qcacld-3.0: Fix ACS invalid defalut channel selected
If the ACS SCAN failed, the API sap_select_default_oper_chan
will select a default channel from ACS scan channel list.
At present sap_select_default_oper_chan doesn't validate the
channel with regulatory. It may select an invalid channel and
report to hostapd. This will happen when driver is doing ACS
scan, the upper layer set different country code and result to
some channels in the acs freq_list become invalid.
Fix by checking the channel supported by regulatory before select
it.

Change-Id: I438b2947ba1fd5388a2472d5122e55edc89229db
CRs-Fixed: 2723689
2020-07-05 23:13:08 -07:00
Utkarsh Bhatnagar
3402879c05 qcacld-3.0: Correct condition to skip DFS channels
Currently the driver skips the DFS channels if
g_sta_sap_scc_on_dfs_chan = 2 which should not
happen as master mode is supported if this ini
is 2. Driver should only skip the DFS channels
if the ini value is 1.
Fix is to correct the condition for the same.

Change-Id: I9d6c2f2c42f9d9f4f1b5bd080b9cdc5c13e031f2
CRs-Fixed: 2700201
2020-06-17 19:37:59 -07:00
Wu Gao
5e262a7c8b qcacld-3.0: Use min/max macro to update start/end range of 6ghz
Use MIN_6GHZ_CHANNEL to replace CHAN_ENUM_5945, MAX_6GHZ_CHANNEL to
replace CHAN_ENUM_7105, since min/max channel of 6ghz may be changed.

Change-Id: Ibb0aa4182162d956d632b271cbbfef5af07f918c
CRs-Fixed: 2706639
2020-06-10 20:23:04 -07:00
Lincoln Tran
745f9e7d1f qcacld-3.0: Update phymode before starting SAP and STA
Check phymode to verify it is allowed for the current country
before starting SAP or connecting STA.

Change-Id: Ica5e70bbd421c4dc18a34545f63e436bc482fc46
CRs-fixed: 2658294
2020-06-07 12:28:57 -07:00
Bapiraju Alla
498953e600 qcacld-3.0: Update rx retry count in peer stats
Currently, Rx retry count statistic is not supported by firmware.
So host driver also not updating the corresponding statistic in
peer stats. Datapth is updating this counter using retry bit in the
rx MPDU. Update peer Rx retry count value from data path.

Change-Id: I4fd422faa7a766090991c461cd6fd2cc70d2fcc3
CRs-Fixed: 2691704
2020-06-01 23:13:20 -07:00
Utkarsh Bhatnagar
0deba7575b qcacld-3.0: Clean up wlan_sap_set_vht_ch_width
Remove wlan_sap_set_vht_ch_width as it wasn't
used anywhere.

Change-Id: I556269bfeb4df243720397a6ad2500b90bc8835d
CRs-Fixed: 2695940
2020-05-28 17:28:44 -07:00
Liangwei Dong
1e9d981107 qcacld-3.0: Sync csr_roamProfile.ch_params with sap ctx
The mhz_freq_seg0 & mhz_freq_seg1 fields are not assigned
with values from sap ctx.
Fix by copy the whole the struct of "ch_params" to
csr_roamProfile.ch_params instead of one by one.

Change-Id: I92d7bc6ddeed1038597c7639d41fca059bf13457
CRs-Fixed: 2688693
2020-05-20 10:07:33 +08:00
Jia Ding
30531d5a10 qcacld-3.0: Properly populate struct csr_del_sta_params
eCsrForcedDeauthSta equals to 14 and as far as reason
codes are concerned, it is MIC_FAILURE. It is observed
that when wlan is configured as SAP-SAP DBS with same
SSID and same encryption WPA2/WPA3 mixed mode, it leads
to an IOT issue where clients with iOS 13 in particular
are not able to auto reconnect back after wlan is restarted.

Thus populate subtype to IEEE80211_STYPE_DEAUTH >> 4 and
reason_code to WLAN_REASON_DEAUTH_LEAVING as defined in
kernel since station_del_parameters is a kernel defined
structure.

Also correct internal use of subtype since right shift
4 for SIR_MAC_MGMT_DEAUTH and SIR_MAC_MGMT_DISASSOC
will always end up with value 0.

Change-Id: I60aa5ed4e7b672b7a92f05ad322fcb48ab0526d4
CRs-Fixed: 2678637
2020-05-15 10:41:25 -07:00
Lincoln Tran
9faaae1bb7 qcacld-3.0: Cleanup instances of CFG_COUNTRY_CODE
Remove instances of CFG_COUNTRY_CODE and country_code from
wlan_mlme_reg struct.
Remove redundant country code APIs.

This change is needed because the country code is no longer
stored in CFG file, and subsequently, there is no need for
CFG_COUNTRY_CODE.

Change-Id: Ia4b3b40d0dccfde696352967f2902dfba344a445
CRs-Fixed: 2634079
2020-05-08 18:50:54 -07:00
Liangwei Dong
06109080e9 qcacld-3.0: Correct 160MHz SAP dfs flag
Use wlan_reg_get_channel_state_for_freq API to get channel
state and identify 6Ghz channel as non-dfs channel.

Change-Id: Ib134a71c62e24324abc12e5a5b11a524e89de810
CRs-Fixed: 2681608
2020-05-08 16:40:04 +08:00
gaurank kathpalia
e423549d8e qcacld-3.0: Add support for DFS channel weightage in ACS
Add support to provide the channel weightage of
DFS channels so that the weight can be configured
and the user can control whether they are allowed
to be selected for the SAP.

Change-Id: I53a22a0059d56aa8fca66215fed1ed0588db7db5
CRs-Fixed: 2676919
2020-05-07 11:24:02 -07:00
Utkarsh Bhatnagar
767aabd6e1 qcacld-3.0: Corrected logging in sap_fsm_state_init
The log signifying SAP failure was incorrectly printed.
Changed the logic to print those logs correctly

Change-Id: Ifc26b34f41c60a3ce50d9c7cfc4ecd0739853844
CRs-Fixed: 2680263
2020-05-07 08:44:07 -07:00
Lincoln Tran
92ab495e37 qcacld-3.0: Fix potential NULL pointer dereference
Add check to ensure context pointer is not NULL before dereferencing

Change-Id: I737ae4d1e5aa07bcbbe612a93905a23fa857b90a
CRs-fixed: 2669214
2020-05-02 04:27:13 -07:00
Utkarsh Bhatnagar
a07afa12be qcacld-3.0: Increased logging in wlan_hdd_cfg80211_channel_switch
Added debig logs in __wlan_hdd_cfg80211_channel_switch and in
wlansap_set_channel_change_with_csa

Change-Id: Idf0f29f21d879e32a0ad8e1db25fc8360ec36800
CRs-Fixed: 2676407
2020-05-01 08:44:04 -07:00
Liangwei Dong
4c11f80dcb qcacld-3.0: Refine Max chanwidth selection for SAP chanswitch
Remove the calls to wlan_reg_dmn_get_opclass_from_channel API
when SAP is changing channel by ECSA/CSA.
The API accepts channel number and will cause issue when 6GHz
band is supported in target.

Change-Id: Ib6c67417f1a0edae88b5e714e3ed23c589e7eb62
CRs-Fixed: 2676354
2020-05-01 05:14:57 -07:00
hqu
74dd2a91bf qcacld-3.0: Do sap channel switch with 20MHz width in 11a mode
Bring up SAP(2.4G)+SAP(161 channel with 11a mode)+STA mode, when STA
is connected to ref-ap on channel 36, 11a mode SAP will also switch
channel to STA's connected channel due to force scc, it will set
channel width to CH_WIDTH_40MHZ for 11a mode SAP channel switch,
actually 11a mode SAP doesn't support CH_WIDTH_40MHZ, it's wrong and
issue is introduced by
'Change-Id: I709dd35575866b7ec9fddcfb94078f114a78d1a2'.

Fix is to set channel width with 20MHz for 11a mode in function
wlansap_update_csa_channel_params().

Change-Id: I90fea788ff30ef0897c1ba98ad5b4d3c8eec3695
CRs-Fixed: 2623617
2020-04-28 07:32:13 -07:00
Li Feng
865036ff4f qcacld-3.0: Take account of dfs cac state to determine dfs_cac_block_tx
Regarding to the go+sap scc on dfs channel, sap can follow with go
to the same dfs channel, but sap tx is hung.
Since the host set the dfs_cac_block_tx by mistake when ap started,
though the ap skip the cac because the scc go finished the cac
procedure, then dfs_cac_block_tx has no chance to be reset.

The fix is to take account of dfs cac state to determine the proper
dfs_cac_block_tx.

Change-Id: I7a35225711f587b83d2fc381108d7d3f15893867
CRs-Fixed: 2631457
2020-04-27 21:31:50 -07:00
gaurank kathpalia
4d769c247d qcacld-3.0: Use correct hw mode switch reason
Currently the driver uses the reason code
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH for
chanenl switch for P2P-CLI which is same
reason code used for hw mode change in case
of SAP, so after the hw mode is changed the
VDEV-SM does call the callback of SAP CSA
also.

Fix is to use a different reason code for
SAP CSA.

Change-Id: I16b0521d5a21391e642f29e86037f9eb4fd2af62
CRs-Fixed: 2663915
2020-04-18 19:18:40 -07:00
hqu
365520551b qcacld-3.0: Signal chan change event before cac start in chan switch
When detect radar in the process of SAP cac, SAP may choose another
DFS channel to switch and will do cac again, but still indicate
WLAN_SVC_DFS_CAC_START_IND with old DFS channel info to hostapd, it's
wrong. Issue is introduced by
'Change-Id: I0915ee78a97e5f27ce83c31cc673cb8820ae535b', due to this
change it will drop one time eSAP_CHANNEL_CHANGE_EVENT signal before
do cac start on new DFS channel, then operating_chan_freq for
hdd_ap_ctx can't be updated to new DFS channel timely.

Fix is to add one time eSAP_CHANNEL_CHANGE_EVENT signal before do cac
start in the process of channel switch.

Change-Id: I441e32e4ecd356834e66f97f2e2334966f48ec5d
CRs-Fixed: 2663539
2020-04-18 08:05:47 -07:00
gaurank kathpalia
3aae7a3cc0 qcacld-3.0: Ignore CAC if STA already present
Currently the driver sets the CAC required for
SAP if it changes it channel to DFS, it
issues a broadcast deauth to all clients,
which leads to unwanted disconnection, which
can be avoided if any STA if already connected
to an AP on that channel.
This is because there is already active TX going
on that channel, so the SAP need not wait for
CAC time to sense the medium.

Fix is to check whether any STA vdev operating
frequency matches with the target frequency of
the SAP, and if it is true, then do not set the
CAC required to true in SAP's vdev.

Change-Id: I09dbecc1a4625cb51e6095f7579479413e525a74
CRs-Fixed: 2643790
2020-04-14 16:37:41 -07:00
gaurank kathpalia
18aa9fa4a4 qcacld-3.0: Force SAP on default channel
Currently the driver fails the ACS process
if no channel is found suitable for SAP by
ACS and thus hotspot cannot be enabled.

Fix is to force SAP to come up on some
default channel, this behaviour would
be controlled via an ini to that customers
can choose whether to opt for this behaviour
or not.

Change-Id: I8a63cf0c5d42802e33f4ad67a33d148a4da54d2a
CRs-Fixed: 2658297
2020-04-09 21:08:52 -07:00
Pragaspathi Thilagaraj
ae0fb161a4 qcacld-3.0: Remove redundant SAP logs
Remove excessive SAP start/client connection logs.

Change-Id: Idb593c3eee77eb24084eca15ce53a43a3f4060da
CRs-Fixed: 2627367
2020-04-08 11:26:38 -07:00
Sourav Mohapatra
915d9dc8e1 qcacld-3.0: Return success for stop_bss while SAP is in stopping state
If the SAP is already in stopping state and wlansap_stop_bss is invoked
as a part of stop_adapter, it returns error which causes the
stop_adapter not to wait for the vdev to return to proper state.

To avoid this, return success in case of SAP_STOPPING for the event
eSAP_HDD_STOP_INFRA_BSS

Change-Id: I99a2cd0a1d12b8e43fb3e88b6889e1d651633283
CRs-Fixed: 2654042
2020-04-02 23:54:50 -07:00