Search Linux Wireless

Re: letting drivers choose their preferred rate scale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Berg wrote:
> 
> There were a few specific remarks about the patch

I reread the discussion carefully and can't find any specific
comments on the patch which for clarity I will reproduce below.


>, e.g. that the default
> shouldn't change as soon as a driver loads another rate control
> algorithm etc. 

The "default" rate scaling algorithm, is currently just the "first registered",
and as long as there is already an algorithm loaded, the driver can
"load" as many as it wants and wont change this. The patch doesn't touch
that logic.

> Once those are addressed I see no problems with merging
> such a patch.
> 
> johannes

ian

The patch in question:

Signed-off-by: James Ketrenos <jketreno@xxxxxxxxxxxxxxx>
---
include/net/mac80211.h   |    4 ++++
net/mac80211/ieee80211.c |   10 +++++++---
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ef9b613..f9ad839 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -533,6 +533,10 @@ struct ieee80211_hw {
    /* Number of available hardware TX queues for data packets.
     * WMM requires at least four queues. */
    int queues;
+
+    /* Preferred rate control algorithm. Leave as NULL for stack
+     * to select algorithm */
+    char *preferred_rate_control;
};

static inline void SET_IEEE80211_DEV(struct ieee80211_hw *hw, struct device *dev)
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 873ccb0..6dcc002 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -4875,10 +4875,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)

    ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));

-    result = ieee80211_init_rate_ctrl_alg(local, NULL);
+    result = ieee80211_init_rate_ctrl_alg(local,
+                          hw->preferred_rate_control);
+
    if (result < 0) {
-        printk(KERN_DEBUG "%s: Failed to initialize rate control "
-		"algorithm\n", local->mdev->name);
+	printk(KERN_DEBUG "%s: Failed to initialize %s rate control "
+               "algorithm\n", local->mdev->name,
+		hw->preferred_rate_control ?
+ 		hw->preferred_rate_control : "default");
        goto fail_rate;
    }
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux