Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78566
b: refs/heads/master
c: ad01837
h: refs/heads/master
v: v3
  • Loading branch information
Mattias Nissler authored and David S. Miller committed Jan 28, 2008
1 parent 8576132 commit 7c70021
Show file tree
Hide file tree
Showing 6 changed files with 404 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1abbe498e4b5e4f2000dfc30a0fa25be9553530e
refs/heads/master: ad01837593338f13508463fa11c8dbf8109a1e5d
12 changes: 12 additions & 0 deletions trunk/net/mac80211/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ config MAC80211_RCSIMPLE
Say Y unless you know you will have another algorithm
available.

config MAC80211_RCPID
bool "'PID' rate control algorithm" if EMBEDDED
default y
depends on MAC80211
help
This option enables a TX rate control algorithm for
mac80211 that uses a PID controller to select the TX
rate.

Say Y unless you're sure you want to use a different
rate control algorithm.

config MAC80211_LEDS
bool "Enable LED triggers"
depends on MAC80211 && LEDS_TRIGGERS
Expand Down
1 change: 1 addition & 0 deletions trunk/net/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mac80211-objs-$(CONFIG_MAC80211_LEDS) += ieee80211_led.o
mac80211-objs-$(CONFIG_MAC80211_DEBUGFS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
mac80211-objs-$(CONFIG_NET_SCHED) += wme.o
mac80211-objs-$(CONFIG_MAC80211_RCSIMPLE) += rc80211_simple.o
mac80211-objs-$(CONFIG_MAC80211_RCPID) += rc80211_pid.o

mac80211-objs := \
ieee80211.o \
Expand Down
27 changes: 22 additions & 5 deletions trunk/net/mac80211/ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,30 +1315,47 @@ static int __init ieee80211_init(void)
#ifdef CONFIG_MAC80211_RCSIMPLE
ret = ieee80211_rate_control_register(&mac80211_rcsimple);
if (ret)
return ret;
goto fail;
#endif

#ifdef CONFIG_MAC80211_RCPID
ret = ieee80211_rate_control_register(&mac80211_rcpid);
if (ret)
goto fail;
#endif

ret = ieee80211_wme_register();
if (ret) {
#ifdef CONFIG_MAC80211_RCSIMPLE
ieee80211_rate_control_unregister(&mac80211_rcsimple);
#endif
printk(KERN_DEBUG "ieee80211_init: failed to "
"initialize WME (err=%d)\n", ret);
return ret;
goto fail;
}

ieee80211_debugfs_netdev_init();
ieee80211_regdomain_init();

return 0;

fail:

#ifdef CONFIG_MAC80211_RCSIMPLE
ieee80211_rate_control_unregister(&mac80211_rcsimple);
#endif
#ifdef CONFIG_MAC80211_RCPID
ieee80211_rate_control_unregister(&mac80211_rcpid);
#endif

return ret;
}

static void __exit ieee80211_exit(void)
{
#ifdef CONFIG_MAC80211_RCSIMPLE
ieee80211_rate_control_unregister(&mac80211_rcsimple);
#endif
#ifdef CONFIG_MAC80211_RCPID
ieee80211_rate_control_unregister(&mac80211_rcpid);
#endif

ieee80211_wme_unregister();
ieee80211_debugfs_netdev_exit();
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/mac80211/ieee80211_rate.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ struct rate_control_ref {
/* default 'simple' algorithm */
extern struct rate_control_ops mac80211_rcsimple;

/* 'PID' algorithm */
extern struct rate_control_ops mac80211_rcpid;

int ieee80211_rate_control_register(struct rate_control_ops *ops);
void ieee80211_rate_control_unregister(struct rate_control_ops *ops);

Expand Down
Loading

0 comments on commit 7c70021

Please sign in to comment.