void wlanUnregisterNotifier(void) { unregister_inetaddr_notifier(&inetaddr_notifier); #if 0 //CFG_SUPPORT_PASSPOINT unregister_inetaddr_notifier(&inet6addr_notifier); #endif /* CFG_SUPPORT_PASSPOINT */ }
void ssh_interceptor_iface_uninit(SshInterceptor interceptor) { /* Clear interface table and release net_device references. */ ssh_interceptor_clear_ifaces(interceptor); if (interceptor->nf->iface_notifiers_installed == FALSE) return; SSH_ASSERT(in_softirq()); local_bh_enable(); SSH_ASSERT(!in_softirq()); /* Unregister notifier callback */ unregister_netdevice_notifier(&interceptor->nf->notifier_netdev); unregister_inetaddr_notifier(&interceptor->nf->notifier_inetaddr); #ifdef SSH_LINUX_INTERCEPTOR_IPV6 unregister_inet6addr_notifier(&interceptor->nf->notifier_inet6addr); #endif /* SSH_LINUX_INTERCEPTOR_IPV6 */ local_bh_disable(); /* Due to lack of proper locking in linux kernel notifier code, the unregister_*_notifier functions might leave the notifier blocks out of sync, resulting in that the kernel may call an unregistered notifier function. Sleep for a while to decrease the possibility of the bug causing trouble (crash during module unloading). */ mdelay(500); interceptor->nf->iface_notifiers_installed = FALSE; }
void wlanUnregisterNotifier(void) { unregister_inetaddr_notifier(&inetaddr_notifier); #if CFG_SUPPORT_HOTSPOT_2_0 //unregister_inetaddr_notifier(&inet6addr_notifier); #endif }
void ieee80211_unregister_hw(struct ieee80211_hw *hw) { struct ieee80211_local *local = hw_to_local(hw); tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY, &local->network_latency_notifier); #ifdef CONFIG_INET unregister_inetaddr_notifier(&local->ifa_notifier); #endif rtnl_lock(); /* * At this point, interface list manipulations are fine * because the driver cannot be handing us frames any * more and the tasklet is killed. */ ieee80211_remove_interfaces(local); rtnl_unlock(); /* * Now all work items will be gone, but the * timer might still be armed, so delete it */ del_timer_sync(&local->work_timer); cancel_work_sync(&local->restart_work); cancel_work_sync(&local->reconfig_filter); ieee80211_clear_tx_pending(local); sta_info_stop(local); rate_control_deinitialize(local); if (skb_queue_len(&local->skb_queue) || skb_queue_len(&local->skb_queue_unreliable)) wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); skb_queue_purge(&local->skb_queue); skb_queue_purge(&local->skb_queue_unreliable); skb_queue_purge(&local->rx_skb_queue); destroy_workqueue(local->workqueue); wiphy_unregister(local->hw.wiphy); ieee80211_wep_free(local); ieee80211_led_exit(local); kfree(local->int_scan_req); }
void brcmf_detach(struct device *dev) { s32 i; struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_pub *drvr = bus_if->drvr; brcmf_dbg(TRACE, "Enter\n"); if (drvr == NULL) return; #ifdef CONFIG_INET unregister_inetaddr_notifier(&drvr->inetaddr_notifier); #endif #if IS_ENABLED(CONFIG_IPV6) unregister_inet6addr_notifier(&drvr->inet6addr_notifier); #endif /* stop firmware event handling */ brcmf_fweh_detach(drvr); if (drvr->config) brcmf_p2p_detach(&drvr->config->p2p); brcmf_bus_change_state(bus_if, BRCMF_BUS_DOWN); /* make sure primary interface removed last */ for (i = BRCMF_MAX_IFS-1; i > -1; i--) brcmf_remove_interface(drvr->iflist[i], false); brcmf_cfg80211_detach(drvr->config); brcmf_fws_deinit(drvr); brcmf_bus_detach(drvr); brcmf_proto_detach(drvr); brcmf_debug_detach(drvr); bus_if->drvr = NULL; kfree(drvr); }
void wlanUnregisterNotifier(void) { unregister_inetaddr_notifier(&inetaddr_notifier); }
int brcmf_bus_start(struct device *dev) { int ret = -1; struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_pub *drvr = bus_if->drvr; struct brcmf_if *ifp; struct brcmf_if *p2p_ifp; brcmf_dbg(TRACE, "\n"); /* add primary networking interface */ ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d", NULL); if (IS_ERR(ifp)) return PTR_ERR(ifp); p2p_ifp = NULL; /* signal bus ready */ brcmf_bus_change_state(bus_if, BRCMF_BUS_UP); /* Bus is ready, do any initialization */ ret = brcmf_c_preinit_dcmds(ifp); if (ret < 0) goto fail; brcmf_debugfs_add_entry(drvr, "revinfo", brcmf_revinfo_read); /* assure we have chipid before feature attach */ if (!bus_if->chip) { bus_if->chip = drvr->revinfo.chipnum; bus_if->chiprev = drvr->revinfo.chiprev; brcmf_dbg(INFO, "firmware revinfo: chip %x (%d) rev %d\n", bus_if->chip, bus_if->chip, bus_if->chiprev); } brcmf_feat_attach(drvr); ret = brcmf_fws_init(drvr); if (ret < 0) goto fail; brcmf_fws_add_interface(ifp); drvr->config = brcmf_cfg80211_attach(drvr, bus_if->dev, drvr->settings->p2p_enable); if (drvr->config == NULL) { ret = -ENOMEM; goto fail; } ret = brcmf_net_attach(ifp, false); if ((!ret) && (drvr->settings->p2p_enable)) { p2p_ifp = drvr->iflist[1]; if (p2p_ifp) ret = brcmf_net_p2p_attach(p2p_ifp); } if (ret) goto fail; #ifdef CONFIG_INET drvr->inetaddr_notifier.notifier_call = brcmf_inetaddr_changed; ret = register_inetaddr_notifier(&drvr->inetaddr_notifier); if (ret) goto fail; #if IS_ENABLED(CONFIG_IPV6) drvr->inet6addr_notifier.notifier_call = brcmf_inet6addr_changed; ret = register_inet6addr_notifier(&drvr->inet6addr_notifier); if (ret) { unregister_inetaddr_notifier(&drvr->inetaddr_notifier); goto fail; } #endif #endif /* CONFIG_INET */ return 0; fail: brcmf_err("failed: %d\n", ret); if (drvr->config) { brcmf_cfg80211_detach(drvr->config); drvr->config = NULL; } if (drvr->fws) { brcmf_fws_del_interface(ifp); brcmf_fws_deinit(drvr); } if (ifp) brcmf_net_detach(ifp->ndev, false); if (p2p_ifp) brcmf_net_detach(p2p_ifp->ndev, false); drvr->iflist[0] = NULL; drvr->iflist[1] = NULL; if (drvr->settings->ignore_probe_fail) ret = 0; return ret; }