add sta bridge support

This commit is contained in:
coolsnowwolf 2018-11-17 17:06:12 +08:00
parent 58d543fc15
commit dde72ce4f2
2 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,45 @@
--- a/net/wireless/util.c 2018-01-22 23:10:57.014111703 -0500
+++ b/net/wireless/util.c 2018-01-22 23:14:53.458313048 -0500
@@ -1018,7 +1018,6 @@
/* if it's part of a bridge, reject changing type to station/ibss */
if ((dev->priv_flags & IFF_BRIDGE_PORT) &&
(ntype == NL80211_IFTYPE_ADHOC ||
- ntype == NL80211_IFTYPE_STATION ||
ntype == NL80211_IFTYPE_P2P_CLIENT))
return -EBUSY;
@@ -1063,11 +1062,6 @@
if (!err) {
dev->priv_flags &= ~IFF_DONT_BRIDGE;
switch (ntype) {
- case NL80211_IFTYPE_STATION:
- if (dev->ieee80211_ptr->use_4addr)
- break;
- /* fall through */
- case NL80211_IFTYPE_OCB:
case NL80211_IFTYPE_P2P_CLIENT:
case NL80211_IFTYPE_ADHOC:
dev->priv_flags |= IFF_DONT_BRIDGE;
--- a/net/wireless/core.c 2018-01-22 23:10:57.002111693 -0500
+++ b/net/wireless/core.c 2018-01-22 23:16:14.930379807 -0500
@@ -1112,8 +1112,7 @@
/* allow mac80211 to determine the timeout */
wdev->ps_timeout = -1;
- if ((wdev->iftype == NL80211_IFTYPE_STATION ||
- wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
+ if ((wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr)
dev->priv_flags |= IFF_DONT_BRIDGE;
--- a/net/wireless/nl80211.c 2018-01-22 23:10:57.010111699 -0500
+++ b/net/wireless/nl80211.c 2018-01-22 23:17:24.366435886 -0500
@@ -2695,8 +2695,6 @@
enum nl80211_iftype iftype)
{
if (!use_4addr) {
- if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT))
- return -EBUSY;
return 0;
}

View File

@ -646,9 +646,6 @@ wpa_supplicant_prepare_interface() {
adhoc)
fail=1
;;
sta)
[ "$wds" = 1 ] || fail=1
;;
esac
[ -n "$fail" ] && {