compat-wireless: backport netdev->br_port
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 16 Jun 2010 20:49:26 +0000 (22:49 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 17 Jun 2010 05:34:03 +0000 (22:34 -0700)
In commit f350a0a87374418635689471606454abc7beaa3a the br_port
attribute was replaced with a private flag.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/30-br-port-backport.patch [new file with mode: 0644]

diff --git a/patches/30-br-port-backport.patch b/patches/30-br-port-backport.patch
new file mode 100644 (file)
index 0000000..bb2491e
--- /dev/null
@@ -0,0 +1,31 @@
+In commit f350a0a87374418635689471606454abc7beaa3a the br_port
+attribute was replaced with a private flag.
+
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -1109,7 +1109,11 @@ static int nl80211_valid_4addr(struct cf
+                              enum nl80211_iftype iftype)
+ {
+       if (!use_4addr) {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+               if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT))
++#else
++              if (netdev && netdev->br_port)
++#endif
+                       return -EBUSY;
+               return 0;
+       }
+--- a/net/wireless/util.c
++++ b/net/wireless/util.c
+@@ -770,7 +770,11 @@ int cfg80211_change_iface(struct cfg8021
+               return -EOPNOTSUPP;
+       /* if it's part of a bridge, reject changing type to station/ibss */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+       if ((dev->priv_flags & IFF_BRIDGE_PORT) &&
++#else
++      if (dev->br_port &&
++#endif
+           (ntype == NL80211_IFTYPE_ADHOC || ntype == NL80211_IFTYPE_STATION))
+               return -EBUSY;