aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-06 21:56:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:02:33 -0400
commit79c97e97aed7f760d2826c7daf2d42d8eefe9838 (patch)
treebf6d18d0de2c0168a292f05eb6f7296c15278b8b /net/wireless/reg.c
parent667503ddcb96f3b10211f997fe55907fa7509841 (diff)
cfg80211: clean up naming once and for all
We've named the registered devices 'drv' sometimes, thinking of "driver", which is not what it is, it's the internal representation of a wiphy, i.e. a device. Let's clean up the naming once and and use 'rdev' aka 'registered device' everywhere. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 5e14371cda70..2b4a6c66f5ae 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1061,10 +1061,10 @@ static bool ignore_reg_update(struct wiphy *wiphy,
1061 1061
1062static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator) 1062static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
1063{ 1063{
1064 struct cfg80211_registered_device *drv; 1064 struct cfg80211_registered_device *rdev;
1065 1065
1066 list_for_each_entry(drv, &cfg80211_drv_list, list) 1066 list_for_each_entry(rdev, &cfg80211_rdev_list, list)
1067 wiphy_update_regulatory(&drv->wiphy, initiator); 1067 wiphy_update_regulatory(&rdev->wiphy, initiator);
1068} 1068}
1069 1069
1070static void handle_reg_beacon(struct wiphy *wiphy, 1070static void handle_reg_beacon(struct wiphy *wiphy,
@@ -1614,7 +1614,7 @@ static void reg_process_pending_hints(void)
1614/* Processes beacon hints -- this has nothing to do with country IEs */ 1614/* Processes beacon hints -- this has nothing to do with country IEs */
1615static void reg_process_pending_beacon_hints(void) 1615static void reg_process_pending_beacon_hints(void)
1616{ 1616{
1617 struct cfg80211_registered_device *drv; 1617 struct cfg80211_registered_device *rdev;
1618 struct reg_beacon *pending_beacon, *tmp; 1618 struct reg_beacon *pending_beacon, *tmp;
1619 1619
1620 mutex_lock(&cfg80211_mutex); 1620 mutex_lock(&cfg80211_mutex);
@@ -1633,8 +1633,8 @@ static void reg_process_pending_beacon_hints(void)
1633 list_del_init(&pending_beacon->list); 1633 list_del_init(&pending_beacon->list);
1634 1634
1635 /* Applies the beacon hint to current wiphys */ 1635 /* Applies the beacon hint to current wiphys */
1636 list_for_each_entry(drv, &cfg80211_drv_list, list) 1636 list_for_each_entry(rdev, &cfg80211_rdev_list, list)
1637 wiphy_update_new_beacon(&drv->wiphy, pending_beacon); 1637 wiphy_update_new_beacon(&rdev->wiphy, pending_beacon);
1638 1638
1639 /* Remembers the beacon hint for new wiphys or reg changes */ 1639 /* Remembers the beacon hint for new wiphys or reg changes */
1640 list_add_tail(&pending_beacon->list, &reg_beacon_list); 1640 list_add_tail(&pending_beacon->list, &reg_beacon_list);
@@ -1814,23 +1814,23 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1814 if (likely(last_request->initiator == 1814 if (likely(last_request->initiator ==
1815 NL80211_REGDOM_SET_BY_COUNTRY_IE && 1815 NL80211_REGDOM_SET_BY_COUNTRY_IE &&
1816 wiphy_idx_valid(last_request->wiphy_idx))) { 1816 wiphy_idx_valid(last_request->wiphy_idx))) {
1817 struct cfg80211_registered_device *drv_last_ie; 1817 struct cfg80211_registered_device *rdev_last_ie;
1818 1818
1819 drv_last_ie = 1819 rdev_last_ie =
1820 cfg80211_drv_by_wiphy_idx(last_request->wiphy_idx); 1820 cfg80211_rdev_by_wiphy_idx(last_request->wiphy_idx);
1821 1821
1822 /* 1822 /*
1823 * Lets keep this simple -- we trust the first AP 1823 * Lets keep this simple -- we trust the first AP
1824 * after we intersect with CRDA 1824 * after we intersect with CRDA
1825 */ 1825 */
1826 if (likely(&drv_last_ie->wiphy == wiphy)) { 1826 if (likely(&rdev_last_ie->wiphy == wiphy)) {
1827 /* 1827 /*
1828 * Ignore IEs coming in on this wiphy with 1828 * Ignore IEs coming in on this wiphy with
1829 * the same alpha2 and environment cap 1829 * the same alpha2 and environment cap
1830 */ 1830 */
1831 if (likely(alpha2_equal(drv_last_ie->country_ie_alpha2, 1831 if (likely(alpha2_equal(rdev_last_ie->country_ie_alpha2,
1832 alpha2) && 1832 alpha2) &&
1833 env == drv_last_ie->env)) { 1833 env == rdev_last_ie->env)) {
1834 goto out; 1834 goto out;
1835 } 1835 }
1836 /* 1836 /*
@@ -1846,9 +1846,9 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1846 * Ignore IEs coming in on two separate wiphys with 1846 * Ignore IEs coming in on two separate wiphys with
1847 * the same alpha2 and environment cap 1847 * the same alpha2 and environment cap
1848 */ 1848 */
1849 if (likely(alpha2_equal(drv_last_ie->country_ie_alpha2, 1849 if (likely(alpha2_equal(rdev_last_ie->country_ie_alpha2,
1850 alpha2) && 1850 alpha2) &&
1851 env == drv_last_ie->env)) { 1851 env == rdev_last_ie->env)) {
1852 goto out; 1852 goto out;
1853 } 1853 }
1854 /* We could potentially intersect though */ 1854 /* We could potentially intersect though */
@@ -1995,14 +1995,14 @@ static void print_regdomain(const struct ieee80211_regdomain *rd)
1995 1995
1996 if (last_request->initiator == 1996 if (last_request->initiator ==
1997 NL80211_REGDOM_SET_BY_COUNTRY_IE) { 1997 NL80211_REGDOM_SET_BY_COUNTRY_IE) {
1998 struct cfg80211_registered_device *drv; 1998 struct cfg80211_registered_device *rdev;
1999 drv = cfg80211_drv_by_wiphy_idx( 1999 rdev = cfg80211_rdev_by_wiphy_idx(
2000 last_request->wiphy_idx); 2000 last_request->wiphy_idx);
2001 if (drv) { 2001 if (rdev) {
2002 printk(KERN_INFO "cfg80211: Current regulatory " 2002 printk(KERN_INFO "cfg80211: Current regulatory "
2003 "domain updated by AP to: %c%c\n", 2003 "domain updated by AP to: %c%c\n",
2004 drv->country_ie_alpha2[0], 2004 rdev->country_ie_alpha2[0],
2005 drv->country_ie_alpha2[1]); 2005 rdev->country_ie_alpha2[1]);
2006 } else 2006 } else
2007 printk(KERN_INFO "cfg80211: Current regulatory " 2007 printk(KERN_INFO "cfg80211: Current regulatory "
2008 "domain intersected: \n"); 2008 "domain intersected: \n");
@@ -2063,7 +2063,7 @@ static inline void reg_country_ie_process_debug(
2063static int __set_regdom(const struct ieee80211_regdomain *rd) 2063static int __set_regdom(const struct ieee80211_regdomain *rd)
2064{ 2064{
2065 const struct ieee80211_regdomain *intersected_rd = NULL; 2065 const struct ieee80211_regdomain *intersected_rd = NULL;
2066 struct cfg80211_registered_device *drv = NULL; 2066 struct cfg80211_registered_device *rdev = NULL;
2067 struct wiphy *request_wiphy; 2067 struct wiphy *request_wiphy;
2068 /* Some basic sanity checks first */ 2068 /* Some basic sanity checks first */
2069 2069
@@ -2202,11 +2202,11 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2202 if (!intersected_rd) 2202 if (!intersected_rd)
2203 return -EINVAL; 2203 return -EINVAL;
2204 2204
2205 drv = wiphy_to_dev(request_wiphy); 2205 rdev = wiphy_to_dev(request_wiphy);
2206 2206
2207 drv->country_ie_alpha2[0] = rd->alpha2[0]; 2207 rdev->country_ie_alpha2[0] = rd->alpha2[0];
2208 drv->country_ie_alpha2[1] = rd->alpha2[1]; 2208 rdev->country_ie_alpha2[1] = rd->alpha2[1];
2209 drv->env = last_request->country_ie_env; 2209 rdev->env = last_request->country_ie_env;
2210 2210
2211 BUG_ON(intersected_rd == rd); 2211 BUG_ON(intersected_rd == rd);
2212 2212