cfg80211: change wiphy_to_dev function name
Name wiphy_to_rdev is more accurate to describe what the function does, i.e., return a pointer pointing to struct cfg80211_registered_device. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
1b8ec87aa0
commit
f26cbf401b
@@ -69,7 +69,7 @@ struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx)
|
||||
|
||||
int get_wiphy_idx(struct wiphy *wiphy)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
||||
|
||||
return rdev->wiphy_idx;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
|
||||
|
||||
int wiphy_register(struct wiphy *wiphy)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
||||
int res;
|
||||
enum ieee80211_band band;
|
||||
struct ieee80211_supported_band *sband;
|
||||
@@ -656,7 +656,7 @@ EXPORT_SYMBOL(wiphy_register);
|
||||
|
||||
void wiphy_rfkill_start_polling(struct wiphy *wiphy)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
||||
|
||||
if (!rdev->ops->rfkill_poll)
|
||||
return;
|
||||
@@ -667,7 +667,7 @@ EXPORT_SYMBOL(wiphy_rfkill_start_polling);
|
||||
|
||||
void wiphy_rfkill_stop_polling(struct wiphy *wiphy)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
||||
|
||||
rfkill_pause_polling(rdev->rfkill);
|
||||
}
|
||||
@@ -675,7 +675,7 @@ EXPORT_SYMBOL(wiphy_rfkill_stop_polling);
|
||||
|
||||
void wiphy_unregister(struct wiphy *wiphy)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
||||
|
||||
wait_event(rdev->dev_wait, ({
|
||||
int __count;
|
||||
@@ -748,7 +748,7 @@ EXPORT_SYMBOL(wiphy_free);
|
||||
|
||||
void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
|
||||
|
||||
if (rfkill_set_hw_state(rdev->rfkill, blocked))
|
||||
schedule_work(&rdev->rfkill_sync);
|
||||
@@ -757,7 +757,7 @@ EXPORT_SYMBOL(wiphy_rfkill_set_hw_state);
|
||||
|
||||
void cfg80211_unregister_wdev(struct wireless_dev *wdev)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
|
||||
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
@@ -841,7 +841,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
|
||||
if (!wdev)
|
||||
return NOTIFY_DONE;
|
||||
|
||||
rdev = wiphy_to_dev(wdev->wiphy);
|
||||
rdev = wiphy_to_rdev(wdev->wiphy);
|
||||
|
||||
WARN_ON(wdev->iftype == NL80211_IFTYPE_UNSPECIFIED);
|
||||
|
||||
|
Reference in New Issue
Block a user