Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp829148pja; Wed, 1 Apr 2020 09:27:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtP+hcxqptFuOkTsnh4TFSVRIJ/omL92iI+PgHLepOr6DuoLqM3lx1hk+NY4q1ioTiIGley X-Received: by 2002:a05:6830:168c:: with SMTP id k12mr17092425otr.366.1585758473790; Wed, 01 Apr 2020 09:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585758473; cv=none; d=google.com; s=arc-20160816; b=NIOjYJfEhB7wCagCL+X+RyqRh2tPCOoGRyQ32BDDoLo0f3o0fof79K/J7Xry7j57/4 1tCDd00KEI/7FwBIdKctbP+dBI8+uX30ghPxUvIPOURDNKRm5S2ZOYx65uMIs5hQ6RzI D5YO8UeIiFGsmFvLDRG/hOfAz873eWBIR6kIQWhoXs3bULxIFAFhVB4ryKd4028GfLU9 6e1LPMkxOT2q0D4CIq0r8XLWH7sgPcqy+oQDTTze42vNzdpqsNLW3yb71mRIc/NJpWjh nKEqyEmQPGGvriiWLnzVxMsvYuS7ZylhhmELPiE80kinnvpG+BUIuuGUaf0D9RfRIKZ9 VZFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DChHwy5PfhMYia29wgmgRsH9TFm776lKJWxIdeV8anY=; b=Q+DAlU2rm1o+JKv7Wt2qmucOwhrPGiQHlrMYaLOi49FZWPtGaWLxWc/qOJGsiPTuqj QVtvlaTfQ2ommjwDGCXYchtlgOKi/iZE5kE1wtafNinxEd3eg3YRjD5WqhHXUvkRR9BA k0ZKKhp6+9GMPx/c3I0A7ZviWtupnZnNc355OS+eM7psXuizwC7k/QF9JtaM1G6E7RGV HytPzyOiMMbIkLpUeDNN2xTeJawFZBNziHNDL1Hfga8UNUW1SidNzI/ScaZ7qR4dnIth DBs4G8iFNqP9pmophHwlrF6o9brW0cnhydE9JlPKTTxj/LY8bMdBHaaiwOXmglCGN/2j E5OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PU3w5HF2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1033849otf.51.2020.04.01.09.27.40; Wed, 01 Apr 2020 09:27:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PU3w5HF2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387497AbgDAQ0t (ORCPT + 99 others); Wed, 1 Apr 2020 12:26:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:51214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733134AbgDAQ0n (ORCPT ); Wed, 1 Apr 2020 12:26:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67D9E20857; Wed, 1 Apr 2020 16:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758401; bh=HXV7RpBGT25AERW4zD7Td0Ay2o0uP43mJJuwTAIU6WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PU3w5HF2Xe4PYYaJb+QNJmvRY3GipXV7VFyi838zoLicrVmJ9mQdhTvGpwGQEJBGK p6W6Uh3p/1ZoOB2KgNSVjnKVRdiHPWooEzfv8fa5PGpAKiLKVGKp4CfBV1pJX81Paq u5sDdUpb9bbr7SWopuWyX+dZ2+ZvEbtalgKlrI68= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pradeep Kumar Chitrapu , Rajkumar Manoharan , Johannes Berg , Sasha Levin Subject: [PATCH 4.19 077/116] mac80211: add option for setting control flags Date: Wed, 1 Apr 2020 18:17:33 +0200 Message-Id: <20200401161552.567123694@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161542.669484650@linuxfoundation.org> References: <20200401161542.669484650@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rajkumar Manoharan [ Upstream commit 060167729a78d626abaee1a0ebb64b252374426e ] Allows setting of control flags of skb cb - if needed - when calling ieee80211_subif_start_xmit(). Tested-by: Pradeep Kumar Chitrapu Signed-off-by: Rajkumar Manoharan Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/tdls.c | 2 +- net/mac80211/tx.c | 18 +++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1729,7 +1729,8 @@ netdev_tx_t ieee80211_subif_start_xmit(s struct net_device *dev); void __ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev, - u32 info_flags); + u32 info_flags, + u32 ctrl_flags); void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, struct sk_buff_head *skbs); struct sk_buff * --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -1055,7 +1055,7 @@ ieee80211_tdls_prep_mgmt_packet(struct w /* disable bottom halves when entering the Tx path */ local_bh_disable(); - __ieee80211_subif_start_xmit(skb, dev, flags); + __ieee80211_subif_start_xmit(skb, dev, flags, 0); local_bh_enable(); return ret; --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2399,6 +2399,7 @@ static int ieee80211_lookup_ra_sta(struc * @sdata: virtual interface to build the header for * @skb: the skb to build the header in * @info_flags: skb flags to set + * @ctrl_flags: info control flags to set * * This function takes the skb with 802.3 header and reformats the header to * the appropriate IEEE 802.11 header based on which interface the packet is @@ -2414,7 +2415,7 @@ static int ieee80211_lookup_ra_sta(struc */ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, u32 info_flags, - struct sta_info *sta) + struct sta_info *sta, u32 ctrl_flags) { struct ieee80211_local *local = sdata->local; struct ieee80211_tx_info *info; @@ -2786,6 +2787,7 @@ static struct sk_buff *ieee80211_build_h info->flags = info_flags; info->ack_frame_id = info_id; info->band = band; + info->control.flags = ctrl_flags; return skb; free: @@ -3595,7 +3597,8 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); void __ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev, - u32 info_flags) + u32 info_flags, + u32 ctrl_flags) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct sta_info *sta; @@ -3666,7 +3669,8 @@ void __ieee80211_subif_start_xmit(struct skb->prev = NULL; skb->next = NULL; - skb = ieee80211_build_hdr(sdata, skb, info_flags, sta); + skb = ieee80211_build_hdr(sdata, skb, info_flags, + sta, ctrl_flags); if (IS_ERR(skb)) goto out; @@ -3806,9 +3810,9 @@ netdev_tx_t ieee80211_subif_start_xmit(s __skb_queue_head_init(&queue); ieee80211_convert_to_unicast(skb, dev, &queue); while ((skb = __skb_dequeue(&queue))) - __ieee80211_subif_start_xmit(skb, dev, 0); + __ieee80211_subif_start_xmit(skb, dev, 0, 0); } else { - __ieee80211_subif_start_xmit(skb, dev, 0); + __ieee80211_subif_start_xmit(skb, dev, 0, 0); } return NETDEV_TX_OK; @@ -3833,7 +3837,7 @@ ieee80211_build_data_template(struct iee goto out; } - skb = ieee80211_build_hdr(sdata, skb, info_flags, sta); + skb = ieee80211_build_hdr(sdata, skb, info_flags, sta, 0); if (IS_ERR(skb)) goto out; @@ -4870,7 +4874,7 @@ int ieee80211_tx_control_port(struct wip skb_reset_mac_header(skb); local_bh_disable(); - __ieee80211_subif_start_xmit(skb, skb->dev, flags); + __ieee80211_subif_start_xmit(skb, skb->dev, flags, 0); local_bh_enable(); return 0;