Commit 830f9038 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

mac80211: allow driver to ask for a rate control algorithm

This allows a driver to ask for a specific rate control algorithm.
The rate control algorithm asked for must be registered and be
available as a module or built-in.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 999acd9c
...@@ -706,11 +706,16 @@ enum ieee80211_hw_flags { ...@@ -706,11 +706,16 @@ enum ieee80211_hw_flags {
* *
* @queues: number of available hardware transmit queues for * @queues: number of available hardware transmit queues for
* data packets. WMM/QoS requires at least four. * data packets. WMM/QoS requires at least four.
*
* @rate_control_algorithm: rate control algorithm for this hardware.
* If unset (NULL), the default algorithm will be used. Must be
* set before calling ieee80211_register_hw().
*/ */
struct ieee80211_hw { struct ieee80211_hw {
struct ieee80211_conf conf; struct ieee80211_conf conf;
struct wiphy *wiphy; struct wiphy *wiphy;
struct workqueue_struct *workqueue; struct workqueue_struct *workqueue;
const char *rate_control_algorithm;
void *priv; void *priv;
u32 flags; u32 flags;
unsigned int extra_tx_headroom; unsigned int extra_tx_headroom;
......
...@@ -1072,7 +1072,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1072,7 +1072,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev)); ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));
ieee80211_if_set_type(local->mdev, IEEE80211_IF_TYPE_AP); ieee80211_if_set_type(local->mdev, IEEE80211_IF_TYPE_AP);
result = ieee80211_init_rate_ctrl_alg(local, NULL); result = ieee80211_init_rate_ctrl_alg(local,
hw->rate_control_algorithm);
if (result < 0) { if (result < 0) {
printk(KERN_DEBUG "%s: Failed to initialize rate control " printk(KERN_DEBUG "%s: Failed to initialize rate control "
"algorithm\n", wiphy_name(local->hw.wiphy)); "algorithm\n", wiphy_name(local->hw.wiphy));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment