Search Linux Wireless

Re: [PATCH v2] mac80211: Add radio led trigger

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

 



On Jan 7, 2008 8:45 PM, Ivo van Doorn <ivdoorn@xxxxxxxxx> wrote:
> Some devices have a seperate LED which indicates if the radio is
> enabled or not. This adds a LED trigger to mac80211 where drivers
> can hook into when they are interested in radio status changes.
>
> v2: Check hw.conf.radio_enabled when calling start().
>
>
> Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
>
> ---
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index 1d3d4f3..42499f6 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -1173,6 +1173,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw);
>  extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw);
>  extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw);
>  extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw);
> +extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw);
>  #endif
>  /**
>   * ieee80211_get_tx_led_name - get name of TX LED
> @@ -1212,6 +1213,16 @@ static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
>  #endif
>  }
>
> @@ -651,6 +652,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev,
>         if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) {
>                 local->hw.conf.radio_enabled = !(data->txpower.disabled);
>                 need_reconfig = 1;
> +               ieee80211_led_radio(local, local->hw.conf.radio_enabled);

Not sure but isn't it cleaner to push it to ieee80211_hw_config().
This will cover also ieee80211_open and maybe in the future also
cfg80211
Will it be so bad to call led_radio even the led is already lit?

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