Updated from Linux LTS 3.10.18 to 3.10.19
This commit is contained in:
@@ -3315,7 +3315,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
band = chanctx_conf->def.chan->band;
|
||||
sta = sta_info_get(sdata, peer);
|
||||
sta = sta_info_get_bss(sdata, peer);
|
||||
if (sta) {
|
||||
qos = test_sta_flag(sta, WLAN_STA_WME);
|
||||
} else {
|
||||
|
||||
@@ -842,6 +842,8 @@ struct tpt_led_trigger {
|
||||
* that the scan completed.
|
||||
* @SCAN_ABORTED: Set for our scan work function when the driver reported
|
||||
* a scan complete for an aborted scan.
|
||||
* @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being
|
||||
* cancelled.
|
||||
*/
|
||||
enum {
|
||||
SCAN_SW_SCANNING,
|
||||
@@ -849,6 +851,7 @@ enum {
|
||||
SCAN_ONCHANNEL_SCANNING,
|
||||
SCAN_COMPLETED,
|
||||
SCAN_ABORTED,
|
||||
SCAN_HW_CANCELLED,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -3002,6 +3002,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
if (!bssid)
|
||||
return 0;
|
||||
if (ether_addr_equal(sdata->vif.addr, hdr->addr2) ||
|
||||
ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2))
|
||||
return 0;
|
||||
if (ieee80211_is_beacon(hdr->frame_control)) {
|
||||
return 1;
|
||||
} else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) {
|
||||
|
||||
@@ -202,6 +202,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
|
||||
enum ieee80211_band band;
|
||||
int i, ielen, n_chans;
|
||||
|
||||
if (test_bit(SCAN_HW_CANCELLED, &local->scanning))
|
||||
return false;
|
||||
|
||||
do {
|
||||
if (local->hw_scan_band == IEEE80211_NUM_BANDS)
|
||||
return false;
|
||||
@@ -878,7 +881,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
|
||||
if (!local->scan_req)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* We have a scan running and the driver already reported completion,
|
||||
* but the worker hasn't run yet or is stuck on the mutex - mark it as
|
||||
* cancelled.
|
||||
*/
|
||||
if (test_bit(SCAN_HW_SCANNING, &local->scanning) &&
|
||||
test_bit(SCAN_COMPLETED, &local->scanning)) {
|
||||
set_bit(SCAN_HW_CANCELLED, &local->scanning);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (test_bit(SCAN_HW_SCANNING, &local->scanning)) {
|
||||
/*
|
||||
* Make sure that __ieee80211_scan_completed doesn't trigger a
|
||||
* scan on another band.
|
||||
*/
|
||||
set_bit(SCAN_HW_CANCELLED, &local->scanning);
|
||||
if (local->ops->cancel_hw_scan)
|
||||
drv_cancel_hw_scan(local,
|
||||
rcu_dereference_protected(local->scan_sdata,
|
||||
|
||||
@@ -180,6 +180,9 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
|
||||
struct ieee80211_local *local = sta->local;
|
||||
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
||||
|
||||
if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
|
||||
sta->last_rx = jiffies;
|
||||
|
||||
if (ieee80211_is_data_qos(mgmt->frame_control)) {
|
||||
struct ieee80211_hdr *hdr = (void *) skb->data;
|
||||
u8 *qc = ieee80211_get_qos_ctl(hdr);
|
||||
|
||||
@@ -1115,7 +1115,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
|
||||
tx->sta = rcu_dereference(sdata->u.vlan.sta);
|
||||
if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
|
||||
return TX_DROP;
|
||||
} else if (info->flags & IEEE80211_TX_CTL_INJECTED ||
|
||||
} else if (info->flags & (IEEE80211_TX_CTL_INJECTED |
|
||||
IEEE80211_TX_INTFL_NL80211_FRAME_TX) ||
|
||||
tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
|
||||
@@ -2174,6 +2174,10 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
|
||||
}
|
||||
|
||||
rate = cfg80211_calculate_bitrate(&ri);
|
||||
if (WARN_ONCE(!rate,
|
||||
"Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n",
|
||||
status->flag, status->rate_idx, status->vht_nss))
|
||||
return 0;
|
||||
|
||||
/* rewind from end of MPDU */
|
||||
if (status->flag & RX_FLAG_MACTIME_END)
|
||||
|
||||
@@ -269,6 +269,8 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
|
||||
if (chan->flags & IEEE80211_CHAN_DISABLED)
|
||||
continue;
|
||||
wdev->wext.ibss.chandef.chan = chan;
|
||||
wdev->wext.ibss.chandef.center_freq1 =
|
||||
chan->center_freq;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -353,6 +355,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
|
||||
if (chan) {
|
||||
wdev->wext.ibss.chandef.chan = chan;
|
||||
wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
|
||||
wdev->wext.ibss.chandef.center_freq1 = freq;
|
||||
wdev->wext.ibss.channel_fixed = true;
|
||||
} else {
|
||||
/* cfg80211_ibss_wext_join will pick one if needed */
|
||||
|
||||
Reference in New Issue
Block a user