提交 d6d5c06c 编写于 作者: K Kalle Valo

ath6kl: cleanup ath6kl_priv()

It really should not return a void pointer. Also remove useless casts
from its users.
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 4703290a
...@@ -704,7 +704,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, ...@@ -704,7 +704,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy, static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,
struct net_device *dev, u16 reason_code) struct net_device *dev, u16 reason_code)
{ {
struct ath6kl *ar = (struct ath6kl *)ath6kl_priv(dev); struct ath6kl *ar = ath6kl_priv(dev);
struct ath6kl_vif *vif = netdev_priv(dev); struct ath6kl_vif *vif = netdev_priv(dev);
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: reason=%u\n", __func__, ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: reason=%u\n", __func__,
...@@ -802,7 +802,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason, ...@@ -802,7 +802,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_scan_request *request) struct cfg80211_scan_request *request)
{ {
struct ath6kl *ar = (struct ath6kl *)ath6kl_priv(ndev); struct ath6kl *ar = ath6kl_priv(ndev);
struct ath6kl_vif *vif = netdev_priv(ndev); struct ath6kl_vif *vif = netdev_priv(ndev);
s8 n_channels = 0; s8 n_channels = 0;
u16 *channels = NULL; u16 *channels = NULL;
...@@ -918,7 +918,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, ...@@ -918,7 +918,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac_addr, const u8 *mac_addr,
struct key_params *params) struct key_params *params)
{ {
struct ath6kl *ar = (struct ath6kl *)ath6kl_priv(ndev); struct ath6kl *ar = ath6kl_priv(ndev);
struct ath6kl_vif *vif = netdev_priv(ndev); struct ath6kl_vif *vif = netdev_priv(ndev);
struct ath6kl_key *key = NULL; struct ath6kl_key *key = NULL;
u8 key_usage; u8 key_usage;
...@@ -1044,7 +1044,7 @@ static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, ...@@ -1044,7 +1044,7 @@ static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_index, bool pairwise, u8 key_index, bool pairwise,
const u8 *mac_addr) const u8 *mac_addr)
{ {
struct ath6kl *ar = (struct ath6kl *)ath6kl_priv(ndev); struct ath6kl *ar = ath6kl_priv(ndev);
struct ath6kl_vif *vif = netdev_priv(ndev); struct ath6kl_vif *vif = netdev_priv(ndev);
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: index %d\n", __func__, key_index); ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: index %d\n", __func__, key_index);
...@@ -1110,7 +1110,7 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy, ...@@ -1110,7 +1110,7 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
u8 key_index, bool unicast, u8 key_index, bool unicast,
bool multicast) bool multicast)
{ {
struct ath6kl *ar = (struct ath6kl *)ath6kl_priv(ndev); struct ath6kl *ar = ath6kl_priv(ndev);
struct ath6kl_vif *vif = netdev_priv(ndev); struct ath6kl_vif *vif = netdev_priv(ndev);
struct ath6kl_key *key = NULL; struct ath6kl_key *key = NULL;
u8 key_usage; u8 key_usage;
......
...@@ -618,7 +618,7 @@ struct ath6kl { ...@@ -618,7 +618,7 @@ struct ath6kl {
#endif /* CONFIG_ATH6KL_DEBUG */ #endif /* CONFIG_ATH6KL_DEBUG */
}; };
static inline void *ath6kl_priv(struct net_device *dev) static inline struct ath6kl *ath6kl_priv(struct net_device *dev)
{ {
return ((struct ath6kl_vif *) netdev_priv(dev))->ar; return ((struct ath6kl_vif *) netdev_priv(dev))->ar;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册