From patchwork Sat Feb 25 13:37:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: c_traja@qti.qualcomm.com X-Patchwork-Id: 9591713 X-Patchwork-Delegate: kvalo@adurom.com 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 E1D136042C for ; Sat, 25 Feb 2017 13:41:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1EBF28541 for ; Sat, 25 Feb 2017 13:41:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C666E28601; Sat, 25 Feb 2017 13:41:06 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F65828541 for ; Sat, 25 Feb 2017 13:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ni9QpH/svfP2qMAVd9DjwxxSbjEagcjMMuxuHeHR4lA=; b=GH3AcObEdro8v8 qDMSJpD074dgFk9c/ECr9/FFJMeMRHO/0U+U+B998JCOgw+wqgPFozLsgOi1wufoRmzKxugeGLcMZ C/adlc56YQD1BVlVgCt3HsNVXV4NMfPaBvntTSUo7afi0yJRv7XEzPeE1cGBBeHDeEnbtKruUhK1/ CzETG+A0Kl7AlsafLWm5tcIhQOKFEBVScocmoG5hmuEnx+h4pL1m/nVALa6qzajRitwHpzn92C4oB svAqi1S3R0wyZeTi0PWDX1eTCg1pQVYMtv8OSO8cyVon2mzr7B2XHX2WDI3SshE2EPeQnkxK3SCje CkxtqRj7YlG5XjhaXICw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1chcaq-0007ZO-Bo; Sat, 25 Feb 2017 13:41:00 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1chcaQ-0007AG-DU for ath10k@lists.infradead.org; Sat, 25 Feb 2017 13:40:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1488030034; x=1519566034; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=fKeWc5Ac9bmX9yesJinnyddDFx4Xyd7b8aROnYWzesk=; b=NfYwTH24Bq+yoLz1O89j1U+CIkRaNK7lEG4sIQp7PshXt5A8G4yFE3jS Ds00pxNOVXR0iwtNYnB/TyC8G+WH9qL/ld8B5dtbcjJul9NYLIOd/Er/T Ol6C9xFQKZdWS2ph2oWlIXpWDRrYREhuIwpMjF1X+YNoqC2P2ya4yE6Pf 4=; X-IronPort-AV: E=Sophos;i="5.35,203,1484035200"; d="scan'208";a="361575858" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by wolverine02.qualcomm.com with ESMTP; 25 Feb 2017 05:40:16 -0800 X-IronPort-AV: E=McAfee;i="5800,7501,8449"; a="1320652857" X-MGA-submission: =?us-ascii?q?MDHiSqm7LsCJUIn09D7+PTq0KR6O5cl0xXdm2T?= =?us-ascii?q?eGB5JQXobpfF1J870448wPWSto2kaSQwuyhJbgy+ssEvDwYE5o/z3bwK?= =?us-ascii?q?REjwtMiT3WczC5Pm20YnPiNPyJ216RGuW/5ATCvBzlGrxDSF7iX2KV2m?= =?us-ascii?q?f5?= Received: from nasanexm02a.na.qualcomm.com ([10.85.0.41]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 25 Feb 2017 05:40:16 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm02a.na.qualcomm.com (10.85.0.41) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Sat, 25 Feb 2017 05:40:14 -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; Sat, 25 Feb 2017 19:10:09 +0530 From: To: Subject: [PATCHv2 4/4] mac80211: Add support to set/update btcoex priority value Date: Sat, 25 Feb 2017 19:07:53 +0530 Message-ID: <1488029873-14600-5-git-send-email-c_traja@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1488029873-14600-1-git-send-email-c_traja@qti.qualcomm.com> References: <1488029873-14600-1-git-send-email-c_traja@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01f.ap.qualcomm.com (10.252.127.15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170225_054034_662234_9CF9CD09 X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tamizh chelvam , johannes@sipsolutions.net, ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tamizh chelvam This patch add support to set or modify the btcoex priority value for the driver which has btcoex priority feature support. Signed-off-by: Tamizh chelvam --- include/net/mac80211.h | 6 ++++-- net/mac80211/cfg.c | 5 +++-- net/mac80211/driver-ops.h | 7 ++++--- net/mac80211/trace.h | 12 +++++++++--- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 57717f1..33890b4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -3448,7 +3448,8 @@ enum ieee80211_reconfig_type { * ieee80211_nan_func_terminated() with * NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST reason code upon removal. * @set_btcoex_: Called when BTCOEX is enabled/disabled, use - * this callback to enable or disable btcoex. + * this callback to enable or disable btcoex and use this callback to + * set btcoex_priority. BTCOEX should be enabled to set this priority. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, @@ -3730,7 +3731,8 @@ struct ieee80211_ops { void (*del_nan_func)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u8 instance_id); - int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled); + int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled, + int btcoex_priority); }; /** diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7e17eff..c640e7d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3574,11 +3574,12 @@ static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy, return 0; } -static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled) +static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled, + int btcoex_priority) { struct ieee80211_local *local = wiphy_priv(wiphy); - return drv_set_btcoex(local, enabled); + return drv_set_btcoex(local, enabled, btcoex_priority); } const struct cfg80211_ops mac80211_config_ops = { diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 16d9c98..3826202 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1249,13 +1249,14 @@ static inline void drv_del_nan_func(struct ieee80211_local *local, } static inline int drv_set_btcoex(struct ieee80211_local *local, - bool enabled) + bool enabled, int btcoex_priority) { int ret = -EOPNOTSUPP; - trace_drv_set_btcoex(local, enabled); + trace_drv_set_btcoex(local, enabled, btcoex_priority); if (local->ops->set_btcoex) - ret = local->ops->set_btcoex(&local->hw, enabled); + ret = local->ops->set_btcoex(&local->hw, enabled, + btcoex_priority); trace_drv_return_int(local, ret); diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 0d9b5a0..c3efca9 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -743,17 +743,23 @@ ); TRACE_EVENT(drv_set_btcoex, - TP_PROTO(struct ieee80211_local *local, bool enabled), - TP_ARGS(local, enabled), + TP_PROTO(struct ieee80211_local *local, bool enabled, + int btcoex_priority), + TP_ARGS(local, enabled, btcoex_priority), TP_STRUCT__entry( LOCAL_ENTRY __field(bool, enabled) + __field(int, btcoex_priority) ), TP_fast_assign( LOCAL_ASSIGN; __entry->enabled = enabled; + __entry->btcoex_priority = btcoex_priority; ), - TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) + TP_printk( + LOCAL_PR_FMT " enabled:%d btcoex_priority :%d", + LOCAL_PR_ARG, __entry->enabled, __entry->btcoex_priority + ) ); TRACE_EVENT(drv_set_coverage_class,