madwifi: disable bogus vlan handling code which actually breaks vlan
[openwrt.git] / package / madwifi / patches / 362-rssithr.patch
index 137e64a..376204a 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
  #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -2798,6 +2798,12 @@
+@@ -2799,6 +2799,12 @@
        case IEEE80211_PARAM_ROAM_RATE_11G:
                vap->iv_roam.rate11b = value;
                break;
        case IEEE80211_PARAM_ROAM_RATE_11G:
                vap->iv_roam.rate11b = value;
                break;
@@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_PARAM_UAPSDINFO:
                if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
                        if (ic->ic_caps & IEEE80211_C_UAPSD) {
        case IEEE80211_PARAM_UAPSDINFO:
                if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
                        if (ic->ic_caps & IEEE80211_C_UAPSD) {
-@@ -3183,6 +3189,12 @@
+@@ -3184,6 +3190,12 @@
        case IEEE80211_PARAM_ROAM_RATE_11G:
                param[0] = vap->iv_roam.rate11b;
                break;
        case IEEE80211_PARAM_ROAM_RATE_11G:
                param[0] = vap->iv_roam.rate11b;
                break;
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_PARAM_UAPSDINFO:
                if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
                        if (IEEE80211_VAP_UAPSD_ENABLED(vap))
        case IEEE80211_PARAM_UAPSDINFO:
                if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
                        if (IEEE80211_VAP_UAPSD_ENABLED(vap))
-@@ -5732,6 +5744,14 @@
+@@ -5733,6 +5745,14 @@
          IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11g" },
        { IEEE80211_PARAM_ROAM_RATE_11G,
          0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11g" },
          IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11g" },
        { IEEE80211_PARAM_ROAM_RATE_11G,
          0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11g" },
@@ -59,10 +59,11 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        { IEEE80211_PARAM_UAPSDINFO,
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
        { IEEE80211_PARAM_UAPSDINFO,
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -3263,6 +3263,17 @@
+@@ -3261,6 +3261,19 @@
+                       memcpy(ni->ni_tstamp.data, scan.tstamp,
+                               sizeof(ni->ni_tstamp));
  
  
-                       /* When rssi is low, start doing bgscans more frequently to allow
-                        * the supplicant to make a better switching decision */
++                      /* when rssi falls below the disconnection threshold, drop the connection */
 +                      if ((vap->iv_rssi_dis_thr > 0) && (vap->iv_rssi_dis_max > 0)) {
 +                              if ((rssi > 0) && (rssi < vap->iv_rssi_dis_thr)) {
 +                                      if (++vap->iv_rssi_dis_trig > vap->iv_rssi_dis_max) {
 +                      if ((vap->iv_rssi_dis_thr > 0) && (vap->iv_rssi_dis_max > 0)) {
 +                              if ((rssi > 0) && (rssi < vap->iv_rssi_dis_thr)) {
 +                                      if (++vap->iv_rssi_dis_trig > vap->iv_rssi_dis_max) {
@@ -74,9 +75,10 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +                                      vap->iv_rssi_dis_trig = 0;
 +                              }
 +                      }
 +                                      vap->iv_rssi_dis_trig = 0;
 +                              }
 +                      }
-                       if ((rssi < vap->iv_bgscanthr) &&
-                                       (!vap->iv_bgscanthr_next ||
-                                               !time_before(jiffies, vap->iv_bgscanthr_next)) &&
++
+                       /* When rssi is low, start doing bgscans more frequently to allow
+                        * the supplicant to make a better switching decision */
+                       if (!(ic->ic_flags & IEEE80211_F_SCAN) && (rssi < vap->iv_bgscanthr) &&
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
 @@ -223,6 +223,9 @@
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
 @@ -223,6 +223,9 @@
@@ -87,5 +89,5 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +      u_int iv_rssi_dis_max;                          /* max beacons below disconnect threshold */
 +      u_int iv_rssi_dis_trig;                         /* rssi disassoc trigger count */
        unsigned long iv_bgscanthr_next;                /* last trigger for bgscan */
 +      u_int iv_rssi_dis_max;                          /* max beacons below disconnect threshold */
 +      u_int iv_rssi_dis_trig;                         /* rssi disassoc trigger count */
        unsigned long iv_bgscanthr_next;                /* last trigger for bgscan */
+       unsigned long iv_lastconnect;   /* time of last connect attempt */
        u_int iv_scanvalid;                             /* scan cache valid threshold */
        u_int iv_scanvalid;                             /* scan cache valid threshold */
-       struct ieee80211_roam iv_roam;                  /* sta-mode roaming state */
This page took 0.02434 seconds and 4 git commands to generate.