mac80211: update to wireless-testing 2011-03-24
[lede.git] / package / mac80211 / patches / 300-pending_work.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -1048,6 +1048,8 @@ static int ath9k_start(struct ieee80211_
4                 "Starting driver with initial channel: %d MHz\n",
5                 curchan->center_freq);
6  
7 +       ath9k_ps_wakeup(sc);
8 +
9         mutex_lock(&sc->mutex);
10  
11         /* setup initial channel */
12 @@ -1143,6 +1145,8 @@ static int ath9k_start(struct ieee80211_
13  mutex_unlock:
14         mutex_unlock(&sc->mutex);
15  
16 +       ath9k_ps_restore(sc);
17 +
18         return r;
19  }
20  
21 --- a/net/mac80211/ibss.c
22 +++ b/net/mac80211/ibss.c
23 @@ -661,7 +661,6 @@ static void ieee80211_sta_find_ibss(stru
24  static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
25                                         struct sk_buff *req)
26  {
27 -       struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(req);
28         struct ieee80211_mgmt *mgmt = (void *)req->data;
29         struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
30         struct ieee80211_local *local = sdata->local;
31 @@ -685,7 +684,7 @@ static void ieee80211_rx_mgmt_probe_req(
32                mgmt->bssid, tx_last_beacon);
33  #endif /* CONFIG_MAC80211_IBSS_DEBUG */
34  
35 -       if (!tx_last_beacon && !(rx_status->rx_flags & IEEE80211_RX_RA_MATCH))
36 +       if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da))
37                 return;
38  
39         if (memcmp(mgmt->bssid, ifibss->bssid, ETH_ALEN) != 0 &&
40 --- a/net/mac80211/rc80211_minstrel_ht.c
41 +++ b/net/mac80211/rc80211_minstrel_ht.c
42 @@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, stru
43         struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
44         struct ieee80211_local *local = hw_to_local(mp->hw);
45         u16 sta_cap = sta->ht_cap.cap;
46 +       int n_supported = 0;
47         int ack_dur;
48         int stbc;
49         int i;
50  
51         /* fall back to the old minstrel for legacy stations */
52 -       if (!sta->ht_cap.ht_supported) {
53 -               msp->is_ht = false;
54 -               memset(&msp->legacy, 0, sizeof(msp->legacy));
55 -               msp->legacy.r = msp->ratelist;
56 -               msp->legacy.sample_table = msp->sample_table;
57 -               return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
58 -       }
59 +       if (!sta->ht_cap.ht_supported)
60 +               goto use_legacy;
61  
62         BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) !=
63                 MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS);
64 @@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, stru
65  
66                 mi->groups[i].supported =
67                         mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
68 +
69 +               if (mi->groups[i].supported)
70 +                       n_supported++;
71         }
72 +
73 +       if (!n_supported)
74 +               goto use_legacy;
75 +
76 +       return;
77 +
78 +use_legacy:
79 +       msp->is_ht = false;
80 +       memset(&msp->legacy, 0, sizeof(msp->legacy));
81 +       msp->legacy.r = msp->ratelist;
82 +       msp->legacy.sample_table = msp->sample_table;
83 +       return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
84  }
85  
86  static void