Lines Matching refs:wiphy

18 static struct wiphy *common_wiphy;
139 static void virt_wifi_inform_bss(struct wiphy *wiphy)
153 informed_bss = cfg80211_inform_bss(wiphy, &channel_5ghz,
159 cfg80211_put_bss(wiphy, informed_bss);
163 static int virt_wifi_scan(struct wiphy *wiphy,
166 struct virt_wifi_wiphy_priv *priv = wiphy_priv(wiphy);
168 wiphy_debug(wiphy, "scan\n");
185 struct wiphy *wiphy = priv_to_wiphy(priv);
188 virt_wifi_inform_bss(wiphy);
196 static void virt_wifi_cancel_scan(struct wiphy *wiphy)
198 struct virt_wifi_wiphy_priv *priv = wiphy_priv(wiphy);
223 static int virt_wifi_connect(struct wiphy *wiphy, struct net_device *netdev,
239 virt_wifi_inform_bss(wiphy);
243 wiphy_debug(wiphy, "connect\n");
288 static int virt_wifi_disconnect(struct wiphy *wiphy, struct net_device *netdev,
296 wiphy_debug(wiphy, "disconnect\n");
307 static int virt_wifi_get_station(struct wiphy *wiphy, struct net_device *dev,
312 wiphy_debug(wiphy, "get_station\n");
332 static int virt_wifi_dump_station(struct wiphy *wiphy, struct net_device *dev,
337 wiphy_debug(wiphy, "dump_station\n");
343 return virt_wifi_get_station(wiphy, dev, fake_router_bssid, sinfo);
357 static struct wiphy *virt_wifi_make_wiphy(void)
359 struct wiphy *wiphy;
363 wiphy = wiphy_new(&virt_wifi_cfg80211_ops, sizeof(*priv));
365 if (!wiphy)
368 wiphy->max_scan_ssids = 4;
369 wiphy->max_scan_ie_len = 1000;
370 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
372 wiphy->bands[NL80211_BAND_2GHZ] = &band_2ghz;
373 wiphy->bands[NL80211_BAND_5GHZ] = &band_5ghz;
374 wiphy->bands[NL80211_BAND_60GHZ] = NULL;
376 wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
378 priv = wiphy_priv(wiphy);
383 err = wiphy_register(wiphy);
385 wiphy_free(wiphy);
389 return wiphy;
393 static void virt_wifi_destroy_wiphy(struct wiphy *wiphy)
397 WARN(!wiphy, "%s called with null wiphy", __func__);
398 if (!wiphy)
401 priv = wiphy_priv(wiphy);
403 virt_wifi_cancel_scan(wiphy);
405 if (wiphy->registered)
406 wiphy_unregister(wiphy);
407 wiphy_free(wiphy);
445 virt_wifi_cancel_scan(dev->ieee80211_ptr->wiphy);
551 dev->ieee80211_ptr->wiphy = common_wiphy;
593 virt_wifi_cancel_scan(dev->ieee80211_ptr->wiphy);
605 /* Deleting the wiphy is handled in the module destructor. */
685 /* Will delete any devices that depend on the wiphy. */