File tree Expand file tree Collapse file tree 5 files changed +403
-5
lines changed Expand file tree Collapse file tree 5 files changed +403
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,18 @@ config MAC80211_RCSIMPLE
25
25
Say Y unless you know you will have another algorithm
26
26
available.
27
27
28
+ config MAC80211_RCPID
29
+ bool "'PID' rate control algorithm" if EMBEDDED
30
+ default y
31
+ depends on MAC80211
32
+ help
33
+ This option enables a TX rate control algorithm for
34
+ mac80211 that uses a PID controller to select the TX
35
+ rate.
36
+
37
+ Say Y unless you're sure you want to use a different
38
+ rate control algorithm.
39
+
28
40
config MAC80211_LEDS
29
41
bool "Enable LED triggers"
30
42
depends on MAC80211 && LEDS_TRIGGERS
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ mac80211-objs-$(CONFIG_MAC80211_LEDS) += ieee80211_led.o
4
4
mac80211-objs-$(CONFIG_MAC80211_DEBUGFS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
5
5
mac80211-objs-$(CONFIG_NET_SCHED) += wme.o
6
6
mac80211-objs-$(CONFIG_MAC80211_RCSIMPLE) += rc80211_simple.o
7
+ mac80211-objs-$(CONFIG_MAC80211_RCPID) += rc80211_pid.o
7
8
8
9
mac80211-objs := \
9
10
ieee80211.o \
Original file line number Diff line number Diff line change @@ -1315,30 +1315,47 @@ static int __init ieee80211_init(void)
1315
1315
#ifdef CONFIG_MAC80211_RCSIMPLE
1316
1316
ret = ieee80211_rate_control_register (& mac80211_rcsimple );
1317
1317
if (ret )
1318
- return ret ;
1318
+ goto fail ;
1319
+ #endif
1320
+
1321
+ #ifdef CONFIG_MAC80211_RCPID
1322
+ ret = ieee80211_rate_control_register (& mac80211_rcpid );
1323
+ if (ret )
1324
+ goto fail ;
1319
1325
#endif
1320
1326
1321
1327
ret = ieee80211_wme_register ();
1322
1328
if (ret ) {
1323
- #ifdef CONFIG_MAC80211_RCSIMPLE
1324
- ieee80211_rate_control_unregister (& mac80211_rcsimple );
1325
- #endif
1326
1329
printk (KERN_DEBUG "ieee80211_init: failed to "
1327
1330
"initialize WME (err=%d)\n" , ret );
1328
- return ret ;
1331
+ goto fail ;
1329
1332
}
1330
1333
1331
1334
ieee80211_debugfs_netdev_init ();
1332
1335
ieee80211_regdomain_init ();
1333
1336
1334
1337
return 0 ;
1338
+
1339
+ fail :
1340
+
1341
+ #ifdef CONFIG_MAC80211_RCSIMPLE
1342
+ ieee80211_rate_control_unregister (& mac80211_rcsimple );
1343
+ #endif
1344
+ #ifdef CONFIG_MAC80211_RCPID
1345
+ ieee80211_rate_control_unregister (& mac80211_rcpid );
1346
+ #endif
1347
+
1348
+ return ret ;
1335
1349
}
1336
1350
1337
1351
static void __exit ieee80211_exit (void )
1338
1352
{
1339
1353
#ifdef CONFIG_MAC80211_RCSIMPLE
1340
1354
ieee80211_rate_control_unregister (& mac80211_rcsimple );
1341
1355
#endif
1356
+ #ifdef CONFIG_MAC80211_RCPID
1357
+ ieee80211_rate_control_unregister (& mac80211_rcpid );
1358
+ #endif
1342
1359
1343
1360
ieee80211_wme_unregister ();
1344
1361
ieee80211_debugfs_netdev_exit ();
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ struct rate_control_ref {
61
61
/* default 'simple' algorithm */
62
62
extern struct rate_control_ops mac80211_rcsimple ;
63
63
64
+ /* 'PID' algorithm */
65
+ extern struct rate_control_ops mac80211_rcpid ;
66
+
64
67
int ieee80211_rate_control_register (struct rate_control_ops * ops );
65
68
void ieee80211_rate_control_unregister (struct rate_control_ops * ops );
66
69
You can’t perform that action at this time.
0 commit comments