diff options
author | Michal Sojka <sojkam1@fel.cvut.cz> | 2015-11-23 13:27:15 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-12-04 08:43:32 -0500 |
commit | c781944b71f87aa4d30eaaafb4e7573ce94bdcfd (patch) | |
tree | 578b4dd950b1be1841a4395839c9d12df828e82f | |
parent | 491728746b500b22f384cb1d0aba76f7c55a9269 (diff) |
cfg80211: Remove unused cfg80211_can_use_iftype_chan()
Last caller of this function was removed in 3.17 in commit
97dc94f1d933c9df2c0b327066ea130c0e92083f.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/core.h | 7 | ||||
-rw-r--r-- | net/wireless/util.c | 114 |
2 files changed, 0 insertions, 121 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index a618b4b86fa4..022ccad06cbe 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -416,13 +416,6 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, | |||
416 | void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); | 416 | void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); |
417 | void cfg80211_process_wdev_events(struct wireless_dev *wdev); | 417 | void cfg80211_process_wdev_events(struct wireless_dev *wdev); |
418 | 418 | ||
419 | int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, | ||
420 | struct wireless_dev *wdev, | ||
421 | enum nl80211_iftype iftype, | ||
422 | struct ieee80211_channel *chan, | ||
423 | enum cfg80211_chan_mode chanmode, | ||
424 | u8 radar_detect); | ||
425 | |||
426 | /** | 419 | /** |
427 | * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable | 420 | * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable |
428 | * @wiphy: the wiphy to validate against | 421 | * @wiphy: the wiphy to validate against |
diff --git a/net/wireless/util.c b/net/wireless/util.c index 010a3c75a677..92770427b211 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -1613,120 +1613,6 @@ int cfg80211_check_combinations(struct wiphy *wiphy, | |||
1613 | } | 1613 | } |
1614 | EXPORT_SYMBOL(cfg80211_check_combinations); | 1614 | EXPORT_SYMBOL(cfg80211_check_combinations); |
1615 | 1615 | ||
1616 | int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, | ||
1617 | struct wireless_dev *wdev, | ||
1618 | enum nl80211_iftype iftype, | ||
1619 | struct ieee80211_channel *chan, | ||
1620 | enum cfg80211_chan_mode chanmode, | ||
1621 | u8 radar_detect) | ||
1622 | { | ||
1623 | struct wireless_dev *wdev_iter; | ||
1624 | int num[NUM_NL80211_IFTYPES]; | ||
1625 | struct ieee80211_channel | ||
1626 | *used_channels[CFG80211_MAX_NUM_DIFFERENT_CHANNELS]; | ||
1627 | struct ieee80211_channel *ch; | ||
1628 | enum cfg80211_chan_mode chmode; | ||
1629 | int num_different_channels = 0; | ||
1630 | int total = 1; | ||
1631 | int i; | ||
1632 | |||
1633 | ASSERT_RTNL(); | ||
1634 | |||
1635 | if (WARN_ON(hweight32(radar_detect) > 1)) | ||
1636 | return -EINVAL; | ||
1637 | |||
1638 | if (WARN_ON(iftype >= NUM_NL80211_IFTYPES)) | ||
1639 | return -EINVAL; | ||
1640 | |||
1641 | /* Always allow software iftypes */ | ||
1642 | if (rdev->wiphy.software_iftypes & BIT(iftype)) { | ||
1643 | if (radar_detect) | ||
1644 | return -EINVAL; | ||
1645 | return 0; | ||
1646 | } | ||
1647 | |||
1648 | memset(num, 0, sizeof(num)); | ||
1649 | memset(used_channels, 0, sizeof(used_channels)); | ||
1650 | |||
1651 | num[iftype] = 1; | ||
1652 | |||
1653 | /* TODO: We'll probably not need this anymore, since this | ||
1654 | * should only be called with CHAN_MODE_UNDEFINED. There are | ||
1655 | * still a couple of pending calls where other chanmodes are | ||
1656 | * used, but we should get rid of them. | ||
1657 | */ | ||
1658 | switch (chanmode) { | ||
1659 | case CHAN_MODE_UNDEFINED: | ||
1660 | break; | ||
1661 | case CHAN_MODE_SHARED: | ||
1662 | WARN_ON(!chan); | ||
1663 | used_channels[0] = chan; | ||
1664 | num_different_channels++; | ||
1665 | break; | ||
1666 | case CHAN_MODE_EXCLUSIVE: | ||
1667 | num_different_channels++; | ||
1668 | break; | ||
1669 | } | ||
1670 | |||
1671 | list_for_each_entry(wdev_iter, &rdev->wdev_list, list) { | ||
1672 | if (wdev_iter == wdev) | ||
1673 | continue; | ||
1674 | if (wdev_iter->iftype == NL80211_IFTYPE_P2P_DEVICE) { | ||
1675 | if (!wdev_iter->p2p_started) | ||
1676 | continue; | ||
1677 | } else if (wdev_iter->netdev) { | ||
1678 | if (!netif_running(wdev_iter->netdev)) | ||
1679 | continue; | ||
1680 | } else { | ||
1681 | WARN_ON(1); | ||
1682 | } | ||
1683 | |||
1684 | if (rdev->wiphy.software_iftypes & BIT(wdev_iter->iftype)) | ||
1685 | continue; | ||
1686 | |||
1687 | /* | ||
1688 | * We may be holding the "wdev" mutex, but now need to lock | ||
1689 | * wdev_iter. This is OK because once we get here wdev_iter | ||
1690 | * is not wdev (tested above), but we need to use the nested | ||
1691 | * locking for lockdep. | ||
1692 | */ | ||
1693 | mutex_lock_nested(&wdev_iter->mtx, 1); | ||
1694 | __acquire(wdev_iter->mtx); | ||
1695 | cfg80211_get_chan_state(wdev_iter, &ch, &chmode, &radar_detect); | ||
1696 | wdev_unlock(wdev_iter); | ||
1697 | |||
1698 | switch (chmode) { | ||
1699 | case CHAN_MODE_UNDEFINED: | ||
1700 | break; | ||
1701 | case CHAN_MODE_SHARED: | ||
1702 | for (i = 0; i < CFG80211_MAX_NUM_DIFFERENT_CHANNELS; i++) | ||
1703 | if (!used_channels[i] || used_channels[i] == ch) | ||
1704 | break; | ||
1705 | |||
1706 | if (i == CFG80211_MAX_NUM_DIFFERENT_CHANNELS) | ||
1707 | return -EBUSY; | ||
1708 | |||
1709 | if (used_channels[i] == NULL) { | ||
1710 | used_channels[i] = ch; | ||
1711 | num_different_channels++; | ||
1712 | } | ||
1713 | break; | ||
1714 | case CHAN_MODE_EXCLUSIVE: | ||
1715 | num_different_channels++; | ||
1716 | break; | ||
1717 | } | ||
1718 | |||
1719 | num[wdev_iter->iftype]++; | ||
1720 | total++; | ||
1721 | } | ||
1722 | |||
1723 | if (total == 1 && !radar_detect) | ||
1724 | return 0; | ||
1725 | |||
1726 | return cfg80211_check_combinations(&rdev->wiphy, num_different_channels, | ||
1727 | radar_detect, num); | ||
1728 | } | ||
1729 | |||
1730 | int ieee80211_get_ratemask(struct ieee80211_supported_band *sband, | 1616 | int ieee80211_get_ratemask(struct ieee80211_supported_band *sband, |
1731 | const u8 *rates, unsigned int n_rates, | 1617 | const u8 *rates, unsigned int n_rates, |
1732 | u32 *mask) | 1618 | u32 *mask) |