summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_driver-ops.patch
blob: 5f4271b416a9a2698fa8da6241fa93369cf3b2b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -229,20 +229,35 @@ static inline void drv_bss_info_changed(
 }
 
 static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
 					struct netdev_hw_addr_list *mc_list)
+#else
+					int mc_count,
+					struct dev_addr_list *mc_list)
+#endif
 {
 	u64 ret = 0;
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
 	trace_drv_prepare_multicast(local, mc_list->count);
+#else
+	trace_drv_prepare_multicast(local, mc_count);
+#endif
 
 	if (local->ops->prepare_multicast)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
 		ret = local->ops->prepare_multicast(&local->hw, mc_list);
+#else
+		ret = local->ops->prepare_multicast(&local->hw, mc_count,
+						    mc_list);
+#endif
 
 	trace_drv_return_u64(local, ret);
 
 	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)
@@ -258,6 +273,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,