Commit 50fb2e4572141770380f5919793c6e575fa3474b

Authored by Johannes Berg
Committed by John W. Linville
1 parent 65a0667b43

mac80211: remove rate_control_clear

"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>

Showing 8 changed files with 0 additions and 47 deletions Side-by-side Diff

drivers/net/wireless/ath9k/rc.c
... ... @@ -2038,11 +2038,6 @@
2038 2038 ath_rc_node_update(sc->hw, priv_sta);
2039 2039 }
2040 2040  
2041   -static void ath_rate_clear(void *priv)
2042   -{
2043   - return;
2044   -}
2045   -
2046 2041 static void *ath_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
2047 2042 {
2048 2043 struct ath_softc *sc = hw->priv;
... ... @@ -2092,7 +2087,6 @@
2092 2087 .tx_status = ath_tx_status,
2093 2088 .get_rate = ath_get_rate,
2094 2089 .rate_init = ath_rate_init,
2095   - .clear = ath_rate_clear,
2096 2090 .alloc = ath_rate_alloc,
2097 2091 .free = ath_rate_free,
2098 2092 .alloc_sta = ath_rate_alloc_sta,
drivers/net/wireless/iwlwifi/iwl-3945-rs.c
... ... @@ -355,12 +355,6 @@
355 355 return;
356 356 }
357 357  
358   -static void rs_clear(void *priv)
359   -{
360   - return;
361   -}
362   -
363   -
364 358 static void *rs_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
365 359 {
366 360 struct iwl3945_rs_sta *rs_sta;
... ... @@ -784,7 +778,6 @@
784 778 .tx_status = rs_tx_status,
785 779 .get_rate = rs_get_rate,
786 780 .rate_init = rs_rate_init,
787   - .clear = rs_clear,
788 781 .alloc = rs_alloc,
789 782 .free = rs_free,
790 783 .alloc_sta = rs_alloc_sta,
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
... ... @@ -2393,19 +2393,6 @@
2393 2393 return;
2394 2394 }
2395 2395  
2396   -static void rs_clear(void *priv_rate)
2397   -{
2398   -#ifdef CONFIG_IWLWIFI_DEBUG
2399   - struct iwl_priv *priv = (struct iwl_priv *) priv_rate;
2400   -
2401   - IWL_DEBUG_RATE("enter\n");
2402   -
2403   - /* TODO - add rate scale state reset */
2404   -
2405   - IWL_DEBUG_RATE("leave\n");
2406   -#endif /* CONFIG_IWLWIFI_DEBUG */
2407   -}
2408   -
2409 2396 static void rs_free_sta(void *priv_r, struct ieee80211_sta *sta,
2410 2397 void *priv_sta)
2411 2398 {
... ... @@ -2593,7 +2580,6 @@
2593 2580 .tx_status = rs_tx_status,
2594 2581 .get_rate = rs_get_rate,
2595 2582 .rate_init = rs_rate_init,
2596   - .clear = rs_clear,
2597 2583 .alloc = rs_alloc,
2598 2584 .free = rs_free,
2599 2585 .alloc_sta = rs_alloc_sta,
include/net/mac80211.h
... ... @@ -1917,7 +1917,6 @@
1917 1917 struct module *module;
1918 1918 const char *name;
1919 1919 void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir);
1920   - void (*clear)(void *priv);
1921 1920 void (*free)(void *priv);
1922 1921  
1923 1922 void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
... ... @@ -63,12 +63,6 @@
63 63 }
64 64  
65 65  
66   -static inline void rate_control_clear(struct ieee80211_local *local)
67   -{
68   - struct rate_control_ref *ref = local->rate_ctrl;
69   - ref->ops->clear(ref->priv);
70   -}
71   -
72 66 static inline void *rate_control_alloc_sta(struct rate_control_ref *ref,
73 67 struct ieee80211_sta *sta,
74 68 gfp_t gfp)
net/mac80211/rc80211_minstrel.c
... ... @@ -507,11 +507,6 @@
507 507 kfree(mi);
508 508 }
509 509  
510   -static void
511   -minstrel_clear(void *priv)
512   -{
513   -}
514   -
515 510 static void *
516 511 minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
517 512 {
... ... @@ -565,7 +560,6 @@
565 560 .tx_status = minstrel_tx_status,
566 561 .get_rate = minstrel_get_rate,
567 562 .rate_init = minstrel_rate_init,
568   - .clear = minstrel_clear,
569 563 .alloc = minstrel_alloc,
570 564 .free = minstrel_free,
571 565 .alloc_sta = minstrel_alloc_sta,
net/mac80211/rc80211_pid_algo.c
... ... @@ -446,10 +446,6 @@
446 446 kfree(pinfo);
447 447 }
448 448  
449   -static void rate_control_pid_clear(void *priv)
450   -{
451   -}
452   -
453 449 static void *rate_control_pid_alloc_sta(void *priv, struct ieee80211_sta *sta,
454 450 gfp_t gfp)
455 451 {
... ... @@ -480,7 +476,6 @@
480 476 .tx_status = rate_control_pid_tx_status,
481 477 .get_rate = rate_control_pid_get_rate,
482 478 .rate_init = rate_control_pid_rate_init,
483   - .clear = rate_control_pid_clear,
484 479 .alloc = rate_control_pid_alloc,
485 480 .free = rate_control_pid_free,
486 481 .alloc_sta = rate_control_pid_alloc_sta,
... ... @@ -647,8 +647,6 @@
647 647 else
648 648 ret = ieee80211_hw_config(
649 649 local, IEEE80211_CONF_CHANGE_CHANNEL);
650   -
651   - rate_control_clear(local);
652 650 }
653 651  
654 652 return ret;