diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:55:07 -0500 |
commit | 1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b (patch) | |
tree | 81697637a36eb4776df39c81a77a9e09ec951a1a /drivers/net/wireless/rtl818x | |
parent | 98b6218388e345064c3f2d3c161383a18274c638 (diff) |
mac80211: remove struct ieee80211_if_init_conf
All its members (vif, mac_addr, type) are now available
in the vif struct directly, so we can pass that instead
of the conf struct. I generated this patch (except the
mac80211 and header file changes) with this semantic
patch:
@@
identifier conf, fn, hw;
type tp;
@@
tp fn(struct ieee80211_hw *hw,
-struct ieee80211_if_init_conf *conf)
+struct ieee80211_vif *vif)
{
<...
(
-conf->type
+vif->type
|
-conf->mac_addr
+vif->addr
|
-conf->vif
+vif
)
...>
}
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8180_dev.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_dev.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c index f01f1ef9e3be..5a2b7199f5d5 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c | |||
@@ -652,7 +652,7 @@ static void rtl8180_stop(struct ieee80211_hw *dev) | |||
652 | } | 652 | } |
653 | 653 | ||
654 | static int rtl8180_add_interface(struct ieee80211_hw *dev, | 654 | static int rtl8180_add_interface(struct ieee80211_hw *dev, |
655 | struct ieee80211_if_init_conf *conf) | 655 | struct ieee80211_vif *vif) |
656 | { | 656 | { |
657 | struct rtl8180_priv *priv = dev->priv; | 657 | struct rtl8180_priv *priv = dev->priv; |
658 | 658 | ||
@@ -662,27 +662,27 @@ static int rtl8180_add_interface(struct ieee80211_hw *dev, | |||
662 | if (priv->vif) | 662 | if (priv->vif) |
663 | return -EBUSY; | 663 | return -EBUSY; |
664 | 664 | ||
665 | switch (conf->type) { | 665 | switch (vif->type) { |
666 | case NL80211_IFTYPE_STATION: | 666 | case NL80211_IFTYPE_STATION: |
667 | break; | 667 | break; |
668 | default: | 668 | default: |
669 | return -EOPNOTSUPP; | 669 | return -EOPNOTSUPP; |
670 | } | 670 | } |
671 | 671 | ||
672 | priv->vif = conf->vif; | 672 | priv->vif = vif; |
673 | 673 | ||
674 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); | 674 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); |
675 | rtl818x_iowrite32(priv, (__le32 __iomem *)&priv->map->MAC[0], | 675 | rtl818x_iowrite32(priv, (__le32 __iomem *)&priv->map->MAC[0], |
676 | le32_to_cpu(*(__le32 *)conf->mac_addr)); | 676 | le32_to_cpu(*(__le32 *)vif->addr)); |
677 | rtl818x_iowrite16(priv, (__le16 __iomem *)&priv->map->MAC[4], | 677 | rtl818x_iowrite16(priv, (__le16 __iomem *)&priv->map->MAC[4], |
678 | le16_to_cpu(*(__le16 *)(conf->mac_addr + 4))); | 678 | le16_to_cpu(*(__le16 *)(vif->addr + 4))); |
679 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); | 679 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); |
680 | 680 | ||
681 | return 0; | 681 | return 0; |
682 | } | 682 | } |
683 | 683 | ||
684 | static void rtl8180_remove_interface(struct ieee80211_hw *dev, | 684 | static void rtl8180_remove_interface(struct ieee80211_hw *dev, |
685 | struct ieee80211_if_init_conf *conf) | 685 | struct ieee80211_vif *vif) |
686 | { | 686 | { |
687 | struct rtl8180_priv *priv = dev->priv; | 687 | struct rtl8180_priv *priv = dev->priv; |
688 | priv->vif = NULL; | 688 | priv->vif = NULL; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 1cb0eff46223..f336c63053c1 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -1018,7 +1018,7 @@ static void rtl8187_stop(struct ieee80211_hw *dev) | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | static int rtl8187_add_interface(struct ieee80211_hw *dev, | 1020 | static int rtl8187_add_interface(struct ieee80211_hw *dev, |
1021 | struct ieee80211_if_init_conf *conf) | 1021 | struct ieee80211_vif *vif) |
1022 | { | 1022 | { |
1023 | struct rtl8187_priv *priv = dev->priv; | 1023 | struct rtl8187_priv *priv = dev->priv; |
1024 | int i; | 1024 | int i; |
@@ -1028,7 +1028,7 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev, | |||
1028 | if (priv->vif) | 1028 | if (priv->vif) |
1029 | goto exit; | 1029 | goto exit; |
1030 | 1030 | ||
1031 | switch (conf->type) { | 1031 | switch (vif->type) { |
1032 | case NL80211_IFTYPE_STATION: | 1032 | case NL80211_IFTYPE_STATION: |
1033 | break; | 1033 | break; |
1034 | default: | 1034 | default: |
@@ -1036,12 +1036,12 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev, | |||
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | ret = 0; | 1038 | ret = 0; |
1039 | priv->vif = conf->vif; | 1039 | priv->vif = vif; |
1040 | 1040 | ||
1041 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); | 1041 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); |
1042 | for (i = 0; i < ETH_ALEN; i++) | 1042 | for (i = 0; i < ETH_ALEN; i++) |
1043 | rtl818x_iowrite8(priv, &priv->map->MAC[i], | 1043 | rtl818x_iowrite8(priv, &priv->map->MAC[i], |
1044 | ((u8 *)conf->mac_addr)[i]); | 1044 | ((u8 *)vif->addr)[i]); |
1045 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); | 1045 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); |
1046 | 1046 | ||
1047 | exit: | 1047 | exit: |
@@ -1050,7 +1050,7 @@ exit: | |||
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | static void rtl8187_remove_interface(struct ieee80211_hw *dev, | 1052 | static void rtl8187_remove_interface(struct ieee80211_hw *dev, |
1053 | struct ieee80211_if_init_conf *conf) | 1053 | struct ieee80211_vif *vif) |
1054 | { | 1054 | { |
1055 | struct rtl8187_priv *priv = dev->priv; | 1055 | struct rtl8187_priv *priv = dev->priv; |
1056 | mutex_lock(&priv->conf_mutex); | 1056 | mutex_lock(&priv->conf_mutex); |