diff options
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 388b863e821c..f75e5f132c5a 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -841,10 +841,11 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
841 | sdata_lock(sdata); | 841 | sdata_lock(sdata); |
842 | mutex_lock(&local->mtx); | 842 | mutex_lock(&local->mtx); |
843 | sdata->vif.csa_active = false; | 843 | sdata->vif.csa_active = false; |
844 | if (!ieee80211_csa_needs_block_tx(local)) | 844 | if (sdata->csa_block_tx) { |
845 | ieee80211_wake_queues_by_reason(&local->hw, | 845 | ieee80211_wake_vif_queues(local, sdata, |
846 | IEEE80211_MAX_QUEUE_MAP, | 846 | IEEE80211_QUEUE_STOP_REASON_CSA); |
847 | IEEE80211_QUEUE_STOP_REASON_CSA); | 847 | sdata->csa_block_tx = false; |
848 | } | ||
848 | mutex_unlock(&local->mtx); | 849 | mutex_unlock(&local->mtx); |
849 | sdata_unlock(sdata); | 850 | sdata_unlock(sdata); |
850 | 851 | ||
@@ -1139,6 +1140,7 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
1139 | struct sk_buff *skb; | 1140 | struct sk_buff *skb; |
1140 | struct sta_info *sta; | 1141 | struct sta_info *sta; |
1141 | struct ieee80211_ra_tid *ra_tid; | 1142 | struct ieee80211_ra_tid *ra_tid; |
1143 | struct ieee80211_rx_agg *rx_agg; | ||
1142 | 1144 | ||
1143 | if (!ieee80211_sdata_running(sdata)) | 1145 | if (!ieee80211_sdata_running(sdata)) |
1144 | return; | 1146 | return; |
@@ -1166,6 +1168,34 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
1166 | ra_tid = (void *)&skb->cb; | 1168 | ra_tid = (void *)&skb->cb; |
1167 | ieee80211_stop_tx_ba_cb(&sdata->vif, ra_tid->ra, | 1169 | ieee80211_stop_tx_ba_cb(&sdata->vif, ra_tid->ra, |
1168 | ra_tid->tid); | 1170 | ra_tid->tid); |
1171 | } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_START) { | ||
1172 | rx_agg = (void *)&skb->cb; | ||
1173 | mutex_lock(&local->sta_mtx); | ||
1174 | sta = sta_info_get_bss(sdata, rx_agg->addr); | ||
1175 | if (sta) { | ||
1176 | u16 last_seq; | ||
1177 | |||
1178 | last_seq = IEEE80211_SEQ_TO_SN(le16_to_cpu( | ||
1179 | sta->last_seq_ctrl[rx_agg->tid])); | ||
1180 | |||
1181 | __ieee80211_start_rx_ba_session(sta, | ||
1182 | 0, 0, | ||
1183 | ieee80211_sn_inc(last_seq), | ||
1184 | 1, rx_agg->tid, | ||
1185 | IEEE80211_MAX_AMPDU_BUF, | ||
1186 | false); | ||
1187 | } | ||
1188 | mutex_unlock(&local->sta_mtx); | ||
1189 | } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_STOP) { | ||
1190 | rx_agg = (void *)&skb->cb; | ||
1191 | mutex_lock(&local->sta_mtx); | ||
1192 | sta = sta_info_get_bss(sdata, rx_agg->addr); | ||
1193 | if (sta) | ||
1194 | __ieee80211_stop_rx_ba_session(sta, | ||
1195 | rx_agg->tid, | ||
1196 | WLAN_BACK_RECIPIENT, 0, | ||
1197 | false); | ||
1198 | mutex_unlock(&local->sta_mtx); | ||
1169 | } else if (ieee80211_is_action(mgmt->frame_control) && | 1199 | } else if (ieee80211_is_action(mgmt->frame_control) && |
1170 | mgmt->u.action.category == WLAN_CATEGORY_BACK) { | 1200 | mgmt->u.action.category == WLAN_CATEGORY_BACK) { |
1171 | int len = skb->len; | 1201 | int len = skb->len; |
@@ -1623,9 +1653,9 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, | |||
1623 | if (local->hw.queues >= IEEE80211_NUM_ACS) | 1653 | if (local->hw.queues >= IEEE80211_NUM_ACS) |
1624 | txqs = IEEE80211_NUM_ACS; | 1654 | txqs = IEEE80211_NUM_ACS; |
1625 | 1655 | ||
1626 | ndev = alloc_netdev_mqs(sizeof(*sdata) + | 1656 | ndev = alloc_netdev_mqs(sizeof(*sdata) + local->hw.vif_data_size, |
1627 | local->hw.vif_data_size, | 1657 | name, NET_NAME_UNKNOWN, |
1628 | name, ieee80211_if_setup, txqs, 1); | 1658 | ieee80211_if_setup, txqs, 1); |
1629 | if (!ndev) | 1659 | if (!ndev) |
1630 | return -ENOMEM; | 1660 | return -ENOMEM; |
1631 | dev_net_set(ndev, wiphy_net(local->hw.wiphy)); | 1661 | dev_net_set(ndev, wiphy_net(local->hw.wiphy)); |
@@ -1705,6 +1735,8 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, | |||
1705 | 1735 | ||
1706 | ndev->features |= local->hw.netdev_features; | 1736 | ndev->features |= local->hw.netdev_features; |
1707 | 1737 | ||
1738 | netdev_set_default_ethtool_ops(ndev, &ieee80211_ethtool_ops); | ||
1739 | |||
1708 | ret = register_netdevice(ndev); | 1740 | ret = register_netdevice(ndev); |
1709 | if (ret) { | 1741 | if (ret) { |
1710 | free_netdev(ndev); | 1742 | free_netdev(ndev); |