From 60f9f8a275514de0f43b18e6eb4c4f987e3eb091 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Fri, 9 Mar 2012 10:57:27 -0800 Subject: [PATCH] compat-wireless: backport ath6kl hw_features / [set|fix]_features This requires a manual backport, we throw it into patches/40-netdev-hw-features.patch following previous ethernet backport of Atheros Ethernet drivers. Signed-off-by: Luis R. Rodriguez --- patches/40-netdev-hw-features.patch | 48 ++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/patches/40-netdev-hw-features.patch b/patches/40-netdev-hw-features.patch index 36cf6b74a2e7..981336c1c6db 100644 --- a/patches/40-netdev-hw-features.patch +++ b/patches/40-netdev-hw-features.patch @@ -1,4 +1,8 @@ -This reverts the following commit in linux mainline for kernel < 2.6.39: +This reverts the commits that deal with hw_features and +set_features, fix_features for kernels < 2.6.39. + +Below is one example commit being reverted, but we also do +this for ath6kl and any driver that uses this in this file. commit 782d640afd15af7a1faf01cfe566ca4ac511319d Author: Michał Mirosław @@ -326,3 +330,45 @@ Date: Thu Apr 7 07:32:18 2011 +0000 +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ #endif /* ATLX_C */ +--- a/drivers/net/wireless/ath/ath6kl/main.c ++++ b/drivers/net/wireless/ath/ath6kl/main.c +@@ -1022,6 +1022,7 @@ static struct net_device_stats *ath6kl_g + return &vif->net_stats; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + static int ath6kl_set_features(struct net_device *dev, + netdev_features_t features) + { +@@ -1054,6 +1055,7 @@ static int ath6kl_set_features(struct ne + + return err; + } ++#endif + + static void ath6kl_set_multicast_list(struct net_device *ndev) + { +@@ -1169,7 +1171,9 @@ static const struct net_device_ops ath6k + .ndo_stop = ath6kl_close, + .ndo_start_xmit = ath6kl_data_tx, + .ndo_get_stats = ath6kl_get_stats, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + .ndo_set_features = ath6kl_set_features, ++#endif + .ndo_set_rx_mode = ath6kl_set_multicast_list, + }; + +--- a/drivers/net/wireless/ath/ath6kl/core.c ++++ b/drivers/net/wireless/ath/ath6kl/core.c +@@ -173,7 +173,11 @@ int ath6kl_core_init(struct ath6kl *ar) + + set_bit(FIRST_BOOT, &ar->flag); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM; ++#else ++ ndev->features |= NETIF_F_IP_CSUM; ++#endif + + ret = ath6kl_init_hw_start(ar); + if (ret) { -- 2.30.2