From patchwork Wed Jan 8 15:26:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 3454671 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2DBA09F2E9 for ; Wed, 8 Jan 2014 15:31:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89E292010C for ; Wed, 8 Jan 2014 15:31:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60C8E200EC for ; Wed, 8 Jan 2014 15:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756260AbaAHPbT (ORCPT ); Wed, 8 Jan 2014 10:31:19 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:48102 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756754AbaAHPbQ (ORCPT ); Wed, 8 Jan 2014 10:31:16 -0500 Received: by mail-ee0-f51.google.com with SMTP id b15so760127eek.38 for ; Wed, 08 Jan 2014 07:31:15 -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:in-reply-to:references; bh=au+tSAdsAlYFcwiYzUj3r3JLIiimyK/hAfX73dVs7hs=; b=IkL1Z/JpxP6+4tfyXnDwH1tSZSx+3fn5Og8HAuyxAeziPA+zQg3GvumUTAlBjuRGO1 e/XYjne5HU7fXTxQIiK2Unkc+57/nSiDnAZQQoei6ZWgr9rVgBrSTA+kDcXMx3uKcK2r GgjMPgwB3Xi69l57HMFlTN9joyVp9kOrKY0QU= 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:in-reply-to :references; bh=au+tSAdsAlYFcwiYzUj3r3JLIiimyK/hAfX73dVs7hs=; b=ag/00VmKIdbq3AXpKCdgPYuSCgnh5NRwElINBThXopynHE2G2umzqCWRpz+++ZVnoY 6CjspYVjJb133/LDYarb300PSFsn4tPa6OsEDhPRqcYj15sWlyU3FrLYcyRa00wf8EGk /KzoonlBpnMO3vLFF6X43x4VizfRGkZhHkHi9kPWFVkk73a91qc1qI7KVTAQ2BvxdJBM EFjbYcHoRkYJUJ/n/A4ZrwQToSMC6Nv918D5yWTGSR0PcOYtgWLCsShmcqfpDTQj0yVg B4E8brAZdxWK9+mVzj1UNP09yW1Tm3xN8SpT775Kzb3WqTXWFmA8XVU5j7GVUCECQl+q aDxA== X-Gm-Message-State: ALoCoQnrBrdFOZNYpI7BgZqvyy9PFbpKHlaytWM89+C9/VtsgXvPFrl1tvRKewelgQVYKdt1GleSYWLGgFI9Du1uCPd4KaBJ8ydCj5IEVSQyRH455qqJzio= X-Received: by 10.15.33.199 with SMTP id c47mr3926790eev.109.1389195075548; Wed, 08 Jan 2014 07:31:15 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id p45sm190255690eeg.1.2014.01.08.07.31.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jan 2014 07:31:15 -0800 (PST) From: Michal Kazior To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Michal Kazior Subject: [RFC 2/4] cfg80211: rename function argument to be more readable Date: Wed, 8 Jan 2014 16:26:56 +0100 Message-Id: <1389194818-7864-3-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1389194818-7864-1-git-send-email-michal.kazior@tieto.com> References: <1389194818-7864-1-git-send-email-michal.kazior@tieto.com> 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.9 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 Unifies variable naming regarding radar detection width. Signed-off-by: Michal Kazior --- net/wireless/core.h | 2 +- net/wireless/util.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/net/wireless/core.h b/net/wireless/core.h index 0a277c3..38f74fe 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -379,7 +379,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype, struct ieee80211_channel *chan, enum cfg80211_chan_mode chanmode, - u8 radar_detect); + u8 radar_detect_width); /** * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable diff --git a/net/wireless/util.c b/net/wireless/util.c index 935dea9..41013f1 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1238,7 +1238,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype, struct ieee80211_channel *chan, enum cfg80211_chan_mode chanmode, - u8 radar_detect) + u8 radar_detect_width) { struct wireless_dev *wdev_iter; u32 used_iftypes = BIT(iftype); @@ -1254,7 +1254,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, ASSERT_RTNL(); - if (WARN_ON(hweight32(radar_detect) > 1)) + if (WARN_ON(hweight32(radar_detect_width) > 1)) return -EINVAL; switch (iftype) { @@ -1268,7 +1268,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, * then mark DFS as required. */ if (!chan) { - if (chanmode != CHAN_MODE_UNDEFINED && radar_detect) + if (chanmode != CHAN_MODE_UNDEFINED && radar_detect_width) radar_required = true; break; } @@ -1285,12 +1285,12 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, return -EINVAL; } - if (radar_required && !radar_detect) + if (radar_required && !radar_detect_width) return -EINVAL; /* Always allow software iftypes */ if (rdev->wiphy.software_iftypes & BIT(iftype)) { - if (radar_detect) + if (radar_detect_width) return -EINVAL; return 0; } @@ -1366,7 +1366,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, used_iftypes |= BIT(wdev_iter->iftype); } - if (total == 1 && !radar_detect) + if (total == 1 && !radar_detect_width) return 0; for (i = 0; i < rdev->wiphy.n_iface_combinations; i++) { @@ -1399,7 +1399,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, } } - if (radar_detect && !(c->radar_detect_widths & radar_detect)) + if (radar_detect_width && !(c->radar_detect_widths & radar_detect_width)) goto cont; /*