package/kernel: create package for the RT305x dwc_otg driver
[openwrt.git] / package / madwifi / patches / 411-autochannel_multi.patch
index ab48e70..d05c447 100644 (file)
@@ -87,7 +87,7 @@
 +              else
 +                      bias += get_overlap(ch->freq, c->ic_freq, ch->bw, bw);
 +      }
-+      return min(bias, (u32) 100);
++      return bias;
 +}
 +EXPORT_SYMBOL(ieee80211_scan_get_bias);
 +
  void
  ieee80211_scan_attach(struct ieee80211com *ic)
  {
-@@ -1155,7 +1272,7 @@ ieee80211_scan_dfs_action(struct ieee802
+@@ -1169,7 +1286,7 @@ ieee80211_scan_dfs_action(struct ieee802
                                IEEE80211_RADAR_CHANCHANGE_TBTT_COUNT;
                        ic->ic_flags |= IEEE80211_F_CHANSWITCH;
                } else {
                        IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
                                        "%s: directly switching to channel "
                                        "%3d (%4d MHz)\n", __func__,
-@@ -1166,6 +1283,9 @@ ieee80211_scan_dfs_action(struct ieee802
+@@ -1180,6 +1297,9 @@ ieee80211_scan_dfs_action(struct ieee802
                         * change the channel here. */
                        change_channel(ic, new_channel);
                        ic->ic_bsschan = new_channel;
                ieee80211_stop(vap->iv_dev);
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -2772,6 +2772,7 @@ static void
+@@ -2775,6 +2775,7 @@ static void
  ieee80211_doth_switch_channel(struct ieee80211vap *vap)
  {
        struct ieee80211com *ic = vap->iv_ic;
  
        IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
                          "%s: Channel switch to %3d (%4d MHz) NOW!\n",
-@@ -2794,6 +2795,9 @@ ieee80211_doth_switch_channel(struct iee
+@@ -2797,6 +2798,9 @@ ieee80211_doth_switch_channel(struct iee
  
        ic->ic_curchan = ic->ic_bsschan = vap->iv_csa_chan;
        ic->ic_set_channel(ic);
         * the auto-select case; this should be redundant if the
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -1225,6 +1225,7 @@ ieee80211_dturbo_switch(struct ieee80211
+@@ -1231,6 +1231,7 @@ ieee80211_dturbo_switch(struct ieee80211
        struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
  #endif
        struct ieee80211_channel *chan;
  
        chan = ieee80211_find_channel(ic, ic->ic_bsschan->ic_freq, newflags);
        if (chan == NULL) {             /* XXX should not happen */
-@@ -1243,6 +1244,9 @@ ieee80211_dturbo_switch(struct ieee80211
+@@ -1249,6 +1250,9 @@ ieee80211_dturbo_switch(struct ieee80211
        ic->ic_bsschan = chan;
        ic->ic_curchan = chan;
        ic->ic_set_channel(ic);
        /* update Supported Channels information element */
 --- a/net80211/ieee80211_scan_ap.c
 +++ b/net80211/ieee80211_scan_ap.c
-@@ -213,9 +213,15 @@ ap_start(struct ieee80211_scan_state *ss
+@@ -208,9 +208,15 @@ ap_start(struct ieee80211_scan_state *ss
        struct ieee80211com *ic     = NULL;
        int i;
        unsigned int mode = 0;
 +      spin_unlock_irqrestore(&channel_lock, sflags);
 +
        /* Determine mode flags to match, or leave zero for auto mode */
-       as->as_vap_desired_mode = vap->iv_des_mode;
-       as->as_required_mode    = 0;
-@@ -429,8 +435,10 @@ pc_cmp_idletime(struct ieee80211_channel
+       ss->ss_last = 0;
+       ieee80211_scan_add_channels(ic, ss, vap->iv_des_mode);
+@@ -423,8 +429,10 @@ pc_cmp_idletime(struct ieee80211_channel
        if (!a->ic_idletime || !b->ic_idletime)
                return 0;
  
  }
  
  
-@@ -616,6 +624,7 @@ ap_end(struct ieee80211_scan_state *ss, 
+@@ -575,6 +583,7 @@ ap_end(struct ieee80211_scan_state *ss,
        struct ap_state *as = ss->ss_priv;
        struct ieee80211_channel *bestchan = NULL;
        struct ieee80211com *ic = NULL;
        int res = 1;
  
        SCAN_AP_LOCK_IRQ(as);
-@@ -624,8 +633,11 @@ ap_end(struct ieee80211_scan_state *ss, 
-               ("wrong opmode %u", vap->iv_opmode));
+@@ -586,8 +595,11 @@ ap_end(struct ieee80211_scan_state *ss,
  
-       ic = vap->iv_ic;
+       /* record stats for the channel that was scanned last */
+       ic->ic_set_channel(ic);
 +      spin_lock_irqsave(&channel_lock, sflags);
 +      ieee80211_scan_set_bss_channel(ic, NULL);
        bestchan = pick_channel(ss, vap, flags);
                if (ss->ss_last > 0) {
                        /* no suitable channel, should not happen */
                        printk(KERN_ERR "%s: %s: no suitable channel! "
-@@ -644,6 +656,7 @@ ap_end(struct ieee80211_scan_state *ss, 
+@@ -606,6 +618,7 @@ ap_end(struct ieee80211_scan_state *ss,
                                        bestchan->ic_freq, bestchan->ic_flags &
                                        ~IEEE80211_CHAN_TURBO)) == NULL) {
                                /* should never happen ?? */
                                SCAN_AP_UNLOCK_IRQ_EARLY(as);
                                return 0;
                        }
-@@ -656,6 +669,9 @@ ap_end(struct ieee80211_scan_state *ss, 
+@@ -618,6 +631,9 @@ ap_end(struct ieee80211_scan_state *ss,
                        as->as_action = action;
                as->as_selbss = se;
  
This page took 0.030976 seconds and 4 git commands to generate.