mac80211: remove rate_control_clear
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 16 Oct 2008 09:21:49 +0000 (11:21 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 31 Oct 2008 23:00:37 +0000 (19:00 -0400)
"Clearing" the rate control algorithm is pointless, none of
the algorithms actually uses this operation and it's not even
invoked properly for all channel switching. Also, there's no
need to since rate control algorithms work per station.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/rc.c
drivers/net/wireless/iwlwifi/iwl-3945-rs.c
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
include/net/mac80211.h
net/mac80211/rate.h
net/mac80211/rc80211_minstrel.c
net/mac80211/rc80211_pid_algo.c
net/mac80211/util.c

index 6afafeddeda2efc26ef75b08e0a42c964e8f6d59..9ce535915a1a3bf400d6658ab901adb0e5517021 100644 (file)
@@ -2038,11 +2038,6 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
        ath_rc_node_update(sc->hw, priv_sta);
 }
 
-static void ath_rate_clear(void *priv)
-{
-       return;
-}
-
 static void *ath_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
 {
        struct ath_softc *sc = hw->priv;
@@ -2092,7 +2087,6 @@ static struct rate_control_ops ath_rate_ops = {
        .tx_status = ath_tx_status,
        .get_rate = ath_get_rate,
        .rate_init = ath_rate_init,
-       .clear = ath_rate_clear,
        .alloc = ath_rate_alloc,
        .free = ath_rate_free,
        .alloc_sta = ath_rate_alloc_sta,
index f440ed0fe54335a582613be4b0bc4ad9a081181f..bfeef701b1fd192b6de7a41c5d795ab96c08b260 100644 (file)
@@ -355,12 +355,6 @@ static void rs_free(void *priv)
        return;
 }
 
-static void rs_clear(void *priv)
-{
-       return;
-}
-
-
 static void *rs_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
 {
        struct iwl3945_rs_sta *rs_sta;
@@ -784,7 +778,6 @@ static struct rate_control_ops rs_ops = {
        .tx_status = rs_tx_status,
        .get_rate = rs_get_rate,
        .rate_init = rs_rate_init,
-       .clear = rs_clear,
        .alloc = rs_alloc,
        .free = rs_free,
        .alloc_sta = rs_alloc_sta,
index f685e5d6c2810b4afd0086a02a20e9046872506f..6fdb2fb755b006284ae31a723bc1903b4c13fc26 100644 (file)
@@ -2393,19 +2393,6 @@ static void rs_free(void *priv_rate)
        return;
 }
 
-static void rs_clear(void *priv_rate)
-{
-#ifdef CONFIG_IWLWIFI_DEBUG
-       struct iwl_priv *priv = (struct iwl_priv *) priv_rate;
-
-       IWL_DEBUG_RATE("enter\n");
-
-       /* TODO - add rate scale state reset */
-
-       IWL_DEBUG_RATE("leave\n");
-#endif /* CONFIG_IWLWIFI_DEBUG */
-}
-
 static void rs_free_sta(void *priv_r, struct ieee80211_sta *sta,
                        void *priv_sta)
 {
@@ -2593,7 +2580,6 @@ static struct rate_control_ops rs_ops = {
        .tx_status = rs_tx_status,
        .get_rate = rs_get_rate,
        .rate_init = rs_rate_init,
-       .clear = rs_clear,
        .alloc = rs_alloc,
        .free = rs_free,
        .alloc_sta = rs_alloc_sta,
index 3741c0a7978a6caaa0b84be5d5c0270704dd1f95..e0b1ff9a3148db3f6a33dc2de8fc53fa4e65689c 100644 (file)
@@ -1917,7 +1917,6 @@ struct rate_control_ops {
        struct module *module;
        const char *name;
        void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir);
-       void (*clear)(void *priv);
        void (*free)(void *priv);
 
        void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
index 7c25edf9ac55c256acf0360d5508350a601073f2..928da625e281557ccecc0f1923def7b9bfa72415 100644 (file)
@@ -63,12 +63,6 @@ static inline void rate_control_rate_init(struct sta_info *sta)
 }
 
 
-static inline void rate_control_clear(struct ieee80211_local *local)
-{
-       struct rate_control_ref *ref = local->rate_ctrl;
-       ref->ops->clear(ref->priv);
-}
-
 static inline void *rate_control_alloc_sta(struct rate_control_ref *ref,
                                           struct ieee80211_sta *sta,
                                           gfp_t gfp)
index c10debc29ad669f4879981fcbc9363a9e79e4478..c643e373fc50fde1d82b7acec7a330762e7ab7c4 100644 (file)
@@ -507,11 +507,6 @@ minstrel_free_sta(void *priv, struct ieee80211_sta *sta, void *priv_sta)
        kfree(mi);
 }
 
-static void
-minstrel_clear(void *priv)
-{
-}
-
 static void *
 minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
 {
@@ -565,7 +560,6 @@ static struct rate_control_ops mac80211_minstrel = {
        .tx_status = minstrel_tx_status,
        .get_rate = minstrel_get_rate,
        .rate_init = minstrel_rate_init,
-       .clear = minstrel_clear,
        .alloc = minstrel_alloc,
        .free = minstrel_free,
        .alloc_sta = minstrel_alloc_sta,
index 92caecfcee78a7c931a49a68c52033840e485d51..2328ba56803915ad12e9364bb6d1b93a53d6907b 100644 (file)
@@ -446,10 +446,6 @@ static void rate_control_pid_free(void *priv)
        kfree(pinfo);
 }
 
-static void rate_control_pid_clear(void *priv)
-{
-}
-
 static void *rate_control_pid_alloc_sta(void *priv, struct ieee80211_sta *sta,
                                        gfp_t gfp)
 {
@@ -480,7 +476,6 @@ static struct rate_control_ops mac80211_rcpid = {
        .tx_status = rate_control_pid_tx_status,
        .get_rate = rate_control_pid_get_rate,
        .rate_init = rate_control_pid_rate_init,
-       .clear = rate_control_pid_clear,
        .alloc = rate_control_pid_alloc,
        .free = rate_control_pid_free,
        .alloc_sta = rate_control_pid_alloc_sta,
index ec8b6335f0c143b5250872e39e12308cd55cb08f..0f841317c7e9ef25568e9cdca41dfe78f7bbb60b 100644 (file)
@@ -647,8 +647,6 @@ int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
                else
                        ret = ieee80211_hw_config(
                                local, IEEE80211_CONF_CHANGE_CHANNEL);
-
-               rate_control_clear(local);
        }
 
        return ret;