From patchwork Fri May 28 13:22:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 102892 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4SDN6hS030126 for ; Fri, 28 May 2010 13:23:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753076Ab0E1NXF (ORCPT ); Fri, 28 May 2010 09:23:05 -0400 Received: from he.sipsolutions.net ([78.46.109.217]:40690 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973Ab0E1NXC (ORCPT ); Fri, 28 May 2010 09:23:02 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1OHzWd-0007aQ-Ge; Fri, 28 May 2010 15:22:59 +0200 Subject: [PATCH] mac80211: process station blockack action frames from work From: Johannes Berg To: linux-wireless Cc: Reinette Chatre , John Linville , Zhu Yi Date: Fri, 28 May 2010 15:22:58 +0200 Message-ID: <1275052978.3909.105.camel@jlt3.sipsolutions.net> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 28 May 2010 13:23:06 +0000 (UTC) --- wireless-testing.orig/net/mac80211/mlme.c 2010-05-28 15:10:29.000000000 +0200 +++ wireless-testing/net/mac80211/mlme.c 2010-05-28 15:12:04.000000000 +0200 @@ -1692,14 +1692,52 @@ static void ieee80211_sta_rx_queued_mgmt rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); break; case IEEE80211_STYPE_ACTION: - if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT) - break; + switch (mgmt->u.action.category) { + case WLAN_CATEGORY_BACK: { + struct ieee80211_local *local = sdata->local; + int len = skb->len; + struct sta_info *sta; - ieee80211_sta_process_chanswitch(sdata, - &mgmt->u.action.u.chan_switch.sw_elem, - (void *)ifmgd->associated->priv, - rx_status->mactime); - break; + rcu_read_lock(); + sta = sta_info_get(sdata, mgmt->sa); + if (!sta) { + rcu_read_unlock(); + break; + } + + local_bh_disable(); + + switch (mgmt->u.action.u.addba_req.action_code) { + case WLAN_ACTION_ADDBA_REQ: + if (len < (IEEE80211_MIN_ACTION_SIZE + + sizeof(mgmt->u.action.u.addba_req))) + break; + ieee80211_process_addba_request(local, sta, mgmt, len); + break; + case WLAN_ACTION_ADDBA_RESP: + if (len < (IEEE80211_MIN_ACTION_SIZE + + sizeof(mgmt->u.action.u.addba_resp))) + break; + ieee80211_process_addba_resp(local, sta, mgmt, len); + break; + case WLAN_ACTION_DELBA: + if (len < (IEEE80211_MIN_ACTION_SIZE + + sizeof(mgmt->u.action.u.delba))) + break; + ieee80211_process_delba(sdata, sta, mgmt, len); + break; + } + local_bh_enable(); + rcu_read_unlock(); + break; + } + case WLAN_CATEGORY_SPECTRUM_MGMT: + ieee80211_sta_process_chanswitch(sdata, + &mgmt->u.action.u.chan_switch.sw_elem, + (void *)ifmgd->associated->priv, + rx_status->mactime); + break; + } } mutex_unlock(&ifmgd->mtx); --- wireless-testing.orig/net/mac80211/rx.c 2010-05-28 14:22:59.000000000 +0200 +++ wireless-testing/net/mac80211/rx.c 2010-05-28 15:11:47.000000000 +0200 @@ -1936,6 +1936,9 @@ ieee80211_rx_h_action(struct ieee80211_r if (len < IEEE80211_MIN_ACTION_SIZE + 1) break; + if (sdata->vif.type == NL80211_IFTYPE_STATION) + return ieee80211_sta_rx_mgmt(sdata, rx->skb); + switch (mgmt->u.action.u.addba_req.action_code) { case WLAN_ACTION_ADDBA_REQ: if (len < (IEEE80211_MIN_ACTION_SIZE +