From 6dc94f7b92aebaf0b595cb4c75b3cdfb6dcabfae Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 26 Mar 2013 17:13:44 -0700 Subject: [PATCH] compat-drivers: backport mac80211 set_multicast_list() 488b366a Synchs with next-20130326 The addition of the new mac80211 driver callback set_multicast_list() uses the struct netdev_hw_addr_list added as of 2.6.35. We already dealt with backporting this collateral evolution through the changes that went in on for the prepare_multicast() callback, as well as porting Ethernet driver usage of this. This is all dealt with on the patch: patches/collateral-evolutions/network/25-multicast-list_head.patch Reviewing that gave a quick idea of how to backport this new callback in a similar way. commit 488b366a452934141959384c7a1b52b22d6154ef Author: Alexander Bondar Date: Mon Feb 11 14:56:29 2013 +0200 mac80211: add driver callback for per-interface multicast filter Some devices have multicast filter capability for each individual virtual interface rather than just a global one. Add an interface specific driver callback allowing such drivers to configure this. Signed-off-by: Alexander Bondar Signed-off-by: Johannes Berg 1 2.6.24 [ OK ] 2 2.6.25 [ OK ] 3 2.6.26 [ OK ] 4 2.6.27 [ OK ] 5 2.6.28 [ OK ] 6 2.6.29 [ OK ] 7 2.6.30 [ OK ] 8 2.6.31 [ OK ] 9 2.6.32 [ OK ] 10 2.6.33 [ OK ] 11 2.6.34 [ OK ] 12 2.6.35 [ OK ] 13 2.6.36 [ OK ] 14 2.6.37 [ OK ] 15 2.6.38 [ OK ] 16 2.6.39 [ OK ] 17 3.0.65 [ OK ] 18 3.1.10 [ OK ] 19 3.2.38 [ OK ] 20 3.3.8 [ OK ] 21 3.4.32 [ OK ] 22 3.5.7 [ OK ] 23 3.6.11 [ OK ] 24 3.7.9 [ OK ] 25 3.8.0 [ OK ] 26 3.9-rc1 [ OK ] real 23m32.940s user 650m11.334s sys 79m7.021s Signed-off-by: Luis R. Rodriguez --- .../network/25-multicast-list_head.patch | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/patches/collateral-evolutions/network/25-multicast-list_head.patch b/patches/collateral-evolutions/network/25-multicast-list_head.patch index 3a020055d238..86d90672b4de 100644 --- a/patches/collateral-evolutions/network/25-multicast-list_head.patch +++ b/patches/collateral-evolutions/network/25-multicast-list_head.patch @@ -818,3 +818,70 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856 ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE); /* Set the multicast filter */ ath6kl_dbg(ATH6KL_DBG_TRC, +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -2613,9 +2613,15 @@ struct ieee80211_ops { + unsigned int changed_flags, + unsigned int *total_flags, + u64 multicast); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + void (*set_multicast_list)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, bool allmulti, + struct netdev_hw_addr_list *mc_list); ++#else ++ void (*set_multicast_list)(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif, bool allmulti, ++ int mc_count, struct dev_addr_list *ha); ++#endif + + int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, + bool set); +--- a/net/mac80211/driver-ops.h ++++ b/net/mac80211/driver-ops.h +@@ -255,6 +255,7 @@ static inline u64 drv_prepare_multicast( + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + static inline void drv_set_multicast_list(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct netdev_hw_addr_list *mc_list) +@@ -270,6 +271,23 @@ static inline void drv_set_multicast_lis + allmulti, mc_list); + trace_drv_return_void(local); + } ++#else ++static inline void drv_set_multicast_list(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ int mc_count, struct dev_addr_list *ha) ++{ ++ bool allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI; ++ ++ trace_drv_set_multicast_list(local, sdata, mc_count); ++ ++ check_sdata_in_driver(sdata); ++ ++ if (local->ops->set_multicast_list) ++ local->ops->set_multicast_list(&local->hw, &sdata->vif, ++ allmulti, mc_count, ha); ++ trace_drv_return_void(local); ++} ++#endif + + static inline void drv_configure_filter(struct ieee80211_local *local, + unsigned int changed_flags, +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -932,7 +932,12 @@ static void ieee80211_set_multicast_list + if (sdata->vif.type != NL80211_IFTYPE_MONITOR && + sdata->vif.type != NL80211_IFTYPE_AP_VLAN && + sdata->vif.type != NL80211_IFTYPE_AP) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + drv_set_multicast_list(local, sdata, &dev->mc); ++#else ++ drv_set_multicast_list(local, sdata, &dev->mc_count, ++ &dev->mc_list); ++#endif + + spin_lock_bh(&local->filter_lock); + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) -- 2.30.2