summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2013-08-17 09:02:59 -0400
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-08-27 11:15:28 -0700
commitf32de0979275325c6f0d7c865a192cf0f75b5fea (patch)
treea2fbdfa9dd1210c39aaafad5e124ef3256e029e5 /patches/collateral-evolutions
parent442830db717deaf1851717becdb0d51e478255a9 (diff)
backports: cw1200 needs the multicast API changes to support <=2.6.35
Also, update the dependencies: cw1200_wlan_sdio needs >=2.6.34 due to missing sdio_set_host_pm_flags() cw1200_wlan_spi needs >=2.6.35 due to missing request_any_context_irq() Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'patches/collateral-evolutions')
-rw-r--r--patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_cw1200_sta.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_cw1200_sta.patch b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_cw1200_sta.patch
new file mode 100644
index 00000000..269a6961
--- /dev/null
+++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_cw1200_sta.patch
@@ -0,0 +1,77 @@
+--- a/drivers/net/wireless/cw1200/sta.c
++++ b/drivers/net/wireless/cw1200/sta.c
+@@ -530,8 +530,13 @@ void cw1200_set_beacon_wakeup_period_work(struct work_struct *work)
+ priv->join_dtim_period, 0);
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
+ struct netdev_hw_addr_list *mc_list)
++#else
++u64 cw1200_prepare_multicast(struct ieee80211_hw *hw, int mc_count,
++ struct dev_addr_list *ha)
++#endif
+ {
+ static u8 broadcast_ipv6[ETH_ALEN] = {
+ 0x33, 0x33, 0x00, 0x00, 0x00, 0x01
+@@ -540,13 +545,16 @@ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
+ 0x01, 0x00, 0x5e, 0x00, 0x00, 0x01
+ };
+ struct cw1200_common *priv = hw->priv;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ struct netdev_hw_addr *ha;
++#endif
+ int count = 0;
+
+ /* Disable multicast filtering */
+ priv->has_multicast_subscription = false;
+ memset(&priv->multicast_filter, 0x00, sizeof(priv->multicast_filter));
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ if (netdev_hw_addr_list_count(mc_list) > WSM_MAX_GRP_ADDRTABLE_ENTRIES)
+ return 0;
+
+@@ -560,13 +568,26 @@ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
+ priv->has_multicast_subscription = true;
+ count++;
+ }
++#else
++ while (ha &&
++ count < mc_count &&
++ count < WSM_MAX_GRP_ADDRTABLE_ENTRIES) {
++ memcpy(&priv->multicast_filter.macaddrs[count],
++ ha->dmi_addr, ETH_ALEN);
++ if (memcmp(ha->dmi_addr, broadcast_ipv4, ETH_ALEN) &&
++ memcmp(ha->dmi_addr, broadcast_ipv6, ETH_ALEN))
++ priv->has_multicast_subscription = true;
++ count++;
++ ha = ha->next;
++ }
++#endif
+
+ if (count) {
+ priv->multicast_filter.enable = __cpu_to_le32(1);
+ priv->multicast_filter.num_addrs = __cpu_to_le32(count);
+ }
+
+- return netdev_hw_addr_list_count(mc_list);
++ return count;
+ }
+
+ void cw1200_configure_filter(struct ieee80211_hw *dev,
+--- a/drivers/net/wireless/cw1200/sta.h
++++ b/drivers/net/wireless/cw1200/sta.h
+@@ -42,8 +42,13 @@ int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
+
+ void cw1200_flush(struct ieee80211_hw *hw, u32 queues, bool drop);
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
+ struct netdev_hw_addr_list *mc_list);
++#else
++u64 cw1200_prepare_multicast(struct ieee80211_hw *dev, int mc_count,
++ struct dev_addr_list *ha);
++#endif
+
+ int cw1200_set_pm(struct cw1200_common *priv, const struct wsm_set_pm *arg);
+