aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-01 17:22:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 17:22:15 -0400
commit22bedad3ce112d5ca1eaf043d4990fa2ed698c87 (patch)
treeb6fba5688d48b1396f01d13ee53610dea7749c15 /drivers/net/wireless/mwl8k.c
parenta748ee2426817a95b1f03012d8f339c45c722ae1 (diff)
net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ac65e13eb0de..6599fd15e675 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1938,11 +1938,15 @@ struct mwl8k_cmd_mac_multicast_adr {
1938 1938
1939static struct mwl8k_cmd_pkt * 1939static struct mwl8k_cmd_pkt *
1940__mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, 1940__mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
1941 int mc_count, struct dev_addr_list *mclist) 1941 struct netdev_hw_addr_list *mc_list)
1942{ 1942{
1943 struct mwl8k_priv *priv = hw->priv; 1943 struct mwl8k_priv *priv = hw->priv;
1944 struct mwl8k_cmd_mac_multicast_adr *cmd; 1944 struct mwl8k_cmd_mac_multicast_adr *cmd;
1945 int size; 1945 int size;
1946 int mc_count = 0;
1947
1948 if (mc_list)
1949 mc_count = netdev_hw_addr_list_count(mc_list);
1946 1950
1947 if (allmulti || mc_count > priv->num_mcaddrs) { 1951 if (allmulti || mc_count > priv->num_mcaddrs) {
1948 allmulti = 1; 1952 allmulti = 1;
@@ -1963,17 +1967,13 @@ __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
1963 if (allmulti) { 1967 if (allmulti) {
1964 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST); 1968 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST);
1965 } else if (mc_count) { 1969 } else if (mc_count) {
1966 int i; 1970 struct netdev_hw_addr *ha;
1971 int i = 0;
1967 1972
1968 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); 1973 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST);
1969 cmd->numaddr = cpu_to_le16(mc_count); 1974 cmd->numaddr = cpu_to_le16(mc_count);
1970 for (i = 0; i < mc_count && mclist; i++) { 1975 netdev_hw_addr_list_for_each(ha, mc_list) {
1971 if (mclist->da_addrlen != ETH_ALEN) { 1976 memcpy(cmd->addr[i], ha->addr, ETH_ALEN);
1972 kfree(cmd);
1973 return NULL;
1974 }
1975 memcpy(cmd->addr[i], mclist->da_addr, ETH_ALEN);
1976 mclist = mclist->next;
1977 } 1977 }
1978 } 1978 }
1979 1979
@@ -3552,7 +3552,7 @@ mwl8k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3552} 3552}
3553 3553
3554static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, 3554static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
3555 int mc_count, struct dev_addr_list *mclist) 3555 struct netdev_hw_addr_list *mc_list)
3556{ 3556{
3557 struct mwl8k_cmd_pkt *cmd; 3557 struct mwl8k_cmd_pkt *cmd;
3558 3558
@@ -3563,7 +3563,7 @@ static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
3563 * we'll end up throwing this packet away and creating a new 3563 * we'll end up throwing this packet away and creating a new
3564 * one in mwl8k_configure_filter(). 3564 * one in mwl8k_configure_filter().
3565 */ 3565 */
3566 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_count, mclist); 3566 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_list);
3567 3567
3568 return (unsigned long)cmd; 3568 return (unsigned long)cmd;
3569} 3569}
@@ -3686,7 +3686,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
3686 */ 3686 */
3687 if (*total_flags & FIF_ALLMULTI) { 3687 if (*total_flags & FIF_ALLMULTI) {
3688 kfree(cmd); 3688 kfree(cmd);
3689 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, 0, NULL); 3689 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, NULL);
3690 } 3690 }
3691 3691
3692 if (cmd != NULL) { 3692 if (cmd != NULL) {