Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c7969c7 authored by Ashish Kumar Dhanotiya's avatar Ashish Kumar Dhanotiya
Browse files

wlan: Free cached channel list with restore channels

When driver receives the command to disable the channels
it maintains a list of the channels which are disabled.
During SAP stop, driver restores the disabled channels
but it is not freeing the cache list. Now when again the
command is issued to disable the channels, driver is not
processing this command as it still has the channels in its
cached list which were disabled during previous command.
This results into failure of current command and all the
subsequent commands to disable the channels until the
cache list is not cleared with set_disable_channel_list
command with empty channel list.
To address above issue, clear the cache channel list
as soon as driver restores the channels on stop bss.

Change-Id: I6b8c7ba250ef38b892ab83621add45fbfc09a2cd
CRs-fixed: 2712499
parent e45b3858
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2392,4 +2392,12 @@ int hdd_get_disable_ch_list(hdd_context_t *hdd_ctx, tANI_U8 *buf,
 */
bool hdd_is_cli_iface_up(hdd_context_t *hdd_ctx);

/**
 * wlan_hdd_free_cache_channels() - Free the cache channels list
 * @hdd_ctx: Pointer to HDD context
 *
 * Return: None
 */
void wlan_hdd_free_cache_channels(hdd_context_t *hdd_ctx);

#endif    // end #if !defined( WLAN_HDD_MAIN_H )
+6 −0
Original line number Diff line number Diff line
@@ -11069,6 +11069,12 @@ int wlan_hdd_restore_channels(hdd_context_t *hdd_ctx)
	status = sme_update_channel_list((tpAniSirGlobal)hdd_ctx->hHal);
	if (status)
		hddLog(VOS_TRACE_LEVEL_ERROR, "Can't Restore channel list");
	else
		/*
		 * Free the cache channels when the
		 * disabled channels are restored
		 */
		wlan_hdd_free_cache_channels(hdd_ctx);
	EXIT();
	return 0;
+6 −15
Original line number Diff line number Diff line
@@ -3614,14 +3614,7 @@ static inline void hdd_assign_reassoc_handoff(tCsrHandoffRequest *handoffInfo)
}
#endif
/**
 * wlan_hdd_free_cache_channels() - Free the cache channels list
 * @hdd_ctx: Pointer to HDD context
 *
 * Return: None
 */
static void wlan_hdd_free_cache_channels(hdd_context_t *hdd_ctx)
void wlan_hdd_free_cache_channels(hdd_context_t *hdd_ctx)
{
	if(!hdd_ctx || !hdd_ctx->original_channels)
		return;
@@ -3729,13 +3722,11 @@ int hdd_parse_disable_chan_cmd(hdd_adapter_t *adapter, tANI_U8 *ptr)
	       __func__, tempInt);
	if (!tempInt) {
		if (!wlan_hdd_restore_channels(hdd_ctx)) {
		/*
			 * Free the cache channels only when the command is
		 * Restore and Free the cache channels when the command is
		 * received with num channels as 0
		 */
			wlan_hdd_free_cache_channels(hdd_ctx);
		}
		wlan_hdd_restore_channels(hdd_ctx);
		return 0;
	}