qcacld-3.0: Restart SAP if current channel is disabled
Currently when host receives disable channels command, it disables the channels and if SAP is on it checks if SAP is on one of the disabled channels in that case host stops the SAP. Based on current requirement host should restart the SAP, with this change add support to restart the SAP if it is operating on disabled channel. Change-Id: I89ce21a8707e2c0af0737116b883be13503044e0 CRs-Fixed: 2885308
This commit is contained in:

committed by
snandini

parent
2b0d248fd6
commit
520ebc7a41
@@ -6616,19 +6616,18 @@ static bool check_disable_channels(struct hdd_context *hdd_ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* disconnect_sta_and_stop_sap() - Disconnect STA and stop SAP
|
* disconnect_sta_and_restart_sap() - Disconnect STA and restart SAP
|
||||||
*
|
*
|
||||||
* @hdd_ctx: Pointer to hdd context
|
* @hdd_ctx: Pointer to hdd context
|
||||||
* @reason: Disconnect reason code as per @enum wlan_reason_code
|
* @reason: Disconnect reason code as per @enum wlan_reason_code
|
||||||
*
|
*
|
||||||
* Disable channels provided by user and disconnect STA if it is
|
* Disable channels provided by user and disconnect STA if it is
|
||||||
* connected to any AP, stop SAP and send deauthentication request
|
* connected to any AP, restart SAP.
|
||||||
* to STAs connected to SAP.
|
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
static void disconnect_sta_and_stop_sap(struct hdd_context *hdd_ctx,
|
static void disconnect_sta_and_restart_sap(struct hdd_context *hdd_ctx,
|
||||||
enum wlan_reason_code reason)
|
enum wlan_reason_code reason)
|
||||||
{
|
{
|
||||||
struct hdd_adapter *adapter, *next = NULL;
|
struct hdd_adapter *adapter, *next = NULL;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
@@ -6647,7 +6646,8 @@ static void disconnect_sta_and_stop_sap(struct hdd_context *hdd_ctx,
|
|||||||
hdd_ctx->pdev,
|
hdd_ctx->pdev,
|
||||||
adapter->session.ap.operating_chan_freq);
|
adapter->session.ap.operating_chan_freq);
|
||||||
if (check_disable_channels(hdd_ctx, ap_ch))
|
if (check_disable_channels(hdd_ctx, ap_ch))
|
||||||
wlan_hdd_stop_sap(adapter);
|
policy_mgr_check_sap_restart(hdd_ctx->psoc,
|
||||||
|
adapter->vdev_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = hdd_get_next_adapter(hdd_ctx, adapter, &next);
|
status = hdd_get_next_adapter(hdd_ctx, adapter, &next);
|
||||||
@@ -6834,8 +6834,9 @@ mem_alloc_failed:
|
|||||||
ret = wlan_hdd_disable_channels(hdd_ctx);
|
ret = wlan_hdd_disable_channels(hdd_ctx);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
disconnect_sta_and_stop_sap(hdd_ctx,
|
disconnect_sta_and_restart_sap(
|
||||||
REASON_OPER_CHANNEL_BAND_CHANGE);
|
hdd_ctx,
|
||||||
|
REASON_OPER_CHANNEL_BAND_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
hdd_exit();
|
hdd_exit();
|
||||||
|
Reference in New Issue
Block a user