2013-02-23 01:12:36 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/common.h
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/common.h
|
|
|
|
@@ -27,7 +27,7 @@
|
|
|
|
#define WME_MAX_BA WME_BA_BMP_SIZE
|
|
|
|
#define ATH_TID_MAX_BUFS (2 * WME_MAX_BA)
|
|
|
|
|
|
|
|
-#define ATH_RSSI_DUMMY_MARKER 0x127
|
|
|
|
+#define ATH_RSSI_DUMMY_MARKER 127
|
|
|
|
#define ATH_RSSI_LPF_LEN 10
|
|
|
|
#define RSSI_LPF_THRESHOLD -20
|
|
|
|
#define ATH_RSSI_EP_MULTIPLIER (1<<7)
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
|
|
|
|
@@ -1067,15 +1067,19 @@ static bool ath9k_rx_prepare(struct ath9
|
|
|
|
|
|
|
|
last_rssi = priv->rx.last_rssi;
|
|
|
|
|
|
|
|
- if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
|
|
|
|
- rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
|
|
|
|
- ATH_RSSI_EP_MULTIPLIER);
|
|
|
|
+ if (ieee80211_is_beacon(hdr->frame_control) &&
|
|
|
|
+ !is_zero_ether_addr(common->curbssid) &&
|
|
|
|
+ ether_addr_equal(hdr->addr3, common->curbssid)) {
|
|
|
|
+ s8 rssi = rxbuf->rxstatus.rs_rssi;
|
|
|
|
|
|
|
|
- if (rxbuf->rxstatus.rs_rssi < 0)
|
|
|
|
- rxbuf->rxstatus.rs_rssi = 0;
|
|
|
|
+ if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
|
|
|
|
+ rssi = ATH_EP_RND(last_rssi, ATH_RSSI_EP_MULTIPLIER);
|
|
|
|
|
|
|
|
- if (ieee80211_is_beacon(fc))
|
|
|
|
- priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
|
|
|
|
+ if (rssi < 0)
|
|
|
|
+ rssi = 0;
|
|
|
|
+
|
|
|
|
+ priv->ah->stats.avgbrssi = rssi;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
|
|
|
|
rx_status->band = hw->conf.channel->band;
|
|
|
|
--- a/include/linux/ieee80211.h
|
|
|
|
+++ b/include/linux/ieee80211.h
|
|
|
|
@@ -185,7 +185,7 @@ struct ieee80211_hdr {
|
|
|
|
u8 addr3[6];
|
|
|
|
__le16 seq_ctrl;
|
|
|
|
u8 addr4[6];
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
struct ieee80211_hdr_3addr {
|
|
|
|
__le16 frame_control;
|
|
|
|
@@ -194,7 +194,7 @@ struct ieee80211_hdr_3addr {
|
|
|
|
u8 addr2[6];
|
|
|
|
u8 addr3[6];
|
|
|
|
__le16 seq_ctrl;
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
struct ieee80211_qos_hdr {
|
|
|
|
__le16 frame_control;
|
|
|
|
@@ -204,7 +204,7 @@ struct ieee80211_qos_hdr {
|
|
|
|
u8 addr3[6];
|
|
|
|
__le16 seq_ctrl;
|
|
|
|
__le16 qos_ctrl;
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
|
|
|
|
@@ -581,7 +581,7 @@ struct ieee80211s_hdr {
|
|
|
|
__le32 seqnum;
|
|
|
|
u8 eaddr1[6];
|
|
|
|
u8 eaddr2[6];
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
/* Mesh flags */
|
|
|
|
#define MESH_FLAGS_AE_A4 0x1
|
|
|
|
@@ -875,7 +875,7 @@ struct ieee80211_mgmt {
|
|
|
|
} u;
|
|
|
|
} __packed action;
|
|
|
|
} u;
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
|
|
|
|
#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
|
|
|
|
@@ -906,20 +906,20 @@ struct ieee80211_rts {
|
|
|
|
__le16 duration;
|
|
|
|
u8 ra[6];
|
|
|
|
u8 ta[6];
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
struct ieee80211_cts {
|
|
|
|
__le16 frame_control;
|
|
|
|
__le16 duration;
|
|
|
|
u8 ra[6];
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
struct ieee80211_pspoll {
|
|
|
|
__le16 frame_control;
|
|
|
|
__le16 aid;
|
|
|
|
u8 bssid[6];
|
|
|
|
u8 ta[6];
|
|
|
|
-} __packed;
|
|
|
|
+} __packed __aligned(2);
|
|
|
|
|
|
|
|
/* TDLS */
|
|
|
|
|
2012-06-18 01:26:36 +00:00
|
|
|
--- a/net/mac80211/agg-rx.c
|
|
|
|
+++ b/net/mac80211/agg-rx.c
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -204,6 +204,8 @@ static void ieee80211_send_addba_resp(st
|
2011-05-31 23:07:29 +00:00
|
|
|
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
|
2012-02-07 11:28:11 +00:00
|
|
|
else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
|
2011-12-05 14:20:17 +00:00
|
|
|
+ else if (sdata->vif.type == NL80211_IFTYPE_WDS)
|
|
|
|
+ memcpy(mgmt->bssid, da, ETH_ALEN);
|
2011-05-31 23:07:29 +00:00
|
|
|
|
|
|
|
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
|
|
|
|
IEEE80211_STYPE_ACTION);
|
|
|
|
--- a/net/mac80211/agg-tx.c
|
|
|
|
+++ b/net/mac80211/agg-tx.c
|
2012-02-07 11:28:11 +00:00
|
|
|
@@ -81,7 +81,8 @@ static void ieee80211_send_addba_request
|
2011-05-31 23:07:29 +00:00
|
|
|
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_AP ||
|
2011-11-18 11:27:19 +00:00
|
|
|
sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
|
|
|
|
- sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
|
|
|
|
+ sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
|
2011-05-31 23:07:29 +00:00
|
|
|
+ sdata->vif.type == NL80211_IFTYPE_WDS)
|
|
|
|
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
|
|
|
|
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
|
|
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -527,6 +528,7 @@ int ieee80211_start_tx_ba_session(struct
|
2011-11-18 11:27:19 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
|
2011-05-31 23:07:29 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP &&
|
2011-12-05 14:20:17 +00:00
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_ADHOC)
|
2011-12-05 14:20:17 +00:00
|
|
|
return -EINVAL;
|
|
|
|
|
2011-05-31 23:07:29 +00:00
|
|
|
--- a/net/mac80211/debugfs_sta.c
|
|
|
|
+++ b/net/mac80211/debugfs_sta.c
|
2012-12-07 16:46:04 +00:00
|
|
|
@@ -65,11 +65,11 @@ static ssize_t sta_flags_read(struct fil
|
2011-10-09 15:48:03 +00:00
|
|
|
test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
|
|
|
|
|
|
|
|
int res = scnprintf(buf, sizeof(buf),
|
2013-02-23 01:12:36 +00:00
|
|
|
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
|
|
|
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
2011-10-09 15:48:03 +00:00
|
|
|
TEST(AUTH), TEST(ASSOC), TEST(PS_STA),
|
|
|
|
TEST(PS_DRIVER), TEST(AUTHORIZED),
|
2011-12-05 14:20:17 +00:00
|
|
|
TEST(SHORT_PREAMBLE),
|
2011-10-09 15:48:03 +00:00
|
|
|
- TEST(WME), TEST(WDS), TEST(CLEAR_PS_FILT),
|
|
|
|
+ TEST(WME), TEST(CLEAR_PS_FILT),
|
|
|
|
TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
|
|
|
|
TEST(UAPSD), TEST(SP), TEST(TDLS_PEER),
|
2012-02-07 11:28:11 +00:00
|
|
|
TEST(TDLS_PEER_AUTH), TEST(4ADDR_EVENT),
|
2011-05-31 23:07:29 +00:00
|
|
|
--- a/net/mac80211/iface.c
|
|
|
|
+++ b/net/mac80211/iface.c
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -436,7 +436,6 @@ int ieee80211_do_open(struct wireless_de
|
2012-09-08 11:10:54 +00:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
|
|
|
|
struct net_device *dev = wdev->netdev;
|
2011-05-31 23:07:29 +00:00
|
|
|
struct ieee80211_local *local = sdata->local;
|
|
|
|
- struct sta_info *sta;
|
|
|
|
u32 changed = 0;
|
|
|
|
int res;
|
|
|
|
u32 hw_reconf_flags = 0;
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -595,30 +594,8 @@ int ieee80211_do_open(struct wireless_de
|
2011-05-31 23:07:29 +00:00
|
|
|
|
|
|
|
set_bit(SDATA_STATE_RUNNING, &sdata->state);
|
|
|
|
|
|
|
|
- if (sdata->vif.type == NL80211_IFTYPE_WDS) {
|
|
|
|
- /* Create STA entry for the WDS peer */
|
|
|
|
- sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
|
|
|
|
- GFP_KERNEL);
|
|
|
|
- if (!sta) {
|
|
|
|
- res = -ENOMEM;
|
|
|
|
- goto err_del_interface;
|
|
|
|
- }
|
|
|
|
-
|
2012-02-07 11:28:11 +00:00
|
|
|
- sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
|
|
|
|
- sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
|
|
|
|
- sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
|
2011-05-31 23:07:29 +00:00
|
|
|
-
|
|
|
|
- res = sta_info_insert(sta);
|
|
|
|
- if (res) {
|
|
|
|
- /* STA has been freed */
|
|
|
|
- goto err_del_interface;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- rate_control_rate_init(sta);
|
2012-09-08 11:10:54 +00:00
|
|
|
- netif_carrier_on(dev);
|
|
|
|
- } else if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE) {
|
|
|
|
+ if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE)
|
|
|
|
rcu_assign_pointer(local->p2p_sdata, sdata);
|
2011-05-31 23:07:29 +00:00
|
|
|
- }
|
2012-09-08 11:10:54 +00:00
|
|
|
|
2011-05-31 23:07:29 +00:00
|
|
|
/*
|
|
|
|
* set_multicast_list will be invoked by the networking core
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -1022,6 +999,72 @@ static void ieee80211_if_setup(struct ne
|
2011-05-31 23:07:29 +00:00
|
|
|
dev->destructor = free_netdev;
|
|
|
|
}
|
|
|
|
|
|
|
|
+static void ieee80211_wds_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
|
|
|
|
+ struct sk_buff *skb)
|
|
|
|
+{
|
|
|
|
+ struct ieee80211_local *local = sdata->local;
|
|
|
|
+ struct ieee80211_rx_status *rx_status;
|
|
|
|
+ struct ieee802_11_elems elems;
|
|
|
|
+ struct ieee80211_mgmt *mgmt;
|
|
|
|
+ struct sta_info *sta;
|
|
|
|
+ size_t baselen;
|
|
|
|
+ u32 rates = 0;
|
|
|
|
+ u16 stype;
|
|
|
|
+ bool new = false;
|
|
|
|
+ enum ieee80211_band band = local->hw.conf.channel->band;
|
|
|
|
+ struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
|
|
|
|
+
|
|
|
|
+ rx_status = IEEE80211_SKB_RXCB(skb);
|
|
|
|
+ mgmt = (struct ieee80211_mgmt *) skb->data;
|
|
|
|
+ stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE;
|
|
|
|
+
|
|
|
|
+ if (stype != IEEE80211_STYPE_BEACON)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
|
|
|
|
+ if (baselen > skb->len)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ ieee802_11_parse_elems(mgmt->u.probe_resp.variable,
|
|
|
|
+ skb->len - baselen, &elems);
|
|
|
|
+
|
2012-04-16 21:08:41 +00:00
|
|
|
+ rates = ieee80211_sta_get_rates(local, &elems, band, NULL);
|
2011-05-31 23:07:29 +00:00
|
|
|
+
|
|
|
|
+ rcu_read_lock();
|
|
|
|
+
|
|
|
|
+ sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
|
|
|
|
+
|
|
|
|
+ if (!sta) {
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
+ sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
|
|
|
|
+ GFP_KERNEL);
|
|
|
|
+ if (!sta)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ new = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ sta->last_rx = jiffies;
|
|
|
|
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
|
|
|
|
+
|
|
|
|
+ if (elems.ht_cap_elem)
|
2011-12-05 14:20:17 +00:00
|
|
|
+ ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
|
2013-02-23 01:12:36 +00:00
|
|
|
+ elems.ht_cap_elem, sta);
|
2011-05-31 23:07:29 +00:00
|
|
|
+
|
|
|
|
+ if (elems.wmm_param)
|
2011-10-09 15:48:03 +00:00
|
|
|
+ set_sta_flag(sta, WLAN_STA_WME);
|
2011-05-31 23:07:29 +00:00
|
|
|
+
|
|
|
|
+ if (new) {
|
2012-04-19 18:32:39 +00:00
|
|
|
+ sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
|
|
|
|
+ sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
|
|
|
|
+ sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
|
2011-05-31 23:07:29 +00:00
|
|
|
+ rate_control_rate_init(sta);
|
|
|
|
+ sta_info_insert_rcu(sta);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
static void ieee80211_iface_work(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct ieee80211_sub_if_data *sdata =
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -1126,6 +1169,9 @@ static void ieee80211_iface_work(struct
|
2011-05-31 23:07:29 +00:00
|
|
|
break;
|
|
|
|
ieee80211_mesh_rx_queued_mgmt(sdata, skb);
|
|
|
|
break;
|
|
|
|
+ case NL80211_IFTYPE_WDS:
|
|
|
|
+ ieee80211_wds_rx_queued_mgmt(sdata, skb);
|
|
|
|
+ break;
|
|
|
|
default:
|
|
|
|
WARN(1, "frame for unexpected interface type");
|
|
|
|
break;
|
|
|
|
--- a/net/mac80211/rx.c
|
|
|
|
+++ b/net/mac80211/rx.c
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -2365,6 +2365,7 @@ ieee80211_rx_h_action(struct ieee80211_r
|
2011-11-18 11:27:19 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
|
2011-05-31 23:07:29 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP &&
|
2011-12-05 14:20:17 +00:00
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_ADHOC)
|
2011-05-31 23:07:29 +00:00
|
|
|
break;
|
|
|
|
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -2692,14 +2693,15 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
|
2011-05-31 23:07:29 +00:00
|
|
|
|
|
|
|
if (!ieee80211_vif_is_mesh(&sdata->vif) &&
|
|
|
|
sdata->vif.type != NL80211_IFTYPE_ADHOC &&
|
|
|
|
- sdata->vif.type != NL80211_IFTYPE_STATION)
|
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_STATION &&
|
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS)
|
|
|
|
return RX_DROP_MONITOR;
|
|
|
|
|
|
|
|
switch (stype) {
|
2012-02-07 11:28:11 +00:00
|
|
|
case cpu_to_le16(IEEE80211_STYPE_AUTH):
|
2011-05-31 23:07:29 +00:00
|
|
|
case cpu_to_le16(IEEE80211_STYPE_BEACON):
|
|
|
|
case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
|
|
|
|
- /* process for all: mesh, mlme, ibss */
|
|
|
|
+ /* process for all: mesh, mlme, ibss, wds */
|
|
|
|
break;
|
2012-02-07 11:28:11 +00:00
|
|
|
case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP):
|
|
|
|
case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP):
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -3028,10 +3030,16 @@ static int prepare_for_handlers(struct i
|
2011-05-31 23:07:29 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case NL80211_IFTYPE_WDS:
|
|
|
|
- if (bssid || !ieee80211_is_data(hdr->frame_control))
|
|
|
|
- return 0;
|
2012-06-18 01:26:36 +00:00
|
|
|
if (!ether_addr_equal(sdata->u.wds.remote_addr, hdr->addr2))
|
2011-05-31 23:07:29 +00:00
|
|
|
return 0;
|
|
|
|
+
|
|
|
|
+ if (ieee80211_is_data(hdr->frame_control) ||
|
|
|
|
+ ieee80211_is_action(hdr->frame_control)) {
|
|
|
|
+ if (compare_ether_addr(sdata->vif.addr, hdr->addr1))
|
|
|
|
+ return 0;
|
|
|
|
+ } else if (!ieee80211_is_beacon(hdr->frame_control))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
break;
|
2012-09-08 11:10:54 +00:00
|
|
|
case NL80211_IFTYPE_P2P_DEVICE:
|
|
|
|
if (!ieee80211_is_public_action(hdr, skb->len) &&
|
2012-02-27 22:56:05 +00:00
|
|
|
--- a/net/mac80211/sta_info.h
|
|
|
|
+++ b/net/mac80211/sta_info.h
|
2012-04-16 21:08:41 +00:00
|
|
|
@@ -32,7 +32,6 @@
|
2012-02-27 22:56:05 +00:00
|
|
|
* @WLAN_STA_SHORT_PREAMBLE: Station is capable of receiving short-preamble
|
|
|
|
* frames.
|
|
|
|
* @WLAN_STA_WME: Station is a QoS-STA.
|
|
|
|
- * @WLAN_STA_WDS: Station is one of our WDS peers.
|
|
|
|
* @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the
|
|
|
|
* IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
|
|
|
|
* frame to this station is transmitted.
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -66,7 +65,6 @@ enum ieee80211_sta_info_flags {
|
2012-02-27 22:56:05 +00:00
|
|
|
WLAN_STA_AUTHORIZED,
|
|
|
|
WLAN_STA_SHORT_PREAMBLE,
|
|
|
|
WLAN_STA_WME,
|
|
|
|
- WLAN_STA_WDS,
|
|
|
|
WLAN_STA_CLEAR_PS_FILT,
|
|
|
|
WLAN_STA_MFP,
|
|
|
|
WLAN_STA_BLOCK_BA,
|
2013-02-23 01:12:36 +00:00
|
|
|
--- a/net/mac80211/tx.c
|
|
|
|
+++ b/net/mac80211/tx.c
|
|
|
|
@@ -1848,9 +1848,24 @@ netdev_tx_t ieee80211_subif_start_xmit(s
|
2013-01-20 18:33:21 +00:00
|
|
|
}
|
|
|
|
|
2013-02-23 01:12:36 +00:00
|
|
|
if (!is_multicast_ether_addr(skb->data)) {
|
|
|
|
+ struct sta_info *next_hop;
|
|
|
|
+ bool mpp_lookup = true;
|
|
|
|
+
|
|
|
|
mpath = mesh_path_lookup(sdata, skb->data);
|
|
|
|
- if (!mpath)
|
|
|
|
+ if (mpath) {
|
|
|
|
+ mpp_lookup = false;
|
|
|
|
+ next_hop = rcu_dereference(mpath->next_hop);
|
|
|
|
+ if (!next_hop ||
|
|
|
|
+ !(mpath->flags & (MESH_PATH_ACTIVE |
|
|
|
|
+ MESH_PATH_RESOLVING)))
|
|
|
|
+ mpp_lookup = true;
|
|
|
|
+ }
|
2013-01-20 18:33:21 +00:00
|
|
|
+
|
2013-02-23 01:12:36 +00:00
|
|
|
+ if (mpp_lookup)
|
|
|
|
mppath = mpp_path_lookup(sdata, skb->data);
|
2013-01-21 12:46:37 +00:00
|
|
|
+
|
2013-02-23 01:12:36 +00:00
|
|
|
+ if (mppath && mpath)
|
|
|
|
+ mesh_path_del(mpath->sdata, mpath->dst);
|
|
|
|
}
|
2012-12-10 18:29:17 +00:00
|
|
|
|
2013-02-23 01:12:36 +00:00
|
|
|
/*
|
|
|
|
--- a/net/wireless/nl80211.c
|
|
|
|
+++ b/net/wireless/nl80211.c
|
|
|
|
@@ -554,16 +554,9 @@ static int nl80211_msg_put_channel(struc
|
|
|
|
if ((chan->flags & IEEE80211_CHAN_NO_IBSS) &&
|
|
|
|
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_IBSS))
|
|
|
|
goto nla_put_failure;
|
|
|
|
- if (chan->flags & IEEE80211_CHAN_RADAR) {
|
|
|
|
- u32 time = elapsed_jiffies_msecs(chan->dfs_state_entered);
|
|
|
|
- if (nla_put_flag(msg, NL80211_FREQUENCY_ATTR_RADAR))
|
|
|
|
- goto nla_put_failure;
|
|
|
|
- if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_DFS_STATE,
|
|
|
|
- chan->dfs_state))
|
|
|
|
- goto nla_put_failure;
|
|
|
|
- if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_DFS_TIME, time))
|
|
|
|
- goto nla_put_failure;
|
|
|
|
- }
|
|
|
|
+ if ((chan->flags & IEEE80211_CHAN_RADAR) &&
|
|
|
|
+ nla_put_flag(msg, NL80211_FREQUENCY_ATTR_RADAR))
|
|
|
|
+ goto nla_put_failure;
|
|
|
|
if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
|
|
|
|
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
|
|
|
|
goto nla_put_failure;
|
|
|
|
@@ -900,9 +893,6 @@ static int nl80211_put_iface_combination
|
|
|
|
nla_put_u32(msg, NL80211_IFACE_COMB_MAXNUM,
|
|
|
|
c->max_interfaces))
|
|
|
|
goto nla_put_failure;
|
|
|
|
- if (nla_put_u32(msg, NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
|
|
|
|
- c->radar_detect_widths))
|
|
|
|
- goto nla_put_failure;
|
|
|
|
|
|
|
|
nla_nest_end(msg, nl_combi);
|
2013-01-14 09:51:53 +00:00
|
|
|
}
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -914,48 +904,6 @@ nla_put_failure:
|
|
|
|
return -ENOBUFS;
|
2013-01-09 12:45:28 +00:00
|
|
|
}
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-02-23 01:12:36 +00:00
|
|
|
-#ifdef CONFIG_PM
|
|
|
|
-static int nl80211_send_wowlan_tcp_caps(struct cfg80211_registered_device *rdev,
|
|
|
|
- struct sk_buff *msg)
|
2013-01-09 12:45:28 +00:00
|
|
|
-{
|
2013-02-23 01:12:36 +00:00
|
|
|
- const struct wiphy_wowlan_tcp_support *tcp = rdev->wiphy.wowlan.tcp;
|
|
|
|
- struct nlattr *nl_tcp;
|
2013-01-09 12:45:28 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (!tcp)
|
|
|
|
- return 0;
|
2013-01-09 12:45:28 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- nl_tcp = nla_nest_start(msg, NL80211_WOWLAN_TRIG_TCP_CONNECTION);
|
|
|
|
- if (!nl_tcp)
|
|
|
|
- return -ENOBUFS;
|
2013-01-14 09:51:53 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (nla_put_u32(msg, NL80211_WOWLAN_TCP_DATA_PAYLOAD,
|
|
|
|
- tcp->data_payload_max))
|
|
|
|
- return -ENOBUFS;
|
2013-01-09 12:56:25 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (nla_put_u32(msg, NL80211_WOWLAN_TCP_DATA_PAYLOAD,
|
|
|
|
- tcp->data_payload_max))
|
|
|
|
- return -ENOBUFS;
|
2013-01-09 12:56:25 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (tcp->seq && nla_put_flag(msg, NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ))
|
|
|
|
- return -ENOBUFS;
|
2013-01-09 12:56:25 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (tcp->tok && nla_put(msg, NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN,
|
|
|
|
- sizeof(*tcp->tok), tcp->tok))
|
|
|
|
- return -ENOBUFS;
|
2013-01-09 12:56:25 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (nla_put_u32(msg, NL80211_WOWLAN_TCP_DATA_INTERVAL,
|
|
|
|
- tcp->data_interval_max))
|
|
|
|
- return -ENOBUFS;
|
2013-01-09 12:56:25 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (nla_put_u32(msg, NL80211_WOWLAN_TCP_WAKE_PAYLOAD,
|
|
|
|
- tcp->wake_payload_max))
|
|
|
|
- return -ENOBUFS;
|
2013-01-20 18:33:21 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
- nla_nest_end(msg, nl_tcp);
|
|
|
|
- return 0;
|
2013-01-20 18:33:21 +00:00
|
|
|
-}
|
2013-02-23 01:12:36 +00:00
|
|
|
-#endif
|
2013-01-20 18:33:21 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
static int nl80211_send_wiphy(struct sk_buff *msg, u32 portid, u32 seq, int flags,
|
|
|
|
struct cfg80211_registered_device *dev)
|
2013-01-20 18:33:21 +00:00
|
|
|
{
|
2013-02-23 01:12:36 +00:00
|
|
|
@@ -1330,9 +1278,6 @@ static int nl80211_send_wiphy(struct sk_
|
|
|
|
goto nla_put_failure;
|
|
|
|
}
|
2013-01-20 18:33:21 +00:00
|
|
|
|
2013-02-23 01:12:36 +00:00
|
|
|
- if (nl80211_send_wowlan_tcp_caps(dev, msg))
|
|
|
|
- goto nla_put_failure;
|
2013-01-20 18:33:21 +00:00
|
|
|
-
|
2013-02-23 01:12:36 +00:00
|
|
|
nla_nest_end(msg, nl_wowlan);
|
2013-01-20 18:33:21 +00:00
|
|
|
}
|
2013-02-11 18:59:14 +00:00
|
|
|
#endif
|