Search Linux Wireless

Re: [PATCH 04/13] iwlwifi: cancel scan when down the device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gruszka,

On Fri, 2010-09-03 at 04:57 -0700, Stanislaw Gruszka wrote:
> Always cancel scan when stooping device and scan is currently pending,
> we should newer have scan running after down device.
> 
> To assure we start scan cancel from restart work we have to schedule
> abort_scan to different workqueue than priv->workqueue.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
> ---
>  drivers/net/wireless/iwlwifi/iwl-agn.c      |   14 +++-----------
>  drivers/net/wireless/iwlwifi/iwl-scan.c     |    2 +-
>  drivers/net/wireless/iwlwifi/iwl3945-base.c |   16 ++++------------
>  3 files changed, 8 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
> index ad0e67f..0de2401 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
> @@ -2875,8 +2875,9 @@ static void __iwl_down(struct iwl_priv *priv)
>  
>  	IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n");
>  
> -	if (!exit_pending)
> -		set_bit(STATUS_EXIT_PENDING, &priv->status);
> +	iwl_scan_cancel_timeout(priv, 200);
> +
> +	exit_pending = test_and_set_bit(STATUS_EXIT_PENDING, &priv->status);
>  
>  	/* Stop TX queues watchdog. We need to have STATUS_EXIT_PENDING bit set
>  	 * to prevent rearm timer */
> @@ -3486,15 +3487,6 @@ static void iwl_mac_stop(struct ieee80211_hw *hw)
>  
>  	priv->is_open = 0;
>  
> -	if (iwl_is_ready_rf(priv) || test_bit(STATUS_SCAN_HW, &priv->status)) {
> -		/* stop mac, cancel any scan request and clear
> -		 * RXON_FILTER_ASSOC_MSK BIT
> -		 */
> -		mutex_lock(&priv->mutex);
> -		iwl_scan_cancel_timeout(priv, 100);
> -		mutex_unlock(&priv->mutex);
> -	}
> -
>  	iwl_down(priv);

I see you remove the "mutex" here, not needed?

Wey


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux