Lines Matching full:local
12 void ieee80211_led_assoc(struct ieee80211_local *local, bool associated) in ieee80211_led_assoc() argument
14 if (!atomic_read(&local->assoc_led_active)) in ieee80211_led_assoc()
17 led_trigger_event(&local->assoc_led, LED_FULL); in ieee80211_led_assoc()
19 led_trigger_event(&local->assoc_led, LED_OFF); in ieee80211_led_assoc()
22 void ieee80211_led_radio(struct ieee80211_local *local, bool enabled) in ieee80211_led_radio() argument
24 if (!atomic_read(&local->radio_led_active)) in ieee80211_led_radio()
27 led_trigger_event(&local->radio_led, LED_FULL); in ieee80211_led_radio()
29 led_trigger_event(&local->radio_led, LED_OFF); in ieee80211_led_radio()
32 void ieee80211_alloc_led_names(struct ieee80211_local *local) in ieee80211_alloc_led_names() argument
34 local->rx_led.name = kasprintf(GFP_KERNEL, "%srx", in ieee80211_alloc_led_names()
35 wiphy_name(local->hw.wiphy)); in ieee80211_alloc_led_names()
36 local->tx_led.name = kasprintf(GFP_KERNEL, "%stx", in ieee80211_alloc_led_names()
37 wiphy_name(local->hw.wiphy)); in ieee80211_alloc_led_names()
38 local->assoc_led.name = kasprintf(GFP_KERNEL, "%sassoc", in ieee80211_alloc_led_names()
39 wiphy_name(local->hw.wiphy)); in ieee80211_alloc_led_names()
40 local->radio_led.name = kasprintf(GFP_KERNEL, "%sradio", in ieee80211_alloc_led_names()
41 wiphy_name(local->hw.wiphy)); in ieee80211_alloc_led_names()
44 void ieee80211_free_led_names(struct ieee80211_local *local) in ieee80211_free_led_names() argument
46 kfree(local->rx_led.name); in ieee80211_free_led_names()
47 kfree(local->tx_led.name); in ieee80211_free_led_names()
48 kfree(local->assoc_led.name); in ieee80211_free_led_names()
49 kfree(local->radio_led.name); in ieee80211_free_led_names()
54 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_tx_led_activate() local
58 atomic_inc(&local->tx_led_active); in ieee80211_tx_led_activate()
65 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_tx_led_deactivate() local
69 atomic_dec(&local->tx_led_active); in ieee80211_tx_led_deactivate()
74 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_rx_led_activate() local
78 atomic_inc(&local->rx_led_active); in ieee80211_rx_led_activate()
85 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_rx_led_deactivate() local
89 atomic_dec(&local->rx_led_active); in ieee80211_rx_led_deactivate()
94 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_assoc_led_activate() local
98 atomic_inc(&local->assoc_led_active); in ieee80211_assoc_led_activate()
105 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_assoc_led_deactivate() local
109 atomic_dec(&local->assoc_led_active); in ieee80211_assoc_led_deactivate()
114 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_radio_led_activate() local
118 atomic_inc(&local->radio_led_active); in ieee80211_radio_led_activate()
125 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_radio_led_deactivate() local
129 atomic_dec(&local->radio_led_active); in ieee80211_radio_led_deactivate()
134 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_tpt_led_activate() local
138 atomic_inc(&local->tpt_led_active); in ieee80211_tpt_led_activate()
145 struct ieee80211_local *local = container_of(led_cdev->trigger, in ieee80211_tpt_led_deactivate() local
149 atomic_dec(&local->tpt_led_active); in ieee80211_tpt_led_deactivate()
152 void ieee80211_led_init(struct ieee80211_local *local) in ieee80211_led_init() argument
154 atomic_set(&local->rx_led_active, 0); in ieee80211_led_init()
155 local->rx_led.activate = ieee80211_rx_led_activate; in ieee80211_led_init()
156 local->rx_led.deactivate = ieee80211_rx_led_deactivate; in ieee80211_led_init()
157 if (local->rx_led.name && led_trigger_register(&local->rx_led)) { in ieee80211_led_init()
158 kfree(local->rx_led.name); in ieee80211_led_init()
159 local->rx_led.name = NULL; in ieee80211_led_init()
162 atomic_set(&local->tx_led_active, 0); in ieee80211_led_init()
163 local->tx_led.activate = ieee80211_tx_led_activate; in ieee80211_led_init()
164 local->tx_led.deactivate = ieee80211_tx_led_deactivate; in ieee80211_led_init()
165 if (local->tx_led.name && led_trigger_register(&local->tx_led)) { in ieee80211_led_init()
166 kfree(local->tx_led.name); in ieee80211_led_init()
167 local->tx_led.name = NULL; in ieee80211_led_init()
170 atomic_set(&local->assoc_led_active, 0); in ieee80211_led_init()
171 local->assoc_led.activate = ieee80211_assoc_led_activate; in ieee80211_led_init()
172 local->assoc_led.deactivate = ieee80211_assoc_led_deactivate; in ieee80211_led_init()
173 if (local->assoc_led.name && led_trigger_register(&local->assoc_led)) { in ieee80211_led_init()
174 kfree(local->assoc_led.name); in ieee80211_led_init()
175 local->assoc_led.name = NULL; in ieee80211_led_init()
178 atomic_set(&local->radio_led_active, 0); in ieee80211_led_init()
179 local->radio_led.activate = ieee80211_radio_led_activate; in ieee80211_led_init()
180 local->radio_led.deactivate = ieee80211_radio_led_deactivate; in ieee80211_led_init()
181 if (local->radio_led.name && led_trigger_register(&local->radio_led)) { in ieee80211_led_init()
182 kfree(local->radio_led.name); in ieee80211_led_init()
183 local->radio_led.name = NULL; in ieee80211_led_init()
186 atomic_set(&local->tpt_led_active, 0); in ieee80211_led_init()
187 if (local->tpt_led_trigger) { in ieee80211_led_init()
188 local->tpt_led.activate = ieee80211_tpt_led_activate; in ieee80211_led_init()
189 local->tpt_led.deactivate = ieee80211_tpt_led_deactivate; in ieee80211_led_init()
190 if (led_trigger_register(&local->tpt_led)) { in ieee80211_led_init()
191 kfree(local->tpt_led_trigger); in ieee80211_led_init()
192 local->tpt_led_trigger = NULL; in ieee80211_led_init()
197 void ieee80211_led_exit(struct ieee80211_local *local) in ieee80211_led_exit() argument
199 if (local->radio_led.name) in ieee80211_led_exit()
200 led_trigger_unregister(&local->radio_led); in ieee80211_led_exit()
201 if (local->assoc_led.name) in ieee80211_led_exit()
202 led_trigger_unregister(&local->assoc_led); in ieee80211_led_exit()
203 if (local->tx_led.name) in ieee80211_led_exit()
204 led_trigger_unregister(&local->tx_led); in ieee80211_led_exit()
205 if (local->rx_led.name) in ieee80211_led_exit()
206 led_trigger_unregister(&local->rx_led); in ieee80211_led_exit()
208 if (local->tpt_led_trigger) { in ieee80211_led_exit()
209 led_trigger_unregister(&local->tpt_led); in ieee80211_led_exit()
210 kfree(local->tpt_led_trigger); in ieee80211_led_exit()
216 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_radio_led_name() local
218 return local->radio_led.name; in __ieee80211_get_radio_led_name()
224 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_assoc_led_name() local
226 return local->assoc_led.name; in __ieee80211_get_assoc_led_name()
232 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_tx_led_name() local
234 return local->tx_led.name; in __ieee80211_get_tx_led_name()
240 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_get_rx_led_name() local
242 return local->rx_led.name; in __ieee80211_get_rx_led_name()
246 static unsigned long tpt_trig_traffic(struct ieee80211_local *local, in tpt_trig_traffic() argument
261 struct ieee80211_local *local = tpt_trig->local; in tpt_trig_timer() local
270 tpt = tpt_trig_traffic(local, tpt_trig); in tpt_trig_timer()
285 led_trigger_blink(&local->tpt_led, &on, &off); in tpt_trig_timer()
294 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_create_tpt_led_trigger() local
297 if (WARN_ON(local->tpt_led_trigger)) in __ieee80211_create_tpt_led_trigger()
305 "%stpt", wiphy_name(local->hw.wiphy)); in __ieee80211_create_tpt_led_trigger()
307 local->tpt_led.name = tpt_trig->name; in __ieee80211_create_tpt_led_trigger()
312 tpt_trig->local = local; in __ieee80211_create_tpt_led_trigger()
316 local->tpt_led_trigger = tpt_trig; in __ieee80211_create_tpt_led_trigger()
322 static void ieee80211_start_tpt_led_trig(struct ieee80211_local *local) in ieee80211_start_tpt_led_trig() argument
324 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in ieee80211_start_tpt_led_trig()
330 tpt_trig_traffic(local, tpt_trig); in ieee80211_start_tpt_led_trig()
337 static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local) in ieee80211_stop_tpt_led_trig() argument
339 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in ieee80211_stop_tpt_led_trig()
347 led_trigger_event(&local->tpt_led, LED_OFF); in ieee80211_stop_tpt_led_trig()
350 void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local, in ieee80211_mod_tpt_led_trig() argument
353 struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger; in ieee80211_mod_tpt_led_trig()
373 ieee80211_stop_tpt_led_trig(local); in ieee80211_mod_tpt_led_trig()
375 ieee80211_start_tpt_led_trig(local); in ieee80211_mod_tpt_led_trig()