return false;
}
-static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
+static int ath6kl_get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
+ struct net_device *dev = wdev->netdev;
struct ath6kl *ar = ath6kl_priv(dev);
struct ath6kl_vif *vif = netdev_priv(dev);
long left;
static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
+static int ath6kl_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params)
{
+ struct net_device *dev = wdev->netdev;
struct ath6kl *ar = ath6kl_priv(dev);
struct ath6kl_vif *vif = netdev_priv(dev);
const u8 *addr = params->mac ? params->mac : bcast_addr;
addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
}
-static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
+static int ath6kl_change_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
+ struct net_device *dev = wdev->netdev;
struct ath6kl *ar = ath6kl_priv(dev);
struct ath6kl_vif *vif = netdev_priv(dev);
int err;
sinfo->assoc_req_ies = ies;
sinfo->assoc_req_ies_len = ies_len;
- cfg80211_new_sta(vif->ndev, mac_addr, sinfo, GFP_KERNEL);
+ cfg80211_new_sta(&vif->wdev, mac_addr, sinfo, GFP_KERNEL);
netif_wake_queue(vif->ndev);
if (!is_broadcast_ether_addr(bssid)) {
/* send event to application */
- cfg80211_del_sta(vif->ndev, bssid, GFP_KERNEL);
+ cfg80211_del_sta(&vif->wdev, bssid, GFP_KERNEL);
}
if (memcmp(vif->ndev->dev_addr, bssid, ETH_ALEN) == 0) {
}
static int wil_cfg80211_get_station(struct wiphy *wiphy,
- struct net_device *ndev,
+ struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
- struct wil6210_vif *vif = ndev_to_vif(ndev);
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+ struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
int rc;
int cid = wil_find_cid(wil, vif->mid, mac);
}
static int wil_cfg80211_dump_station(struct wiphy *wiphy,
- struct net_device *dev, int idx,
+ struct wireless_dev *wdev, int idx,
u8 *mac, struct station_info *sinfo)
{
- struct wil6210_vif *vif = ndev_to_vif(dev);
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+ struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
int rc;
int cid = wil_find_cid_by_idx(wil, vif->mid, idx);
}
static int wil_cfg80211_add_station(struct wiphy *wiphy,
- struct net_device *dev,
+ struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
- struct wil6210_vif *vif = ndev_to_vif(dev);
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+ struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
wil_dbg_misc(wil, "add station %pM aid %d mid %d mask 0x%x set 0x%x\n",
mac, params->aid, vif->mid,
}
static int wil_cfg80211_del_station(struct wiphy *wiphy,
- struct net_device *dev,
+ struct wireless_dev *wdev,
struct station_del_parameters *params)
{
- struct wil6210_vif *vif = ndev_to_vif(dev);
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+ struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
wil_dbg_misc(wil, "del_station: %pM, reason=%d mid=%d\n",
params->mac, params->reason_code, vif->mid);
}
static int wil_cfg80211_change_station(struct wiphy *wiphy,
- struct net_device *dev,
+ struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
- struct wil6210_vif *vif = ndev_to_vif(dev);
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+ struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
int authorize;
int cid, i;
struct wil_ring_tx_data *txdata = NULL;
{
uint i;
struct wil6210_priv *wil = vif_to_wil(vif);
- struct net_device *ndev = vif_to_ndev(vif);
struct wireless_dev *wdev = vif_to_wdev(vif);
struct wil_sta_info *sta = &wil->sta[cid];
int min_ring_id = wil_get_min_tx_ring_id(wil);
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
/* AP-like interface */
- cfg80211_del_sta(ndev, sta->addr, GFP_KERNEL);
+ cfg80211_del_sta(wdev, sta->addr, GFP_KERNEL);
break;
default:
break;
if (rc) {
if (disable_ap_sme)
/* notify new_sta has failed */
- cfg80211_del_sta(ndev, evt->bssid, GFP_KERNEL);
+ cfg80211_del_sta(wdev, evt->bssid, GFP_KERNEL);
goto out;
}
sinfo->assoc_req_ies_len = assoc_req_ielen;
}
- cfg80211_new_sta(ndev, evt->bssid, sinfo, GFP_KERNEL);
+ cfg80211_new_sta(ndev->ieee80211_ptr, evt->bssid, sinfo,
+ GFP_KERNEL);
kfree(sinfo);
} else {
}
static s32
-brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
+brcmf_cfg80211_get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
- struct brcmf_if *ifp = netdev_priv(ndev);
+ struct brcmf_if *ifp = netdev_priv(wdev->netdev);
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_scb_val_le scb_val;
s32 err = 0;
}
static int
-brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
+brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
- struct brcmf_if *ifp = netdev_priv(ndev);
+ struct brcmf_if *ifp = netdev_priv(wdev->netdev);
struct brcmf_pub *drvr = cfg->pub;
s32 err;
}
if (idx < le32_to_cpu(cfg->assoclist.count)) {
memcpy(mac, cfg->assoclist.mac[idx], ETH_ALEN);
- return brcmf_cfg80211_get_station(wiphy, ndev, mac, sinfo);
+ return brcmf_cfg80211_get_station(wiphy, wdev,
+ mac, sinfo);
}
return -ENOENT;
}
}
static int
-brcmf_cfg80211_del_station(struct wiphy *wiphy, struct net_device *ndev,
+brcmf_cfg80211_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_scb_val_le scbval;
+ struct net_device *ndev = wdev->netdev;
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
}
static int
-brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev,
+brcmf_cfg80211_change_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_parameters *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_pub *drvr = cfg->pub;
- struct brcmf_if *ifp = netdev_priv(ndev);
+ struct brcmf_if *ifp = netdev_priv(wdev->netdev);
s32 err;
brcmf_dbg(TRACE, "Enter, MAC %pM, mask 0x%04x set 0x%04x\n", mac,
sinfo->assoc_req_ies_len = e->datalen;
generation++;
sinfo->generation = generation;
- cfg80211_new_sta(ndev, e->addr, sinfo, GFP_KERNEL);
+ cfg80211_new_sta(ndev->ieee80211_ptr, e->addr, sinfo,
+ GFP_KERNEL);
kfree(sinfo);
} else if ((event == BRCMF_E_DISASSOC_IND) ||
(event == BRCMF_E_DEAUTH_IND) ||
(event == BRCMF_E_DEAUTH)) {
- cfg80211_del_sta(ndev, e->addr, GFP_KERNEL);
+ cfg80211_del_sta(ndev->ieee80211_ptr, e->addr, GFP_KERNEL);
}
return 0;
}
* Get station
*/
-static int lbs_cfg_get_station(struct wiphy *wiphy, struct net_device *dev,
+static int lbs_cfg_get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
struct lbs_private *priv = wiphy_priv(wiphy);
* requested station information, if available.
*/
static int
-mwifiex_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+mwifiex_cfg80211_get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
- struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
if (!priv->media_connected)
return -ENOENT;
* CFG802.11 operation handler to dump station information.
*/
static int
-mwifiex_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
+mwifiex_cfg80211_dump_station(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo)
{
- struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
struct mwifiex_sta_node *node;
int i;
* associated stations list, no action is taken.
*/
static int
-mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
+mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params)
{
- struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+ struct mwifiex_private *priv =
+ mwifiex_netdev_get_priv(wdev->netdev);
struct mwifiex_sta_node *sta_node;
u8 deauth_mac[ETH_ALEN];
if (!sinfo)
return -ENOMEM;
- cfg80211_new_sta(priv->netdev, mac, sinfo, GFP_KERNEL);
+ cfg80211_new_sta(priv->netdev->ieee80211_ptr, mac, sinfo,
+ GFP_KERNEL);
kfree(sinfo);
}
}
static int
-mwifiex_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev,
+mwifiex_cfg80211_add_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_parameters *params)
{
- struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
if (priv->adapter->host_mlme_enabled &&
(GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP))
}
static int
-mwifiex_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev,
+mwifiex_cfg80211_change_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
int ret;
- struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
if (priv->adapter->host_mlme_enabled &&
(GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP))
le16_to_cpu(event->len) - (u16)len;
}
}
- cfg80211_new_sta(priv->netdev, event->sta_addr, sinfo,
- GFP_KERNEL);
+ cfg80211_new_sta(priv->netdev->ieee80211_ptr, event->sta_addr,
+ sinfo, GFP_KERNEL);
node = mwifiex_add_sta_entry(priv, event->sta_addr);
if (!node) {
case EVENT_UAP_STA_DEAUTH:
deauth_mac = adapter->event_body +
MWIFIEX_UAP_EVENT_EXTRA_HEADER;
- cfg80211_del_sta(priv->netdev, deauth_mac, GFP_KERNEL);
+ cfg80211_del_sta(priv->netdev->ieee80211_ptr, deauth_mac,
+ GFP_KERNEL);
if (priv->ap_11n_enabled) {
mwifiex_11n_del_rx_reorder_tbl_by_ta(priv, deauth_mac);
return wilc_set_default_mgmt_key_index(vif, key_index);
}
-static int get_station(struct wiphy *wiphy, struct net_device *dev,
+static int get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
+ struct net_device *dev = wdev->netdev;
struct wilc_vif *vif = netdev_priv(dev);
struct wilc_priv *priv = &vif->priv;
struct wilc *wilc = vif->wilc;
return 0;
}
-static int dump_station(struct wiphy *wiphy, struct net_device *dev,
+static int dump_station(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo)
{
- struct wilc_vif *vif = netdev_priv(dev);
+ struct wilc_vif *vif = netdev_priv(wdev->netdev);
int ret;
if (idx != 0)
return ret;
}
-static int add_station(struct wiphy *wiphy, struct net_device *dev,
+static int add_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_parameters *params)
{
int ret = 0;
- struct wilc_vif *vif = netdev_priv(dev);
+ struct wilc_vif *vif = netdev_priv(wdev->netdev);
struct wilc_priv *priv = &vif->priv;
if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
ret = wilc_add_station(vif, mac, params);
if (ret)
- netdev_err(dev, "Host add station fail\n");
+ netdev_err(wdev->netdev, "Host add station fail\n");
}
return ret;
}
-static int del_station(struct wiphy *wiphy, struct net_device *dev,
+static int del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params)
{
const u8 *mac = params->mac;
int ret = 0;
- struct wilc_vif *vif = netdev_priv(dev);
+ struct wilc_vif *vif = netdev_priv(wdev->netdev);
struct wilc_priv *priv = &vif->priv;
struct sta_info *info;
ret = wilc_del_station(vif, mac);
if (ret)
- netdev_err(dev, "Host delete station fail\n");
+ netdev_err(wdev->netdev, "Host delete station fail\n");
return ret;
}
-static int change_station(struct wiphy *wiphy, struct net_device *dev,
+static int change_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_parameters *params)
{
int ret = 0;
- struct wilc_vif *vif = netdev_priv(dev);
-
+ struct wilc_vif *vif = netdev_priv(wdev->netdev);
if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
ret = wilc_edit_station(vif, mac, params);
if (ret)
- netdev_err(dev, "Host edit station fail\n");
+ netdev_err(wdev->netdev, "Host edit station fail\n");
}
return ret;
}
}
static int
-qtnf_get_station(struct wiphy *wiphy, struct net_device *dev,
+qtnf_get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
- struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
sinfo->generation = vif->generation;
return qtnf_cmd_get_sta_info(vif, mac, sinfo);
}
static int
-qtnf_dump_station(struct wiphy *wiphy, struct net_device *dev,
+qtnf_dump_station(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo)
{
- struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
const struct qtnf_sta_node *sta_node;
int ret;
- switch (vif->wdev.iftype) {
+ switch (wdev->iftype) {
case NL80211_IFTYPE_STATION:
- if (idx != 0 || !vif->wdev.connected)
+ if (idx != 0 || !wdev->connected)
return -ENOENT;
ether_addr_copy(mac, vif->bssid);
ret = qtnf_cmd_get_sta_info(vif, mac, sinfo);
- if (vif->wdev.iftype == NL80211_IFTYPE_AP) {
+ if (wdev->iftype == NL80211_IFTYPE_AP) {
if (ret == -ENOENT) {
- cfg80211_del_sta(vif->netdev, mac, GFP_KERNEL);
+ cfg80211_del_sta(&vif->wdev, mac, GFP_KERNEL);
sinfo->filled = 0;
}
}
}
static int
-qtnf_change_station(struct wiphy *wiphy, struct net_device *dev,
+qtnf_change_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_parameters *params)
{
- struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
int ret;
ret = qtnf_cmd_send_change_sta(vif, mac, params);
}
static int
-qtnf_del_station(struct wiphy *wiphy, struct net_device *dev,
+qtnf_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params)
{
- struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
+ struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
int ret;
if (params->mac &&
- (vif->wdev.iftype == NL80211_IFTYPE_AP) &&
+ (wdev->iftype == NL80211_IFTYPE_AP) &&
!is_broadcast_ether_addr(params->mac) &&
!qtnf_sta_list_lookup(&vif->sta_list, params->mac))
return 0;
goto out;
}
- cfg80211_new_sta(vif->netdev, sta_assoc->sta_addr, sinfo,
- GFP_KERNEL);
+ cfg80211_new_sta(vif->netdev->ieee80211_ptr, sta_assoc->sta_addr,
+ sinfo, GFP_KERNEL);
out:
kfree(sinfo);
sta_addr, reason);
if (qtnf_sta_list_del(vif, sta_addr))
- cfg80211_del_sta(vif->netdev, sta_deauth->sta_addr,
+ cfg80211_del_sta(&vif->wdev, sta_deauth->sta_addr,
GFP_KERNEL);
return 0;
}
/* Called with the rtnl lock held. */
-static int virt_wifi_get_station(struct wiphy *wiphy, struct net_device *dev,
- const u8 *mac, struct station_info *sinfo)
+static int virt_wifi_get_station(struct wiphy *wiphy,
+ struct wireless_dev *wdev, const u8 *mac,
+ struct station_info *sinfo)
{
+ struct net_device *dev = wdev->netdev;
struct virt_wifi_netdev_priv *priv = netdev_priv(dev);
wiphy_debug(wiphy, "get_station\n");
}
/* Called with the rtnl lock held. */
-static int virt_wifi_dump_station(struct wiphy *wiphy, struct net_device *dev,
+static int virt_wifi_dump_station(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo)
{
- struct virt_wifi_netdev_priv *priv = netdev_priv(dev);
+ struct virt_wifi_netdev_priv *priv = netdev_priv(wdev->netdev);
wiphy_debug(wiphy, "dump_station\n");
return -ENOENT;
ether_addr_copy(mac, fake_router_bssid);
- return virt_wifi_get_station(wiphy, dev, fake_router_bssid, sinfo);
+ return virt_wifi_get_station(wiphy, wdev, fake_router_bssid, sinfo);
}
static const struct cfg80211_ops virt_wifi_cfg80211_ops = {
}
static int cfg80211_rtw_get_station(struct wiphy *wiphy,
- struct net_device *ndev,
+ struct wireless_dev *wdev,
const u8 *mac,
struct station_info *sinfo)
{
int ret = 0;
+ struct net_device *ndev = wdev_to_ndev(wdev);
struct adapter *padapter = rtw_netdev_priv(ndev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_info *psta = NULL;
void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame, uint frame_len)
{
- struct net_device *ndev = padapter->pnetdev;
+ struct wireless_dev *wdev = padapter->rtw_wdev;
{
struct station_info sinfo = {};
sinfo.filled = 0;
sinfo.assoc_req_ies = pmgmt_frame + WLAN_HDR_A3_LEN + ie_offset;
sinfo.assoc_req_ies_len = frame_len - WLAN_HDR_A3_LEN - ie_offset;
- cfg80211_new_sta(ndev, GetAddr2Ptr(pmgmt_frame), &sinfo, GFP_ATOMIC);
+ cfg80211_new_sta(wdev, GetAddr2Ptr(pmgmt_frame), &sinfo, GFP_ATOMIC);
}
}
void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, unsigned char *da, unsigned short reason)
{
- struct net_device *ndev = padapter->pnetdev;
+ struct wireless_dev *wdev = padapter->rtw_wdev;
- cfg80211_del_sta(ndev, da, GFP_ATOMIC);
+ cfg80211_del_sta(wdev, da, GFP_ATOMIC);
}
static u8 rtw_get_chan_type(struct adapter *adapter)
}
static int cfg80211_rtw_add_station(struct wiphy *wiphy,
- struct net_device *ndev,
+ struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
return 0;
}
-static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
+static int cfg80211_rtw_del_station(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
struct station_del_parameters *params)
{
int ret = 0;
struct list_head *phead, *plist, *tmp;
u8 updated = false;
struct sta_info *psta = NULL;
- struct adapter *padapter = rtw_netdev_priv(ndev);
+ struct adapter *padapter = rtw_netdev_priv(wdev->netdev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct sta_priv *pstapriv = &padapter->stapriv;
const u8 *mac = params->mac;
}
static int cfg80211_rtw_change_station(struct wiphy *wiphy,
- struct net_device *ndev,
+ struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
}
static int cfg80211_rtw_dump_station(struct wiphy *wiphy,
- struct net_device *ndev,
+ struct wireless_dev *wdev,
int idx, u8 *mac,
struct station_info *sinfo)
{
int ret = 0;
- struct adapter *padapter = rtw_netdev_priv(ndev);
+ struct adapter *padapter = rtw_netdev_priv(wdev_to_ndev(wdev));
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
unsigned int link_id);
- int (*add_station)(struct wiphy *wiphy, struct net_device *dev,
+ int (*add_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params);
- int (*del_station)(struct wiphy *wiphy, struct net_device *dev,
+ int (*del_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params);
- int (*change_station)(struct wiphy *wiphy, struct net_device *dev,
+ int (*change_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params);
- int (*get_station)(struct wiphy *wiphy, struct net_device *dev,
+ int (*get_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo);
- int (*dump_station)(struct wiphy *wiphy, struct net_device *dev,
+ int (*dump_station)(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo);
int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev,
/**
* cfg80211_new_sta - notify userspace about station
*
- * @dev: the netdev
+ * @wdev: the wireless device
* @mac_addr: the station's address
* @sinfo: the station information
* @gfp: allocation flags
*/
-void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr,
+void cfg80211_new_sta(struct wireless_dev *wdev, const u8 *mac_addr,
struct station_info *sinfo, gfp_t gfp);
/**
* cfg80211_del_sta_sinfo - notify userspace about deletion of a station
- * @dev: the netdev
+ * @wdev: the wireless device
* @mac_addr: the station's address. For MLD station, MLD address is used.
* @sinfo: the station information/statistics
* @gfp: allocation flags
*/
-void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr,
+void cfg80211_del_sta_sinfo(struct wireless_dev *wdev, const u8 *mac_addr,
struct station_info *sinfo, gfp_t gfp);
/**
* cfg80211_del_sta - notify userspace about deletion of a station
*
- * @dev: the netdev
+ * @wdev: the wireless device
* @mac_addr: the station's address. For MLD station, MLD address is used.
* @gfp: allocation flags
*/
-static inline void cfg80211_del_sta(struct net_device *dev,
+static inline void cfg80211_del_sta(struct wireless_dev *wdev,
const u8 *mac_addr, gfp_t gfp)
{
- cfg80211_del_sta_sinfo(dev, mac_addr, NULL, gfp);
+ cfg80211_del_sta_sinfo(wdev, mac_addr, NULL, gfp);
}
/**
rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
}
-static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
+static int ieee80211_dump_station(struct wiphy *wiphy, struct wireless_dev *wdev,
int idx, u8 *mac, struct station_info *sinfo)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
int ret = -ENOENT;
return drv_get_survey(local, idx, survey);
}
-static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+static int ieee80211_get_station(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
const u8 *mac, struct station_info *sinfo)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
int ret = -ENOENT;
return 0;
}
-static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
+static int ieee80211_add_station(struct wiphy *wiphy, struct wireless_dev *wdev,
const u8 *mac,
struct station_parameters *params)
{
sdata->vif.type != NL80211_IFTYPE_AP)
return -EINVAL;
} else
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
if (ether_addr_equal(mac, sdata->vif.addr))
return -EINVAL;
return sta_info_insert(sta);
}
-static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
+static int ieee80211_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params)
{
struct ieee80211_sub_if_data *sdata;
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
if (params->mac)
return sta_info_destroy_addr_bss(sdata, params->mac);
}
static int ieee80211_change_station(struct wiphy *wiphy,
- struct net_device *dev, const u8 *mac,
+ struct wireless_dev *wdev, const u8 *mac,
struct station_parameters *params)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *vlansdata;
}
sinfo->generation = local->sta_generation;
- cfg80211_new_sta(sdata->dev, sta->sta.addr, sinfo, GFP_KERNEL);
+ cfg80211_new_sta(&sdata->wdev, sta->sta.addr, sinfo, GFP_KERNEL);
kfree(sinfo);
sta_dbg(sdata, "Inserted STA %pM\n", sta->sta.addr);
sta_dbg(sdata, "Removed STA %pM\n", sta->sta.addr);
- cfg80211_del_sta_sinfo(sdata->dev, sta->sta.addr, sinfo, GFP_KERNEL);
+ cfg80211_del_sta_sinfo(&sdata->wdev, sta->sta.addr, sinfo, GFP_KERNEL);
kfree(sinfo);
ieee80211_sta_debugfs_remove(sta);
static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
u32 seq, int flags,
struct cfg80211_registered_device *rdev,
- struct net_device *dev,
+ struct wireless_dev *wdev,
const u8 *mac_addr, struct station_info *sinfo,
bool link_stats)
{
return -1;
}
- if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) ||
+ if ((wdev->netdev &&
+ nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex)) ||
+ nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
+ NL80211_ATTR_PAD) ||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr) ||
nla_put_u32(msg, NL80211_ATTR_GENERATION, sinfo->generation))
goto nla_put_failure;
sinfo_alloc = true;
}
- err = rdev_dump_station(rdev, wdev->netdev, sta_idx,
+ err = rdev_dump_station(rdev, wdev, sta_idx,
mac_addr, &sinfo);
if (err == -ENOENT)
break;
if (nl80211_send_station(skb, NL80211_CMD_NEW_STATION,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq, NLM_F_MULTI,
- rdev, wdev->netdev, mac_addr,
+ rdev, wdev, mac_addr,
&sinfo, false) < 0)
goto out;
static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
- struct net_device *dev = info->user_ptr[1];
+ struct wireless_dev *wdev = info->user_ptr[1];
struct station_info sinfo;
struct sk_buff *msg;
u8 *mac_addr = NULL;
memset(&sinfo, 0, sizeof(sinfo));
+ if (!wdev->netdev)
+ return -EINVAL;
+
if (!info->attrs[NL80211_ATTR_MAC])
return -EINVAL;
}
}
- err = rdev_get_station(rdev, dev, mac_addr, &sinfo);
+ err = rdev_get_station(rdev, wdev, mac_addr, &sinfo);
if (err) {
cfg80211_sinfo_release_content(&sinfo);
return err;
if (nl80211_send_station(msg, NL80211_CMD_NEW_STATION,
info->snd_portid, info->snd_seq, 0,
- rdev, dev, mac_addr, &sinfo, false) < 0) {
+ rdev, wdev, mac_addr, &sinfo, false) < 0) {
nlmsg_free(msg);
return -ENOBUFS;
}
static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
- struct net_device *dev = info->user_ptr[1];
+ struct wireless_dev *wdev = info->user_ptr[1];
+ struct net_device *dev = wdev->netdev;
struct station_parameters params;
u8 *mac_addr;
int err;
memset(¶ms, 0, sizeof(params));
+ if (!dev)
+ return -EINVAL;
+
if (!rdev->ops->change_station)
return -EOPNOTSUPP;
nla_len(info->attrs[NL80211_ATTR_STA_EXT_CAPABILITY]);
}
- if (parse_station_flags(info, dev->ieee80211_ptr->iftype, ¶ms))
+ if (parse_station_flags(info, wdev->iftype, ¶ms))
return -EINVAL;
if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
if (IS_ERR(params.vlan))
return PTR_ERR(params.vlan);
- switch (dev->ieee80211_ptr->iftype) {
+ switch (wdev->iftype) {
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_P2P_GO:
}
/* driver will call cfg80211_check_station_change() */
- err = rdev_change_station(rdev, dev, mac_addr, ¶ms);
+ err = rdev_change_station(rdev, wdev, mac_addr, ¶ms);
out_put_vlan:
dev_put(params.vlan);
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
int err;
- struct net_device *dev = info->user_ptr[1];
- struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct wireless_dev *wdev = info->user_ptr[1];
+ struct net_device *dev = wdev->netdev;
struct station_parameters params;
u8 *mac_addr = NULL;
u32 auth_assoc = BIT(NL80211_STA_FLAG_AUTHENTICATED) |
memset(¶ms, 0, sizeof(params));
+ if (!dev)
+ return -EINVAL;
+
if (!rdev->ops->add_station)
return -EOPNOTSUPP;
* and is NOT supported for AP interface
*/
params.support_p2p_ps =
- dev->ieee80211_ptr->iftype == NL80211_IFTYPE_P2P_GO;
+ wdev->iftype == NL80211_IFTYPE_P2P_GO;
}
if (info->attrs[NL80211_ATTR_PEER_AID])
if (err)
return err;
- if (parse_station_flags(info, dev->ieee80211_ptr->iftype, ¶ms))
+ if (parse_station_flags(info, wdev->iftype, ¶ms))
return -EINVAL;
/* HT/VHT requires QoS, but if we don't have that just ignore HT/VHT
/* When you run into this, adjust the code below for the new flag */
BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 8);
- switch (dev->ieee80211_ptr->iftype) {
+ switch (wdev->iftype) {
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_P2P_GO:
params.epp_peer =
nla_get_flag(info->attrs[NL80211_ATTR_EPP_PEER]);
- err = rdev_add_station(rdev, dev, mac_addr, ¶ms);
+ err = rdev_add_station(rdev, wdev, mac_addr, ¶ms);
out:
dev_put(params.vlan);
return err;
static int nl80211_del_station(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
- struct net_device *dev = info->user_ptr[1];
- struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct wireless_dev *wdev = info->user_ptr[1];
+ struct net_device *dev = wdev->netdev;
struct station_del_parameters params;
int link_id = nl80211_link_id_or_invalid(info->attrs);
memset(¶ms, 0, sizeof(params));
+ if (!dev)
+ return -EINVAL;
+
if (info->attrs[NL80211_ATTR_MAC])
params.mac = nla_data(info->attrs[NL80211_ATTR_MAC]);
params.link_id = link_id;
- return rdev_del_station(rdev, dev, ¶ms);
+ return rdev_del_station(rdev, wdev, ¶ms);
}
static int nl80211_send_mpath(struct sk_buff *msg, u32 portid, u32 seq,
mac_addr = wdev->links[0].client.current_bss->pub.bssid;
- err = rdev_get_station(rdev, dev, mac_addr, &sinfo);
+ err = rdev_get_station(rdev, wdev, mac_addr, &sinfo);
if (err)
return err;
!ether_addr_equal(buf + ETH_ALEN, dev->dev_addr))
return -EINVAL;
- err = rdev_get_station(rdev, dev, dest, &sinfo);
+ err = rdev_get_station(rdev, wdev, dest, &sinfo);
if (err)
return err;
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = nl80211_get_station,
.dumpit = nl80211_dump_station,
- .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV),
+ .internal_flags = IFLAGS(NL80211_FLAG_NEED_WDEV),
},
{
.cmd = NL80211_CMD_SET_STATION,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = nl80211_set_station,
.flags = GENL_UNS_ADMIN_PERM,
- .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ .internal_flags = IFLAGS(NL80211_FLAG_NEED_WDEV_UP),
},
{
.cmd = NL80211_CMD_NEW_STATION,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = nl80211_new_station,
.flags = GENL_UNS_ADMIN_PERM,
- .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ .internal_flags = IFLAGS(NL80211_FLAG_NEED_WDEV_UP),
},
{
.cmd = NL80211_CMD_DEL_STATION,
* whether MAC address is passed or not. If MAC address is
* passed, then even during MLO, link ID is not required.
*/
- .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ .internal_flags = IFLAGS(NL80211_FLAG_NEED_WDEV_UP),
},
{
.cmd = NL80211_CMD_GET_MPATH,
}
EXPORT_SYMBOL(cfg80211_tx_mgmt_expired);
-void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr,
+void cfg80211_new_sta(struct wireless_dev *wdev, const u8 *mac_addr,
struct station_info *sinfo, gfp_t gfp)
{
- struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
+ struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct sk_buff *msg;
- trace_cfg80211_new_sta(dev, mac_addr, sinfo);
+ trace_cfg80211_new_sta(wdev, mac_addr, sinfo);
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
if (!msg)
return;
if (nl80211_send_station(msg, NL80211_CMD_NEW_STATION, 0, 0, 0,
- rdev, dev, mac_addr, sinfo, false) < 0) {
+ rdev, wdev, mac_addr, sinfo, false) < 0) {
nlmsg_free(msg);
return;
}
}
EXPORT_SYMBOL(cfg80211_new_sta);
-void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr,
+void cfg80211_del_sta_sinfo(struct wireless_dev *wdev, const u8 *mac_addr,
struct station_info *sinfo, gfp_t gfp)
{
- struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
+ struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct sk_buff *msg;
struct station_info empty_sinfo = {};
if (!sinfo)
sinfo = &empty_sinfo;
- trace_cfg80211_del_sta(dev, mac_addr);
+ trace_cfg80211_del_sta(wdev, mac_addr);
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
if (!msg) {
}
if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0,
- rdev, dev, mac_addr, sinfo, false) < 0) {
+ rdev, wdev, mac_addr, sinfo, false) < 0) {
nlmsg_free(msg);
return;
}
}
static inline int rdev_add_station(struct cfg80211_registered_device *rdev,
- struct net_device *dev, u8 *mac,
+ struct wireless_dev *wdev, u8 *mac,
struct station_parameters *params)
{
int ret;
- trace_rdev_add_station(&rdev->wiphy, dev, mac, params);
- ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params);
+ trace_rdev_add_station(&rdev->wiphy, wdev, mac, params);
+ ret = rdev->ops->add_station(&rdev->wiphy, wdev, mac, params);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int rdev_del_station(struct cfg80211_registered_device *rdev,
- struct net_device *dev,
+ struct wireless_dev *wdev,
struct station_del_parameters *params)
{
int ret;
- trace_rdev_del_station(&rdev->wiphy, dev, params);
- ret = rdev->ops->del_station(&rdev->wiphy, dev, params);
+ trace_rdev_del_station(&rdev->wiphy, wdev, params);
+ ret = rdev->ops->del_station(&rdev->wiphy, wdev, params);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int rdev_change_station(struct cfg80211_registered_device *rdev,
- struct net_device *dev, u8 *mac,
+ struct wireless_dev *wdev, u8 *mac,
struct station_parameters *params)
{
int ret;
- trace_rdev_change_station(&rdev->wiphy, dev, mac, params);
- ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params);
+ trace_rdev_change_station(&rdev->wiphy, wdev, mac, params);
+ ret = rdev->ops->change_station(&rdev->wiphy, wdev, mac, params);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int rdev_get_station(struct cfg80211_registered_device *rdev,
- struct net_device *dev, const u8 *mac,
+ struct wireless_dev *wdev, const u8 *mac,
struct station_info *sinfo)
{
int ret;
- trace_rdev_get_station(&rdev->wiphy, dev, mac);
- ret = rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo);
+ trace_rdev_get_station(&rdev->wiphy, wdev, mac);
+ ret = rdev->ops->get_station(&rdev->wiphy, wdev, mac, sinfo);
trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo);
return ret;
}
static inline int rdev_dump_station(struct cfg80211_registered_device *rdev,
- struct net_device *dev, int idx, u8 *mac,
+ struct wireless_dev *wdev, int idx, u8 *mac,
struct station_info *sinfo)
{
int ret;
- trace_rdev_dump_station(&rdev->wiphy, dev, idx, mac);
- ret = rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo);
+ trace_rdev_dump_station(&rdev->wiphy, wdev, idx, mac);
+ ret = rdev->ops->dump_station(&rdev->wiphy, wdev, idx, mac, sinfo);
trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo);
return ret;
}
);
DECLARE_EVENT_CLASS(station_add_change,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u8 *mac,
struct station_parameters *params),
- TP_ARGS(wiphy, netdev, mac, params),
+ TP_ARGS(wiphy, wdev, mac, params),
TP_STRUCT__entry(
WIPHY_ENTRY
- NETDEV_ENTRY
+ WDEV_ENTRY
MAC_ENTRY(sta_mac)
__field(u32, sta_flags_mask)
__field(u32, sta_flags_set)
),
TP_fast_assign(
WIPHY_ASSIGN;
- NETDEV_ASSIGN;
+ WDEV_ASSIGN;
MAC_ASSIGN(sta_mac, mac);
__entry->sta_flags_mask = params->sta_flags_mask;
__entry->sta_flags_set = params->sta_flags_set;
__entry->opmode_notif_used =
params->link_sta_params.opmode_notif_used;
),
- TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM"
+ TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", station mac: %pM"
", station flags mask: 0x%x, station flags set: 0x%x, "
"station modify mask: 0x%x, listen interval: %d, aid: %u, "
"plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
- WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac,
+ WIPHY_PR_ARG, WDEV_PR_ARG, __entry->sta_mac,
__entry->sta_flags_mask, __entry->sta_flags_set,
__entry->sta_modify_mask, __entry->listen_interval,
__entry->aid, __entry->plink_action, __entry->plink_state,
);
DEFINE_EVENT(station_add_change, rdev_add_station,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u8 *mac,
struct station_parameters *params),
- TP_ARGS(wiphy, netdev, mac, params)
+ TP_ARGS(wiphy, wdev, mac, params)
);
DEFINE_EVENT(station_add_change, rdev_change_station,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u8 *mac,
struct station_parameters *params),
- TP_ARGS(wiphy, netdev, mac, params)
+ TP_ARGS(wiphy, wdev, mac, params)
);
DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
);
DECLARE_EVENT_CLASS(station_del,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params),
- TP_ARGS(wiphy, netdev, params),
+ TP_ARGS(wiphy, wdev, params),
TP_STRUCT__entry(
WIPHY_ENTRY
- NETDEV_ENTRY
+ WDEV_ENTRY
MAC_ENTRY(sta_mac)
__field(u8, subtype)
__field(u16, reason_code)
),
TP_fast_assign(
WIPHY_ASSIGN;
- NETDEV_ASSIGN;
+ WDEV_ASSIGN;
MAC_ASSIGN(sta_mac, params->mac);
__entry->subtype = params->subtype;
__entry->reason_code = params->reason_code;
__entry->link_id = params->link_id;
),
- TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM"
+ TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", station mac: %pM"
", subtype: %u, reason_code: %u, link_id: %d",
- WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac,
+ WIPHY_PR_ARG, WDEV_PR_ARG, __entry->sta_mac,
__entry->subtype, __entry->reason_code,
__entry->link_id)
);
DEFINE_EVENT(station_del, rdev_del_station,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
struct station_del_parameters *params),
- TP_ARGS(wiphy, netdev, params)
+ TP_ARGS(wiphy, wdev, params)
);
-DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
- TP_ARGS(wiphy, netdev, mac)
+DECLARE_EVENT_CLASS(wiphy_wdev_mac_evt,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, const u8 *mac),
+ TP_ARGS(wiphy, wdev, mac),
+ TP_STRUCT__entry(
+ WIPHY_ENTRY
+ WDEV_ENTRY
+ MAC_ENTRY(sta_mac)
+ ),
+ TP_fast_assign(
+ WIPHY_ASSIGN;
+ WDEV_ASSIGN;
+ MAC_ASSIGN(sta_mac, mac);
+ ),
+ TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", mac: %pM",
+ WIPHY_PR_ARG, WDEV_PR_ARG, __entry->sta_mac)
+);
+
+DEFINE_EVENT(wiphy_wdev_mac_evt, rdev_get_station,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, const u8 *mac),
+ TP_ARGS(wiphy, wdev, mac)
);
DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
);
TRACE_EVENT(rdev_dump_station,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, int _idx,
u8 *mac),
- TP_ARGS(wiphy, netdev, _idx, mac),
+ TP_ARGS(wiphy, wdev, _idx, mac),
TP_STRUCT__entry(
WIPHY_ENTRY
- NETDEV_ENTRY
+ WDEV_ENTRY
MAC_ENTRY(sta_mac)
__field(int, idx)
),
TP_fast_assign(
WIPHY_ASSIGN;
- NETDEV_ASSIGN;
+ WDEV_ASSIGN;
MAC_ASSIGN(sta_mac, mac);
__entry->idx = _idx;
),
- TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM, idx: %d",
- WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac,
+ TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", station mac: %pM, idx: %d",
+ WIPHY_PR_ARG, WDEV_PR_ARG, __entry->sta_mac,
__entry->idx)
);
NETDEV_PR_ARG, __entry->macaddr)
);
+DECLARE_EVENT_CLASS(cfg80211_wdev_mac_evt,
+ TP_PROTO(struct wireless_dev *wdev, const u8 *macaddr),
+ TP_ARGS(wdev, macaddr),
+ TP_STRUCT__entry(
+ WDEV_ENTRY
+ MAC_ENTRY(macaddr)
+ ),
+ TP_fast_assign(
+ WDEV_ASSIGN;
+ MAC_ASSIGN(macaddr, macaddr);
+ ),
+ TP_printk(WDEV_PR_FMT ", mac: %pM",
+ WDEV_PR_ARG, __entry->macaddr)
+);
+
DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
TP_PROTO(struct net_device *netdev, const u8 *macaddr),
TP_ARGS(netdev, macaddr)
);
TRACE_EVENT(cfg80211_new_sta,
- TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
+ TP_PROTO(struct wireless_dev *wdev, const u8 *mac_addr,
struct station_info *sinfo),
- TP_ARGS(netdev, mac_addr, sinfo),
+ TP_ARGS(wdev, mac_addr, sinfo),
TP_STRUCT__entry(
- NETDEV_ENTRY
+ WDEV_ENTRY
MAC_ENTRY(mac_addr)
SINFO_ENTRY
),
TP_fast_assign(
- NETDEV_ASSIGN;
+ WDEV_ASSIGN;
MAC_ASSIGN(mac_addr, mac_addr);
SINFO_ASSIGN;
),
- TP_printk(NETDEV_PR_FMT ", %pM",
- NETDEV_PR_ARG, __entry->mac_addr)
+ TP_printk(WDEV_PR_FMT ", %pM",
+ WDEV_PR_ARG, __entry->mac_addr)
);
-DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
- TP_PROTO(struct net_device *netdev, const u8 *macaddr),
- TP_ARGS(netdev, macaddr)
+DEFINE_EVENT(cfg80211_wdev_mac_evt, cfg80211_del_sta,
+ TP_PROTO(struct wireless_dev *wdev, const u8 *macaddr),
+ TP_ARGS(wdev, macaddr)
);
TRACE_EVENT(cfg80211_rx_mgmt,
guard(wiphy)(&rdev->wiphy);
- return rdev_get_station(rdev, dev, mac_addr, sinfo);
+ return rdev_get_station(rdev, wdev, mac_addr, sinfo);
}
EXPORT_SYMBOL(cfg80211_get_station);
* we directly assign the wireless handlers of wireless interfaces.
*
* Copyright 2008-2009 Johannes Berg <johannes@sipsolutions.net>
- * Copyright (C) 2019-2023 Intel Corporation
+ * Copyright (C) 2019-2023, 2026 Intel Corporation
*/
#include <linux/export.h>
return err;
scoped_guard(wiphy, &rdev->wiphy) {
- err = rdev_get_station(rdev, dev, addr, &sinfo);
+ err = rdev_get_station(rdev, wdev, addr, &sinfo);
}
if (err)
return err;
memset(&sinfo, 0, sizeof(sinfo));
- ret = rdev_get_station(rdev, dev, bssid, &sinfo);
+ ret = rdev_get_station(rdev, wdev, bssid, &sinfo);
wiphy_unlock(&rdev->wiphy);
if (ret)