kernel: fix pkt_type filter mask for packet sockets
authorFelix Fietkau <nbd@openwrt.org>
Fri, 13 Jun 2014 09:34:03 +0000 (09:34 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 13 Jun 2014 09:34:03 +0000 (09:34 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41178

package/kernel/mac80211/Makefile
target/linux/generic/patches-3.10/630-packet_socket_type.patch
target/linux/generic/patches-3.12/630-packet_socket_type.patch
target/linux/generic/patches-3.13/630-packet_socket_type.patch
target/linux/generic/patches-3.14/630-packet_socket_type.patch
target/linux/generic/patches-3.3/630-packet_socket_type.patch
target/linux/generic/patches-3.6/630-packet_socket_type.patch
target/linux/generic/patches-3.8/630-packet_socket_type.patch
target/linux/generic/patches-3.9/630-packet_socket_type.patch

index e260993b89ef0b520ec7839fc5778eb5f15e3b7b..9ea01a8e78a5f6ee71caaaeafa63a75db757335b 100644 (file)
@@ -1447,7 +1447,7 @@ endif
 config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
 
 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
 config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
 
 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
-config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG
+config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_TX99
 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 
 config-$(call config_package,ath9k) += ATH9K
 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 
 config-$(call config_package,ath9k) += ATH9K
index 14878d38206f4bbb89f75341fcccf2db5809e8dc..3a3c3bb84f3b9a61a57a0b9dac8694767e23cf7f 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index 1e915f61fb205e8583613a1e3fff0d3dffffc6bb..60e840153b27541e960284deaf88df08bca45ecf 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index 1e915f61fb205e8583613a1e3fff0d3dffffc6bb..60e840153b27541e960284deaf88df08bca45ecf 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index d0247af83f24cc0bd9f7d305cff45204dc6531c4..4f3f5e8b7f441ca69d0146a18a178a77d9694045 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index 231b745c6a10a2686f2a518d7d357e532c76ae18..bcb399141f8c6e5f7feaf3b7f9554306ba39ed3e 100644 (file)
@@ -110,7 +110,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index a630d1d8231391570c6083369fe6577d722751fc..b43c14594f46543ed754319d6400717a6a34d2f3 100644 (file)
@@ -110,7 +110,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index 0671a28e9b52fa20620b1ba612830bba00410007..d1a9ee23a8549461b89ad1cefda0d908e32b8f30 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default:
index 9b700f515094eed87ec39c312faadfab3ad8bd7d..ff57bb76c2880a9b7832771ab2d12993f5755394 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
 +                        return -EINVAL;
 +                if (copy_from_user(&val, optval, sizeof(val)))
 +                        return -EFAULT;
-+                po->pkt_type = val & ~PACKET_LOOPBACK;
++                po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
 +                return 0;
 +        }
        default:
 +                return 0;
 +        }
        default: