]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/mac80211/rate.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[karo-tx-linux.git] / net / mac80211 / rate.c
index 6d0bd198af19d949841eaa94489c301e75f4cfa8..4f772de2f21327f0e6a3c78736898caff548abaa 100644 (file)
@@ -103,6 +103,7 @@ ieee80211_rate_control_ops_get(const char *name)
        struct rate_control_ops *ops;
        const char *alg_name;
 
+       kparam_block_sysfs_write(ieee80211_default_rc_algo);
        if (!name)
                alg_name = ieee80211_default_rc_algo;
        else
@@ -120,6 +121,7 @@ ieee80211_rate_control_ops_get(const char *name)
        /* try built-in one if specific alg requested but not found */
        if (!ops && strlen(CONFIG_MAC80211_RC_DEFAULT))
                ops = ieee80211_try_rate_control_ops_get(CONFIG_MAC80211_RC_DEFAULT);
+       kparam_unblock_sysfs_write(ieee80211_default_rc_algo);
 
        return ops;
 }
@@ -366,8 +368,8 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
 
        ref = rate_control_alloc(name, local);
        if (!ref) {
-               printk(KERN_WARNING "%s: Failed to select rate control "
-                      "algorithm\n", wiphy_name(local->hw.wiphy));
+               wiphy_warn(local->hw.wiphy,
+                          "Failed to select rate control algorithm\n");
                return -ENOENT;
        }
 
@@ -378,9 +380,8 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
                sta_info_flush(local, NULL);
        }
 
-       printk(KERN_DEBUG "%s: Selected rate control "
-              "algorithm '%s'\n", wiphy_name(local->hw.wiphy),
-              ref->ops->name);
+       wiphy_debug(local->hw.wiphy, "Selected rate control algorithm '%s'\n",
+                   ref->ops->name);
 
        return 0;
 }