mirror of
https://github.com/gnab/rtl8812au
synced 2025-01-08 01:24:20 +00:00
Merge pull request #102 from nbartos/led
Add module parameter for status LED.
This commit is contained in:
commit
279e633007
@ -4704,3 +4704,18 @@ DeInitLed(
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
rtw_led_control(
|
||||
_adapter *adapter,
|
||||
LED_CTL_MODE LedAction
|
||||
)
|
||||
{
|
||||
if (adapter->registrypriv.led_enable)
|
||||
{
|
||||
do
|
||||
{
|
||||
(adapter)->ledpriv.LedControlHandler((adapter), (LedAction));
|
||||
}
|
||||
while(0);
|
||||
}
|
||||
}
|
||||
|
@ -309,6 +309,10 @@ struct registry_priv
|
||||
#ifdef CONFIG_MULTI_VIR_IFACES
|
||||
u8 ext_iface_num;//primary/secondary iface is excluded
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
u8 led_enable;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -337,11 +337,7 @@ struct led_priv{
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
#define rtw_led_control(adapter, LedAction) \
|
||||
do { \
|
||||
if((adapter)->ledpriv.LedControlHandler) \
|
||||
(adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \
|
||||
} while(0)
|
||||
void rtw_led_control(_adapter *adapter, LED_CTL_MODE LedAction);
|
||||
#else //CONFIG_SW_LED
|
||||
#define rtw_led_control(adapter, LedAction)
|
||||
#endif //CONFIG_SW_LED
|
||||
|
@ -301,6 +301,12 @@ uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
module_param(rtw_notch_filter, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P");
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
int rtw_led_enable = 1;
|
||||
module_param(rtw_led_enable, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_led_enable,"Enable status LED");
|
||||
#endif //CONFIG_SW_LED
|
||||
|
||||
static uint loadparam(PADAPTER padapter, _nic_hdl pnetdev);
|
||||
int _netdev_open(struct net_device *pnetdev);
|
||||
int netdev_open (struct net_device *pnetdev);
|
||||
@ -926,6 +932,10 @@ _func_enter_;
|
||||
registry_par->ext_iface_num = (u8)rtw_ext_iface_num;
|
||||
#endif //CONFIG_MULTI_VIR_IFACES
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
registry_par->led_enable = (u8)rtw_led_enable;
|
||||
#endif //CONFIG_SW_LED
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user