Search Linux Wireless

[RFC 2/4] cfg80211: rename function argument to be more readable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unifies variable naming regarding radar detection
width.

Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx>
---
 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;
 
 		/*
-- 
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux