From patchwork Tue Oct 11 09:28:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 9370299 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D75EB60772 for ; Tue, 11 Oct 2016 09:28:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC0D529C03 for ; Tue, 11 Oct 2016 09:28:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B07F729C06; Tue, 11 Oct 2016 09:28:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1CFC29C03 for ; Tue, 11 Oct 2016 09:28:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753008AbcJKJ2n (ORCPT ); Tue, 11 Oct 2016 05:28:43 -0400 Received: from nbd.name ([46.4.11.11]:38799 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752930AbcJKJ2l (ORCPT ); Tue, 11 Oct 2016 05:28:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Message-Id:Date:Subject:Cc:To:From; bh=gMGn0XCYab/79pASKV4qBE+i3btgMoWMJiPRTT9SL3Y=; b=OGZnVRHmodMjOEEW+hkiOvkPQNVWMnfFS6+IcyPx2QYosZDn8QUza506c1NWcjtBh5JSA11E5xmubk/1uEQTCzds6q0pXtH+Lg5z/MCgL0Atc3YGia1fDpvnqC0WDoh/k2LtjyAjrH/3xPSaPEKCZrnxGcaiC793Vuqk4v0P8UI=; Received: by nf-4.local (Postfix, from userid 501) id B8DDC16530FA9; Tue, 11 Oct 2016 11:28:31 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, toke@toke.dk Subject: [PATCH] mac80211: fix sequence number allocation regression Date: Tue, 11 Oct 2016 11:28:31 +0200 Message-Id: <20161011092831.85565-1-nbd@nbd.name> X-Mailer: git-send-email 2.10.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The recent commit that moved around TX handlers dropped the sequence number allocation at the end of ieee80211_tx_dequeue and calls ieee80211_tx_h_sequence instead (for the non-fast-xmit case). However, it did not change the fast-xmit sequence allocation condition in ieee80211_xmit_fast_finish, which skipped seqno alloc if intermediate tx queues are being used. Drop the now obsolete condition. Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen --- net/mac80211/tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index dc60784..8ff81fd 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3212,7 +3212,6 @@ static void ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_local *local = sdata->local; struct ieee80211_hdr *hdr = (void *)skb->data; u8 tid = IEEE80211_NUM_TIDS; @@ -3224,8 +3223,7 @@ static void ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata, if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; *ieee80211_get_qos_ctl(hdr) = tid; - if (!ieee80211_get_txq(local, &sdata->vif, &sta->sta, skb)) - hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); + hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); } else { info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; hdr->seq_ctrl = cpu_to_le16(sdata->sequence_number);