mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
1938d5a669
SVN-Revision: 26293
87 lines
2.5 KiB
Diff
87 lines
2.5 KiB
Diff
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
@@ -1048,6 +1048,8 @@ static int ath9k_start(struct ieee80211_
|
|
"Starting driver with initial channel: %d MHz\n",
|
|
curchan->center_freq);
|
|
|
|
+ ath9k_ps_wakeup(sc);
|
|
+
|
|
mutex_lock(&sc->mutex);
|
|
|
|
/* setup initial channel */
|
|
@@ -1143,6 +1145,8 @@ static int ath9k_start(struct ieee80211_
|
|
mutex_unlock:
|
|
mutex_unlock(&sc->mutex);
|
|
|
|
+ ath9k_ps_restore(sc);
|
|
+
|
|
return r;
|
|
}
|
|
|
|
--- a/net/mac80211/ibss.c
|
|
+++ b/net/mac80211/ibss.c
|
|
@@ -661,7 +661,6 @@ static void ieee80211_sta_find_ibss(stru
|
|
static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
|
|
struct sk_buff *req)
|
|
{
|
|
- struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(req);
|
|
struct ieee80211_mgmt *mgmt = (void *)req->data;
|
|
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
|
|
struct ieee80211_local *local = sdata->local;
|
|
@@ -685,7 +684,7 @@ static void ieee80211_rx_mgmt_probe_req(
|
|
mgmt->bssid, tx_last_beacon);
|
|
#endif /* CONFIG_MAC80211_IBSS_DEBUG */
|
|
|
|
- if (!tx_last_beacon && !(rx_status->rx_flags & IEEE80211_RX_RA_MATCH))
|
|
+ if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da))
|
|
return;
|
|
|
|
if (memcmp(mgmt->bssid, ifibss->bssid, ETH_ALEN) != 0 &&
|
|
--- a/net/mac80211/rc80211_minstrel_ht.c
|
|
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
|
@@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, stru
|
|
struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
|
|
struct ieee80211_local *local = hw_to_local(mp->hw);
|
|
u16 sta_cap = sta->ht_cap.cap;
|
|
+ int n_supported = 0;
|
|
int ack_dur;
|
|
int stbc;
|
|
int i;
|
|
|
|
/* fall back to the old minstrel for legacy stations */
|
|
- if (!sta->ht_cap.ht_supported) {
|
|
- msp->is_ht = false;
|
|
- memset(&msp->legacy, 0, sizeof(msp->legacy));
|
|
- msp->legacy.r = msp->ratelist;
|
|
- msp->legacy.sample_table = msp->sample_table;
|
|
- return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
|
|
- }
|
|
+ if (!sta->ht_cap.ht_supported)
|
|
+ goto use_legacy;
|
|
|
|
BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) !=
|
|
MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS);
|
|
@@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, stru
|
|
|
|
mi->groups[i].supported =
|
|
mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
|
|
+
|
|
+ if (mi->groups[i].supported)
|
|
+ n_supported++;
|
|
}
|
|
+
|
|
+ if (!n_supported)
|
|
+ goto use_legacy;
|
|
+
|
|
+ return;
|
|
+
|
|
+use_legacy:
|
|
+ msp->is_ht = false;
|
|
+ memset(&msp->legacy, 0, sizeof(msp->legacy));
|
|
+ msp->legacy.r = msp->ratelist;
|
|
+ msp->legacy.sample_table = msp->sample_table;
|
|
+ return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
|
|
}
|
|
|
|
static void
|