diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-07-27 09:43:23 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:47:35 -0400 |
commit | ff6880892990aece71a3271425dfde35344d51bb (patch) | |
tree | 6a6c5f61c0e060a9080345324df5a16e33a94f7e /net/mac80211/ieee80211.c | |
parent | 1f5a7e47ae58cc23c623c09f1c9d97b7a8cf6344 (diff) |
[MAC80211]: move some rate control functions out of ieee80211.c
I think these can go with rate control just as well and it makes
ieee80211.c more readable.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index f20e647552ec..2b15505a6e48 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -1542,47 +1542,6 @@ void ieee80211_if_mgmt_setup(struct net_device *dev) | |||
1542 | dev->destructor = ieee80211_if_free; | 1542 | dev->destructor = ieee80211_if_free; |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local, | ||
1546 | const char *name) | ||
1547 | { | ||
1548 | struct rate_control_ref *ref, *old; | ||
1549 | |||
1550 | ASSERT_RTNL(); | ||
1551 | if (local->open_count || netif_running(local->mdev) || | ||
1552 | (local->apdev && netif_running(local->apdev))) | ||
1553 | return -EBUSY; | ||
1554 | |||
1555 | ref = rate_control_alloc(name, local); | ||
1556 | if (!ref) { | ||
1557 | printk(KERN_WARNING "%s: Failed to select rate control " | ||
1558 | "algorithm\n", local->mdev->name); | ||
1559 | return -ENOENT; | ||
1560 | } | ||
1561 | |||
1562 | old = local->rate_ctrl; | ||
1563 | local->rate_ctrl = ref; | ||
1564 | if (old) { | ||
1565 | rate_control_put(old); | ||
1566 | sta_info_flush(local, NULL); | ||
1567 | } | ||
1568 | |||
1569 | printk(KERN_DEBUG "%s: Selected rate control " | ||
1570 | "algorithm '%s'\n", local->mdev->name, | ||
1571 | ref->ops->name); | ||
1572 | |||
1573 | |||
1574 | return 0; | ||
1575 | } | ||
1576 | |||
1577 | static void rate_control_deinitialize(struct ieee80211_local *local) | ||
1578 | { | ||
1579 | struct rate_control_ref *ref; | ||
1580 | |||
1581 | ref = local->rate_ctrl; | ||
1582 | local->rate_ctrl = NULL; | ||
1583 | rate_control_put(ref); | ||
1584 | } | ||
1585 | |||
1586 | struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | 1545 | struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, |
1587 | const struct ieee80211_ops *ops) | 1546 | const struct ieee80211_ops *ops) |
1588 | { | 1547 | { |