Lines Matching refs:local

25 	struct ieee802154_local *local = from_tasklet(local, t, tasklet);
28 while ((skb = skb_dequeue(&local->skb_queue))) {
35 ieee802154_rx(local, skb);
50 struct ieee802154_local *local;
75 priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
85 local = wpan_phy_priv(phy);
86 local->phy = phy;
87 local->hw.phy = local->phy;
88 local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN);
89 local->ops = ops;
91 INIT_LIST_HEAD(&local->interfaces);
92 INIT_LIST_HEAD(&local->rx_beacon_list);
93 INIT_LIST_HEAD(&local->rx_mac_cmd_list);
94 mutex_init(&local->iflist_mtx);
96 tasklet_setup(&local->tasklet, ieee802154_tasklet_handler);
98 skb_queue_head_init(&local->skb_queue);
100 INIT_WORK(&local->sync_tx_work, ieee802154_xmit_sync_worker);
101 INIT_DELAYED_WORK(&local->scan_work, mac802154_scan_worker);
102 INIT_WORK(&local->rx_beacon_work, mac802154_rx_beacon_worker);
103 INIT_DELAYED_WORK(&local->beacon_work, mac802154_beacon_worker);
104 INIT_WORK(&local->rx_mac_cmd_work, mac802154_rx_mac_cmd_worker);
106 init_completion(&local->assoc_done);
120 return &local->hw;
171 struct ieee802154_local *local = hw_to_local(hw);
173 BUG_ON(!list_empty(&local->interfaces));
175 mutex_destroy(&local->iflist_mtx);
177 wpan_phy_free(local->phy);
195 struct ieee802154_local *local = hw_to_local(hw);
200 local->workqueue =
201 create_singlethread_workqueue(wpan_phy_name(local->phy));
202 if (!local->workqueue) {
207 snprintf(mac_wq_name, IFNAMSIZ + 10, "%s-mac-cmds", wpan_phy_name(local->phy));
208 local->mac_wq = create_singlethread_workqueue(mac_wq_name);
209 if (!local->mac_wq) {
214 hrtimer_init(&local->ifs_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
215 local->ifs_timer.function = ieee802154_xmit_ifs_timer;
217 wpan_phy_set_dev(local->phy, local->hw.parent);
219 ieee802154_setup_wpan_phy_pib(local->phy);
221 ieee802154_configure_durations(local->phy, local->phy->current_page,
222 local->phy->current_channel);
225 local->phy->supported.min_csma_backoffs = 4;
226 local->phy->supported.max_csma_backoffs = 4;
227 local->phy->supported.min_maxbe = 5;
228 local->phy->supported.max_maxbe = 5;
229 local->phy->supported.min_minbe = 3;
230 local->phy->supported.max_minbe = 3;
234 local->phy->supported.min_frame_retries = 3;
235 local->phy->supported.max_frame_retries = 3;
239 local->phy->supported.iftypes |= BIT(NL802154_IFTYPE_MONITOR);
241 rc = wpan_phy_register(local->phy);
247 dev = ieee802154_if_add(local, "wpan%d", NET_NAME_ENUM,
261 wpan_phy_unregister(local->phy);
263 destroy_workqueue(local->mac_wq);
265 destroy_workqueue(local->workqueue);
273 struct ieee802154_local *local = hw_to_local(hw);
275 tasklet_kill(&local->tasklet);
276 flush_workqueue(local->workqueue);
280 ieee802154_remove_interfaces(local);
284 destroy_workqueue(local->mac_wq);
285 destroy_workqueue(local->workqueue);
286 wpan_phy_unregister(local->phy);