From patchwork Tue Jan 5 10:35:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 7953631 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1394A9F1C0 for ; Tue, 5 Jan 2016 10:36:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4196D20389 for ; Tue, 5 Jan 2016 10:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7088520357 for ; Tue, 5 Jan 2016 10:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752097AbcAEKgB (ORCPT ); Tue, 5 Jan 2016 05:36:01 -0500 Received: from mail-lb0-f181.google.com ([209.85.217.181]:36559 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbcAEKf5 (ORCPT ); Tue, 5 Jan 2016 05:35:57 -0500 Received: by mail-lb0-f181.google.com with SMTP id oh2so172591628lbb.3 for ; Tue, 05 Jan 2016 02:35:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=qrU4gv3/saAJtsdbwA9no4V/mVPFJiiQDSDnpzgZ6qA=; b=mGOQFe8lRAahKS+5oO+BJNcvD67Enr5zEuaJ34sREGKLabAyr5vkya1Ckgdl7o9hAO /TFk5RgyXyvxLr0SawKerwRqW3vhbtdSGI7t+F5BhMa0K3eL0ZtQhpsk7CyllCnOaL2l 94+rncex7LeXqVcf9KR6vj8v0sce4Ar2DyFXo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qrU4gv3/saAJtsdbwA9no4V/mVPFJiiQDSDnpzgZ6qA=; b=Sz66wrjystGnW2cOqYKxdoRq94D06ggAV3P9C0eEw8S1WyMFJbROgILClMo1xaS64a 8n9ZvvLTDRdUexS7PitGADcJM7724f0rW+DIWUjmV6sGTgN9xFYcPawFDkLCsM4Pok1B pi1PcbDZdNAeSCUYnTS8m2+eYUiLsUAhE3gGDVoPNHdT3D6gofJsQBCBdNiEeHkKLEIU 0GgzJVE7yptP+PY1xnEJCcoSu4NyCknkkmk2IH3aMatAmnBxotPzBsj7FXO0sW5QcKS6 49jbNvfRk/KnHLLnRgSocOP10ouUgCZIuV9AUM+UqCGawHbpPg9Zd1pobpnuSgab22QX 9qvw== X-Gm-Message-State: ALoCoQl5GB+x4Faj6+94TO5URjJhe2O/ZmlcTjlUexESbshI2iGKQuQ/fP2TWNKbyo0L7aIu8L2VimhPHdoLh1WZdxYbkc/qG0RZ6YR/+NAiAKVLUJNfXoXPePyLZ2F4NOBhT8p8DV5Viy+G94BgzPNzVhWjWkKNh8rDo29qGiPUZNrZwRjxAdEXofDGfj02A/anW+w3HdFdk8Xtq4eo8FMNx3lnUJNVpA== X-Received: by 10.112.148.170 with SMTP id tt10mr21926979lbb.48.1451990155558; Tue, 05 Jan 2016 02:35:55 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id bm8sm16295355lbb.35.2016.01.05.02.35.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jan 2016 02:35:54 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, j@w1.fi, Janusz Dziedzic Subject: [PATCH v2 1/2] mac80211: check requested flags in ieee80211_tx_prepare_skb() Date: Tue, 5 Jan 2016 11:35:33 +0100 Message-Id: <1451990134-15183-1-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In case driver already set info->flags (eg. IEEE80211_TX_CTL_NO_CCK_RATE in ath9k driver), before this patch we skip this requested flags. Signed-off-by: Janusz Dziedzic --- net/mac80211/tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a512c4b..6ea1c65 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1532,6 +1532,7 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_data tx; struct sk_buff *skb2; + unsigned int flags = info->flags; if (ieee80211_tx_prepare(sdata, &tx, NULL, skb) == TX_DROP) return false; @@ -1539,6 +1540,7 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, info->band = band; info->control.vif = vif; info->hw_queue = vif->hw_queue[skb_get_queue_mapping(skb)]; + info->flags |= flags; if (invoke_tx_handlers(&tx)) return false;