mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Stop SAP if all channels are disabled
User disables all the channels when the SAP is in operation, and policy manager restart sap functionality cannot get any valid channels and SAP also doesn't stop. Later, kernel stops the SAP, since it is operating on an invalid channel. To fix this, restart the SAP on a valid channel only if atleast one valid channel is available. Otherwise, stop the SAP instead of waiting for kernel to stop the SAP. CRs-Fixed: 3617706 Change-Id: Ia613b8e9585ff19aae9bf97ea5d0fc230ae41c5f
This commit is contained in:
parent
541869fab1
commit
95bf309c3e
1 changed files with 12 additions and 1 deletions
|
|
@ -6634,17 +6634,28 @@ static void disconnect_sta_and_restart_sap(struct hdd_context *hdd_ctx,
|
|||
{
|
||||
struct hdd_adapter *adapter, *next = NULL;
|
||||
QDF_STATUS status;
|
||||
uint32_t ch_list[NUM_CHANNELS];
|
||||
uint32_t ch_count = 0;
|
||||
bool is_valid_chan_present = true;
|
||||
|
||||
if (!hdd_ctx)
|
||||
return;
|
||||
|
||||
hdd_check_and_disconnect_sta_on_invalid_channel(hdd_ctx, reason);
|
||||
|
||||
status = policy_mgr_get_valid_chans(hdd_ctx->psoc, ch_list, &ch_count);
|
||||
if (QDF_IS_STATUS_ERROR(status) || !ch_count) {
|
||||
hdd_debug("No valid channels present, stop the SAPs");
|
||||
is_valid_chan_present = false;
|
||||
}
|
||||
|
||||
status = hdd_get_front_adapter(hdd_ctx, &adapter);
|
||||
while (adapter && (status == QDF_STATUS_SUCCESS)) {
|
||||
if (!hdd_validate_adapter(adapter) &&
|
||||
adapter->device_mode == QDF_SAP_MODE) {
|
||||
if (check_disable_channels(
|
||||
if (!is_valid_chan_present)
|
||||
wlan_hdd_stop_sap(adapter);
|
||||
else if (check_disable_channels(
|
||||
hdd_ctx,
|
||||
adapter->session.ap.operating_chan_freq))
|
||||
policy_mgr_check_sap_restart(hdd_ctx->psoc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue