Search Linux Wireless

Re: [PATCHv2] iwlagn: fix hw-rfkill while the interface is down

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

 



On Mon, 2009-01-19 at 04:10 -0800, Helmut Schaa wrote:
> Currently iwlagn is not able to report hw-killswitch events while the
> interface is down. This has implications on user space tools (like
> NetworkManager) relying on rfkill notifications to bring the interface
> up once the wireless gets enabled through a hw killswitch.
> 
> Thus, enable the device already in iwl_pci_probe instead of iwl_up
> and enable interrups while the interface is down in order to get
> notified about killswitch state changes. The firmware loading is still
> done in iwl_up.
> 
> Signed-off-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
> ---
> 

<...>


> +               if (!test_bit(STATUS_ALIVE, &priv->status)) {

Is this test necessary? If the intention is to get rfkill state updates
when interface is down (and ucode is thus not loaded, and STATUS_ALIVE
thus not set) then this test is not necessary.

> +                       if (hw_rf_kill)
> +                               set_bit(STATUS_RF_KILL_HW, &priv->status);
> +                       else
> +                               clear_bit(STATUS_RF_KILL_HW, &priv->status);
> +                       queue_work(priv->workqueue, &priv->rf_kill);
>                 }
> 
>                 handled |= CSR_INT_BIT_RF_KILL;
> @@ -2158,7 +2161,8 @@ static void iwl_bg_rf_kill(struct work_struct *work)
>                 IWL_DEBUG(IWL_DL_RF_KILL,
>                           "HW and/or SW RF Kill no longer active, restarting "
>                           "device\n");
> -               if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
> +               if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
> +                    test_bit(STATUS_ALIVE, &priv->status))

This ties in with the question above. Above the work is scheduled when
STATUS_ALIVE is not set ... having this test here encourages me to think
that the above test for STATUS_ALIVE is not necessary.

The rest of the patch looks good.

Thank you very much

Reinette



--
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