Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / drivers / net / wireless / ath / ath5k / base.c
index febd036..5f04cf3 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/pci.h>
 #include <linux/ethtool.h>
 #include <linux/uaccess.h>
 #include <linux/pci.h>
 #include <linux/ethtool.h>
 #include <linux/uaccess.h>
+#include <linux/slab.h>
 
 #include <net/ieee80211_radiotap.h>
 
 
 #include <net/ieee80211_radiotap.h>
 
@@ -230,7 +231,7 @@ static void ath5k_remove_interface(struct ieee80211_hw *hw,
                struct ieee80211_vif *vif);
 static int ath5k_config(struct ieee80211_hw *hw, u32 changed);
 static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
                struct ieee80211_vif *vif);
 static int ath5k_config(struct ieee80211_hw *hw, u32 changed);
 static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
-                                  int mc_count, struct dev_addr_list *mc_list);
+                                  struct netdev_hw_addr_list *mc_list);
 static void ath5k_configure_filter(struct ieee80211_hw *hw,
                unsigned int changed_flags,
                unsigned int *new_flags,
 static void ath5k_configure_filter(struct ieee80211_hw *hw,
                unsigned int changed_flags,
                unsigned int *new_flags,
@@ -3073,22 +3074,20 @@ unlock:
 }
 
 static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
 }
 
 static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
-                                  int mc_count, struct dev_addr_list *mclist)
+                                  struct netdev_hw_addr_list *mc_list)
 {
        u32 mfilt[2], val;
 {
        u32 mfilt[2], val;
-       int i;
        u8 pos;
        u8 pos;
+       struct netdev_hw_addr *ha;
 
        mfilt[0] = 0;
        mfilt[1] = 1;
 
 
        mfilt[0] = 0;
        mfilt[1] = 1;
 
-       for (i = 0; i < mc_count; i++) {
-               if (!mclist)
-                       break;
+       netdev_hw_addr_list_for_each(ha, mc_list) {
                /* calculate XOR of eight 6-bit values */
                /* calculate XOR of eight 6-bit values */
-               val = get_unaligned_le32(mclist->dmi_addr + 0);
+               val = get_unaligned_le32(ha->addr + 0);
                pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
                pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
-               val = get_unaligned_le32(mclist->dmi_addr + 3);
+               val = get_unaligned_le32(ha->addr + 3);
                pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
                pos &= 0x3f;
                mfilt[pos / 32] |= (1 << (pos % 32));
                pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
                pos &= 0x3f;
                mfilt[pos / 32] |= (1 << (pos % 32));
@@ -3096,8 +3095,7 @@ static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
                * but not sure, needs testing, if we do use this we'd
                * neet to inform below to not reset the mcast */
                /* ath5k_hw_set_mcast_filterindex(ah,
                * but not sure, needs testing, if we do use this we'd
                * neet to inform below to not reset the mcast */
                /* ath5k_hw_set_mcast_filterindex(ah,
-                *      mclist->dmi_addr[5]); */
-               mclist = mclist->next;
+                *      ha->addr[5]); */
        }
 
        return ((u64)(mfilt[1]) << 32) | mfilt[0];
        }
 
        return ((u64)(mfilt[1]) << 32) | mfilt[0];