backports: cw1200 needs the multicast API changes to support <=2.6.35
authorSolomon Peachy <pizza@shaftnet.org>
Sat, 17 Aug 2013 13:02:59 +0000 (09:02 -0400)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 27 Aug 2013 18:15:28 +0000 (11:15 -0700)
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>
dependencies
patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_cw1200_sta.patch [new file with mode: 0644]

index f1e514b0bbdf8d5f43e22f15936f1617fc44d40a..9bd57639f6c904464fd720c88fa80be469591d85 100644 (file)
@@ -36,6 +36,9 @@ P54_SPI 2.6.25
 WL1251_SDIO 2.6.37
 WLCORE_SDIO 2.6.38
 
+CW1200_WLAN_SDIO 2.6.34
+CW1200_WLAN_SPI 2.6.35
+
 BRCMFMAC 2.6.29
 
 WL_TI 2.6.30
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 (file)
index 0000000..269a696
--- /dev/null
@@ -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);