Commit 5db6e956 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: remove two obsolete structure definitions

The structures brcmf_cfg80211_dev and brcmf_cfg80211_iface are only
adding complexity and provide no additional value. These have been
removed in this patch.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b451ec94
...@@ -3646,8 +3646,7 @@ static void brcmf_wiphy_pno_params(struct wiphy *wiphy) ...@@ -3646,8 +3646,7 @@ static void brcmf_wiphy_pno_params(struct wiphy *wiphy)
#endif #endif
} }
static struct wireless_dev *brcmf_alloc_wdev(s32 sizeof_iface, static struct wireless_dev *brcmf_alloc_wdev(struct device *ndev)
struct device *ndev)
{ {
struct wireless_dev *wdev; struct wireless_dev *wdev;
s32 err = 0; s32 err = 0;
...@@ -3656,9 +3655,8 @@ static struct wireless_dev *brcmf_alloc_wdev(s32 sizeof_iface, ...@@ -3656,9 +3655,8 @@ static struct wireless_dev *brcmf_alloc_wdev(s32 sizeof_iface,
if (!wdev) if (!wdev)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
wdev->wiphy = wdev->wiphy = wiphy_new(&wl_cfg80211_ops,
wiphy_new(&wl_cfg80211_ops, sizeof(struct brcmf_cfg80211_priv));
sizeof(struct brcmf_cfg80211_priv) + sizeof_iface);
if (!wdev->wiphy) { if (!wdev->wiphy) {
WL_ERR("Could not allocate wiphy device\n"); WL_ERR("Could not allocate wiphy device\n");
err = -ENOMEM; err = -ENOMEM;
...@@ -4323,21 +4321,15 @@ struct brcmf_cfg80211_priv *brcmf_cfg80211_attach(struct net_device *ndev, ...@@ -4323,21 +4321,15 @@ struct brcmf_cfg80211_priv *brcmf_cfg80211_attach(struct net_device *ndev,
{ {
struct wireless_dev *wdev; struct wireless_dev *wdev;
struct brcmf_cfg80211_priv *cfg_priv; struct brcmf_cfg80211_priv *cfg_priv;
struct brcmf_cfg80211_iface *ci;
struct brcmf_cfg80211_dev *cfg_dev;
s32 err = 0; s32 err = 0;
if (!ndev) { if (!ndev) {
WL_ERR("ndev is invalid\n"); WL_ERR("ndev is invalid\n");
return NULL; return NULL;
} }
cfg_dev = kzalloc(sizeof(struct brcmf_cfg80211_dev), GFP_KERNEL);
if (!cfg_dev)
return NULL;
wdev = brcmf_alloc_wdev(sizeof(struct brcmf_cfg80211_iface), busdev); wdev = brcmf_alloc_wdev(busdev);
if (IS_ERR(wdev)) { if (IS_ERR(wdev)) {
kfree(cfg_dev);
return NULL; return NULL;
} }
...@@ -4345,8 +4337,6 @@ struct brcmf_cfg80211_priv *brcmf_cfg80211_attach(struct net_device *ndev, ...@@ -4345,8 +4337,6 @@ struct brcmf_cfg80211_priv *brcmf_cfg80211_attach(struct net_device *ndev,
cfg_priv = wdev_to_cfg(wdev); cfg_priv = wdev_to_cfg(wdev);
cfg_priv->wdev = wdev; cfg_priv->wdev = wdev;
cfg_priv->pub = drvr; cfg_priv->pub = drvr;
ci = (struct brcmf_cfg80211_iface *)&cfg_priv->ci;
ci->cfg_priv = cfg_priv;
ndev->ieee80211_ptr = wdev; ndev->ieee80211_ptr = wdev;
SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy));
wdev->netdev = ndev; wdev->netdev = ndev;
...@@ -4355,12 +4345,11 @@ struct brcmf_cfg80211_priv *brcmf_cfg80211_attach(struct net_device *ndev, ...@@ -4355,12 +4345,11 @@ struct brcmf_cfg80211_priv *brcmf_cfg80211_attach(struct net_device *ndev,
WL_ERR("Failed to init iwm_priv (%d)\n", err); WL_ERR("Failed to init iwm_priv (%d)\n", err);
goto cfg80211_attach_out; goto cfg80211_attach_out;
} }
kfree(cfg_dev);
return cfg_priv; return cfg_priv;
cfg80211_attach_out: cfg80211_attach_out:
brcmf_free_wdev(cfg_priv); brcmf_free_wdev(cfg_priv);
kfree(cfg_dev);
return NULL; return NULL;
} }
......
...@@ -17,12 +17,6 @@ ...@@ -17,12 +17,6 @@
#ifndef _wl_cfg80211_h_ #ifndef _wl_cfg80211_h_
#define _wl_cfg80211_h_ #define _wl_cfg80211_h_
struct brcmf_cfg80211_conf;
struct brcmf_cfg80211_iface;
struct brcmf_cfg80211_priv;
struct brcmf_cfg80211_security;
struct brcmf_cfg80211_ibss;
#define WL_DBG_NONE 0 #define WL_DBG_NONE 0
#define WL_DBG_CONN (1 << 5) #define WL_DBG_CONN (1 << 5)
#define WL_DBG_SCAN (1 << 4) #define WL_DBG_SCAN (1 << 4)
...@@ -178,6 +172,9 @@ struct brcmf_cfg80211_conf { ...@@ -178,6 +172,9 @@ struct brcmf_cfg80211_conf {
struct ieee80211_channel channel; struct ieee80211_channel channel;
}; };
/* forward declaration */
struct brcmf_cfg80211_priv;
/* cfg80211 main event loop */ /* cfg80211 main event loop */
struct brcmf_cfg80211_event_loop { struct brcmf_cfg80211_event_loop {
s32(*handler[BRCMF_E_LAST]) (struct brcmf_cfg80211_priv *cfg_priv, s32(*handler[BRCMF_E_LAST]) (struct brcmf_cfg80211_priv *cfg_priv,
...@@ -186,15 +183,6 @@ struct brcmf_cfg80211_event_loop { ...@@ -186,15 +183,6 @@ struct brcmf_cfg80211_event_loop {
void *data); void *data);
}; };
/* representing interface of cfg80211 plane */
struct brcmf_cfg80211_iface {
struct brcmf_cfg80211_priv *cfg_priv;
};
struct brcmf_cfg80211_dev {
void *driver_data; /* to store cfg80211 object information */
};
/* basic structure of scan request */ /* basic structure of scan request */
struct brcmf_cfg80211_scan_req { struct brcmf_cfg80211_scan_req {
struct brcmf_ssid_le ssid_le; struct brcmf_ssid_le ssid_le;
...@@ -460,7 +448,6 @@ struct brcmf_cfg80211_priv { ...@@ -460,7 +448,6 @@ struct brcmf_cfg80211_priv {
struct timer_list escan_timeout; struct timer_list escan_timeout;
struct work_struct escan_timeout_work; struct work_struct escan_timeout_work;
u8 *escan_ioctl_buf; u8 *escan_ioctl_buf;
u8 ci[0] __aligned(NETDEV_ALIGN);
}; };
static inline struct wiphy *cfg_to_wiphy(struct brcmf_cfg80211_priv *w) static inline struct wiphy *cfg_to_wiphy(struct brcmf_cfg80211_priv *w)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment