mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
mac80211: Add radio led trigger
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@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
df26e7ea04
commit
cdcb006fbe
6 changed files with 78 additions and 2 deletions
|
@ -1143,6 +1143,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
|
||||
|
@ -1182,6 +1183,16 @@ static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* ieee80211_get_assoc_led_name - get name of association LED
|
||||
*
|
||||
* mac80211 creates a association LED trigger for each wireless hardware
|
||||
* that can be used to drive LEDs if your driver registers a LED device.
|
||||
* This function returns the name (or %NULL if not configured for LEDs)
|
||||
* of the trigger so you can automatically link the LED device.
|
||||
*
|
||||
* @hw: the hardware to get the LED trigger name for
|
||||
*/
|
||||
static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
|
||||
{
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
|
@ -1191,6 +1202,24 @@ static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* ieee80211_get_radio_led_name - get name of radio LED
|
||||
*
|
||||
* mac80211 creates a radio change LED trigger for each wireless hardware
|
||||
* that can be used to drive LEDs if your driver registers a LED device.
|
||||
* This function returns the name (or %NULL if not configured for LEDs)
|
||||
* of the trigger so you can automatically link the LED device.
|
||||
*
|
||||
* @hw: the hardware to get the LED trigger name for
|
||||
*/
|
||||
static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
|
||||
{
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
return __ieee80211_get_radio_led_name(hw);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Register a new hardware PHYMODE capability to the stack. */
|
||||
int ieee80211_register_hwmode(struct ieee80211_hw *hw,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue