From patchwork Fri Mar 3 11:33:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikanta Pubbisetty X-Patchwork-Id: 9602637 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 3917360453 for ; Fri, 3 Mar 2017 12:15:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 299FD283AC for ; Fri, 3 Mar 2017 12:15:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E45F28601; Fri, 3 Mar 2017 12:15:40 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 9A53B283AC for ; Fri, 3 Mar 2017 12:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487AbdCCMPL (ORCPT ); Fri, 3 Mar 2017 07:15:11 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:63413 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbdCCMPK (ORCPT ); Fri, 3 Mar 2017 07:15:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1488543309; x=1520079309; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Dg40Drw7ciY6jSc8j2URX0FHXTEDAm1IEnq3bTN0hBQ=; b=cUHsuFK5nKJHXTlNXRDYu6SfZqlvlIduQPNipX/MKMEMaf2Y4iTEB7su PBj8I7p6uWWLLjiYQXJuJLAj8iwUIgTuJ2qI0sX0/DbVbuV8j3OP0+Yg/ /2vVru4YN6e+5QIzOOh1NN9RhlTfmupSsV6mbrSlVml77gmVNQxa3N3Dz g=; X-IronPort-AV: E=Sophos;i="5.35,236,1484035200"; d="scan'208";a="363228027" Received: from unknown (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine02.qualcomm.com with ESMTP; 03 Mar 2017 03:34:41 -0800 X-IronPort-AV: E=McAfee;i="5800,7501,8455"; a="877965124" X-MGA-submission: =?us-ascii?q?MDFhhoog9p5Fu2MXg0kV0w48jxdLWcIu8IBaLD?= =?us-ascii?q?b0w3tFGVU6jPicVBK8Hkl4oRfRbWbSLyUX0JuqYO2tPDTHpiO3iX0N2s?= =?us-ascii?q?b8shz6ivyo7Ud21RYX8a7cHSMG1YiYwDqLEBDJzoLMeOVUHiaU9RQjPN?= =?us-ascii?q?pb?= Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 03 Mar 2017 03:34:41 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by NASANEXM01G.na.qualcomm.com (10.85.0.33) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 3 Mar 2017 03:34:40 -0800 Received: from localhost (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 3 Mar 2017 17:04:35 +0530 From: To: CC: , Vasanthakumar Thiagarajan Subject: [RFCv2 1/2] mac80211: Add provision for 802.11 encap offload Date: Fri, 3 Mar 2017 17:03:26 +0530 Message-ID: <1488540807-27415-2-git-send-email-mpubbise@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1488540807-27415-1-git-send-email-mpubbise@qti.qualcomm.com> References: <1488540807-27415-1-git-send-email-mpubbise@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To aphydexm01f.ap.qualcomm.com (10.252.127.15) 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 From: Vasanthakumar Thiagarajan Drivers can have the capability to offload 802.11 encap to firmware or hardware for data frames. This patch adds a new hw_flag for driver to advertise the offload support. Transmit path offloading 802.11 header (including cipher headers) encap for data frames will be implemented in a separate patch. Drivers advertising this capability should also implement other functionalities which deal with 802.11 frame format like below - Hardware encryption - Aggregation of A-MSDU offload - Fragmentation offload Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Manikanta Pubbisetty --- include/net/mac80211.h | 4 ++++ net/mac80211/debugfs.c | 1 + 2 files changed, 5 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 3edb469..0239b7d 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2049,6 +2049,9 @@ struct ieee80211_txq { * The stack will not do fragmentation. * The callback for @set_frag_threshold should be set as well. * + * @IEEE80211_HW_SUPPORTS_80211_ENCAP: Hardware/driver supports 802.11 + * encap for data frames. + * * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { @@ -2091,6 +2094,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_TX_FRAG_LIST, IEEE80211_HW_REPORTS_LOW_ACK, IEEE80211_HW_SUPPORTS_TX_FRAG, + IEEE80211_HW_SUPPORTS_80211_ENCAP, /* keep last, obviously */ NUM_IEEE80211_HW_FLAGS diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 5fae001..b97ffb4 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -211,6 +211,7 @@ static ssize_t reset_write(struct file *file, const char __user *user_buf, FLAG(TX_FRAG_LIST), FLAG(REPORTS_LOW_ACK), FLAG(SUPPORTS_TX_FRAG), + FLAG(SUPPORTS_80211_ENCAP), #undef FLAG };