rc80211_pid_algo.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. /*
  2. * Copyright 2002-2005, Instant802 Networks, Inc.
  3. * Copyright 2005, Devicescape Software, Inc.
  4. * Copyright 2007, Mattias Nissler <mattias.nissler@gmx.de>
  5. * Copyright 2007-2008, Stefano Brivio <stefano.brivio@polimi.it>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/netdevice.h>
  12. #include <linux/types.h>
  13. #include <linux/skbuff.h>
  14. #include <linux/debugfs.h>
  15. #include <net/mac80211.h>
  16. #include "rate.h"
  17. #include "mesh.h"
  18. #include "rc80211_pid.h"
  19. /* This is an implementation of a TX rate control algorithm that uses a PID
  20. * controller. Given a target failed frames rate, the controller decides about
  21. * TX rate changes to meet the target failed frames rate.
  22. *
  23. * The controller basically computes the following:
  24. *
  25. * adj = CP * err + CI * err_avg + CD * (err - last_err) * (1 + sharpening)
  26. *
  27. * where
  28. * adj adjustment value that is used to switch TX rate (see below)
  29. * err current error: target vs. current failed frames percentage
  30. * last_err last error
  31. * err_avg average (i.e. poor man's integral) of recent errors
  32. * sharpening non-zero when fast response is needed (i.e. right after
  33. * association or no frames sent for a long time), heading
  34. * to zero over time
  35. * CP Proportional coefficient
  36. * CI Integral coefficient
  37. * CD Derivative coefficient
  38. *
  39. * CP, CI, CD are subject to careful tuning.
  40. *
  41. * The integral component uses a exponential moving average approach instead of
  42. * an actual sliding window. The advantage is that we don't need to keep an
  43. * array of the last N error values and computation is easier.
  44. *
  45. * Once we have the adj value, we map it to a rate by means of a learning
  46. * algorithm. This algorithm keeps the state of the percentual failed frames
  47. * difference between rates. The behaviour of the lowest available rate is kept
  48. * as a reference value, and every time we switch between two rates, we compute
  49. * the difference between the failed frames each rate exhibited. By doing so,
  50. * we compare behaviours which different rates exhibited in adjacent timeslices,
  51. * thus the comparison is minimally affected by external conditions. This
  52. * difference gets propagated to the whole set of measurements, so that the
  53. * reference is always the same. Periodically, we normalize this set so that
  54. * recent events weigh the most. By comparing the adj value with this set, we
  55. * avoid pejorative switches to lower rates and allow for switches to higher
  56. * rates if they behaved well.
  57. *
  58. * Note that for the computations we use a fixed-point representation to avoid
  59. * floating point arithmetic. Hence, all values are shifted left by
  60. * RC_PID_ARITH_SHIFT.
  61. */
  62. /* Adjust the rate while ensuring that we won't switch to a lower rate if it
  63. * exhibited a worse failed frames behaviour and we'll choose the highest rate
  64. * whose failed frames behaviour is not worse than the one of the original rate
  65. * target. While at it, check that the new rate is valid. */
  66. static void rate_control_pid_adjust_rate(struct ieee80211_local *local,
  67. struct sta_info *sta, int adj,
  68. struct rc_pid_rateinfo *rinfo)
  69. {
  70. struct ieee80211_sub_if_data *sdata;
  71. struct ieee80211_supported_band *sband;
  72. int cur_sorted, new_sorted, probe, tmp, n_bitrates, band;
  73. int cur = sta->txrate_idx;
  74. sdata = sta->sdata;
  75. sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
  76. band = sband->band;
  77. n_bitrates = sband->n_bitrates;
  78. /* Map passed arguments to sorted values. */
  79. cur_sorted = rinfo[cur].rev_index;
  80. new_sorted = cur_sorted + adj;
  81. /* Check limits. */
  82. if (new_sorted < 0)
  83. new_sorted = rinfo[0].rev_index;
  84. else if (new_sorted >= n_bitrates)
  85. new_sorted = rinfo[n_bitrates - 1].rev_index;
  86. tmp = new_sorted;
  87. if (adj < 0) {
  88. /* Ensure that the rate decrease isn't disadvantageous. */
  89. for (probe = cur_sorted; probe >= new_sorted; probe--)
  90. if (rinfo[probe].diff <= rinfo[cur_sorted].diff &&
  91. rate_supported(sta, band, rinfo[probe].index))
  92. tmp = probe;
  93. } else {
  94. /* Look for rate increase with zero (or below) cost. */
  95. for (probe = new_sorted + 1; probe < n_bitrates; probe++)
  96. if (rinfo[probe].diff <= rinfo[new_sorted].diff &&
  97. rate_supported(sta, band, rinfo[probe].index))
  98. tmp = probe;
  99. }
  100. /* Fit the rate found to the nearest supported rate. */
  101. do {
  102. if (rate_supported(sta, band, rinfo[tmp].index)) {
  103. sta->txrate_idx = rinfo[tmp].index;
  104. break;
  105. }
  106. if (adj < 0)
  107. tmp--;
  108. else
  109. tmp++;
  110. } while (tmp < n_bitrates && tmp >= 0);
  111. #ifdef CONFIG_MAC80211_DEBUGFS
  112. rate_control_pid_event_rate_change(
  113. &((struct rc_pid_sta_info *)sta->rate_ctrl_priv)->events,
  114. sta->txrate_idx, sband->bitrates[sta->txrate_idx].bitrate);
  115. #endif
  116. }
  117. /* Normalize the failed frames per-rate differences. */
  118. static void rate_control_pid_normalize(struct rc_pid_info *pinfo, int l)
  119. {
  120. int i, norm_offset = pinfo->norm_offset;
  121. struct rc_pid_rateinfo *r = pinfo->rinfo;
  122. if (r[0].diff > norm_offset)
  123. r[0].diff -= norm_offset;
  124. else if (r[0].diff < -norm_offset)
  125. r[0].diff += norm_offset;
  126. for (i = 0; i < l - 1; i++)
  127. if (r[i + 1].diff > r[i].diff + norm_offset)
  128. r[i + 1].diff -= norm_offset;
  129. else if (r[i + 1].diff <= r[i].diff)
  130. r[i + 1].diff += norm_offset;
  131. }
  132. static void rate_control_pid_sample(struct rc_pid_info *pinfo,
  133. struct ieee80211_local *local,
  134. struct sta_info *sta)
  135. {
  136. #ifdef CONFIG_MAC80211_MESH
  137. struct ieee80211_sub_if_data *sdata = sta->sdata;
  138. #endif
  139. struct rc_pid_sta_info *spinfo = sta->rate_ctrl_priv;
  140. struct rc_pid_rateinfo *rinfo = pinfo->rinfo;
  141. struct ieee80211_supported_band *sband;
  142. u32 pf;
  143. s32 err_avg;
  144. u32 err_prop;
  145. u32 err_int;
  146. u32 err_der;
  147. int adj, i, j, tmp;
  148. unsigned long period;
  149. sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
  150. spinfo = sta->rate_ctrl_priv;
  151. /* In case nothing happened during the previous control interval, turn
  152. * the sharpening factor on. */
  153. period = (HZ * pinfo->sampling_period + 500) / 1000;
  154. if (!period)
  155. period = 1;
  156. if (jiffies - spinfo->last_sample > 2 * period)
  157. spinfo->sharp_cnt = pinfo->sharpen_duration;
  158. spinfo->last_sample = jiffies;
  159. /* This should never happen, but in case, we assume the old sample is
  160. * still a good measurement and copy it. */
  161. if (unlikely(spinfo->tx_num_xmit == 0))
  162. pf = spinfo->last_pf;
  163. else {
  164. pf = spinfo->tx_num_failed * 100 / spinfo->tx_num_xmit;
  165. #ifdef CONFIG_MAC80211_MESH
  166. if (pf == 100 &&
  167. sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT)
  168. mesh_plink_broken(sta);
  169. #endif
  170. pf <<= RC_PID_ARITH_SHIFT;
  171. sta->fail_avg = ((pf + (spinfo->last_pf << 3)) / 9)
  172. >> RC_PID_ARITH_SHIFT;
  173. }
  174. spinfo->tx_num_xmit = 0;
  175. spinfo->tx_num_failed = 0;
  176. /* If we just switched rate, update the rate behaviour info. */
  177. if (pinfo->oldrate != sta->txrate_idx) {
  178. i = rinfo[pinfo->oldrate].rev_index;
  179. j = rinfo[sta->txrate_idx].rev_index;
  180. tmp = (pf - spinfo->last_pf);
  181. tmp = RC_PID_DO_ARITH_RIGHT_SHIFT(tmp, RC_PID_ARITH_SHIFT);
  182. rinfo[j].diff = rinfo[i].diff + tmp;
  183. pinfo->oldrate = sta->txrate_idx;
  184. }
  185. rate_control_pid_normalize(pinfo, sband->n_bitrates);
  186. /* Compute the proportional, integral and derivative errors. */
  187. err_prop = (pinfo->target << RC_PID_ARITH_SHIFT) - pf;
  188. err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift;
  189. spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop;
  190. err_int = spinfo->err_avg_sc >> pinfo->smoothing_shift;
  191. err_der = (pf - spinfo->last_pf) *
  192. (1 + pinfo->sharpen_factor * spinfo->sharp_cnt);
  193. spinfo->last_pf = pf;
  194. if (spinfo->sharp_cnt)
  195. spinfo->sharp_cnt--;
  196. #ifdef CONFIG_MAC80211_DEBUGFS
  197. rate_control_pid_event_pf_sample(&spinfo->events, pf, err_prop, err_int,
  198. err_der);
  199. #endif
  200. /* Compute the controller output. */
  201. adj = (err_prop * pinfo->coeff_p + err_int * pinfo->coeff_i
  202. + err_der * pinfo->coeff_d);
  203. adj = RC_PID_DO_ARITH_RIGHT_SHIFT(adj, 2 * RC_PID_ARITH_SHIFT);
  204. /* Change rate. */
  205. if (adj)
  206. rate_control_pid_adjust_rate(local, sta, adj, rinfo);
  207. }
  208. static void rate_control_pid_tx_status(void *priv, struct net_device *dev,
  209. struct sk_buff *skb,
  210. struct ieee80211_tx_status *status)
  211. {
  212. struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  213. struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
  214. struct ieee80211_sub_if_data *sdata;
  215. struct rc_pid_info *pinfo = priv;
  216. struct sta_info *sta;
  217. struct rc_pid_sta_info *spinfo;
  218. unsigned long period;
  219. struct ieee80211_supported_band *sband;
  220. rcu_read_lock();
  221. sta = sta_info_get(local, hdr->addr1);
  222. sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
  223. if (!sta)
  224. goto unlock;
  225. /* Don't update the state if we're not controlling the rate. */
  226. sdata = sta->sdata;
  227. if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) {
  228. sta->txrate_idx = sdata->bss->max_ratectrl_rateidx;
  229. goto unlock;
  230. }
  231. /* Ignore all frames that were sent with a different rate than the rate
  232. * we currently advise mac80211 to use. */
  233. if (status->control.tx_rate != &sband->bitrates[sta->txrate_idx])
  234. goto unlock;
  235. spinfo = sta->rate_ctrl_priv;
  236. spinfo->tx_num_xmit++;
  237. #ifdef CONFIG_MAC80211_DEBUGFS
  238. rate_control_pid_event_tx_status(&spinfo->events, status);
  239. #endif
  240. /* We count frames that totally failed to be transmitted as two bad
  241. * frames, those that made it out but had some retries as one good and
  242. * one bad frame. */
  243. if (status->excessive_retries) {
  244. spinfo->tx_num_failed += 2;
  245. spinfo->tx_num_xmit++;
  246. } else if (status->retry_count) {
  247. spinfo->tx_num_failed++;
  248. spinfo->tx_num_xmit++;
  249. }
  250. if (status->excessive_retries) {
  251. sta->tx_retry_failed++;
  252. sta->tx_num_consecutive_failures++;
  253. sta->tx_num_mpdu_fail++;
  254. } else {
  255. sta->tx_num_consecutive_failures = 0;
  256. sta->tx_num_mpdu_ok++;
  257. }
  258. sta->tx_retry_count += status->retry_count;
  259. sta->tx_num_mpdu_fail += status->retry_count;
  260. /* Update PID controller state. */
  261. period = (HZ * pinfo->sampling_period + 500) / 1000;
  262. if (!period)
  263. period = 1;
  264. if (time_after(jiffies, spinfo->last_sample + period))
  265. rate_control_pid_sample(pinfo, local, sta);
  266. unlock:
  267. rcu_read_unlock();
  268. }
  269. static void rate_control_pid_get_rate(void *priv, struct net_device *dev,
  270. struct ieee80211_supported_band *sband,
  271. struct sk_buff *skb,
  272. struct rate_selection *sel)
  273. {
  274. struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  275. struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
  276. struct ieee80211_sub_if_data *sdata;
  277. struct sta_info *sta;
  278. int rateidx;
  279. u16 fc;
  280. rcu_read_lock();
  281. sta = sta_info_get(local, hdr->addr1);
  282. /* Send management frames and broadcast/multicast data using lowest
  283. * rate. */
  284. fc = le16_to_cpu(hdr->frame_control);
  285. if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
  286. is_multicast_ether_addr(hdr->addr1) || !sta) {
  287. sel->rate = rate_lowest(local, sband, sta);
  288. rcu_read_unlock();
  289. return;
  290. }
  291. /* If a forced rate is in effect, select it. */
  292. sdata = IEEE80211_DEV_TO_SUB_IF(dev);
  293. if (sdata->bss && sdata->bss->force_unicast_rateidx > -1)
  294. sta->txrate_idx = sdata->bss->force_unicast_rateidx;
  295. rateidx = sta->txrate_idx;
  296. if (rateidx >= sband->n_bitrates)
  297. rateidx = sband->n_bitrates - 1;
  298. sta->last_txrate_idx = rateidx;
  299. rcu_read_unlock();
  300. sel->rate = &sband->bitrates[rateidx];
  301. #ifdef CONFIG_MAC80211_DEBUGFS
  302. rate_control_pid_event_tx_rate(
  303. &((struct rc_pid_sta_info *) sta->rate_ctrl_priv)->events,
  304. rateidx, sband->bitrates[rateidx].bitrate);
  305. #endif
  306. }
  307. static void rate_control_pid_rate_init(void *priv, void *priv_sta,
  308. struct ieee80211_local *local,
  309. struct sta_info *sta)
  310. {
  311. /* TODO: This routine should consider using RSSI from previous packets
  312. * as we need to have IEEE 802.1X auth succeed immediately after assoc..
  313. * Until that method is implemented, we will use the lowest supported
  314. * rate as a workaround. */
  315. struct ieee80211_supported_band *sband;
  316. sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
  317. sta->txrate_idx = rate_lowest_index(local, sband, sta);
  318. sta->fail_avg = 0;
  319. }
  320. static void *rate_control_pid_alloc(struct ieee80211_local *local)
  321. {
  322. struct rc_pid_info *pinfo;
  323. struct rc_pid_rateinfo *rinfo;
  324. struct ieee80211_supported_band *sband;
  325. int i, j, tmp;
  326. bool s;
  327. #ifdef CONFIG_MAC80211_DEBUGFS
  328. struct rc_pid_debugfs_entries *de;
  329. #endif
  330. sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
  331. pinfo = kmalloc(sizeof(*pinfo), GFP_ATOMIC);
  332. if (!pinfo)
  333. return NULL;
  334. /* We can safely assume that sband won't change unless we get
  335. * reinitialized. */
  336. rinfo = kmalloc(sizeof(*rinfo) * sband->n_bitrates, GFP_ATOMIC);
  337. if (!rinfo) {
  338. kfree(pinfo);
  339. return NULL;
  340. }
  341. pinfo->target = RC_PID_TARGET_PF;
  342. pinfo->sampling_period = RC_PID_INTERVAL;
  343. pinfo->coeff_p = RC_PID_COEFF_P;
  344. pinfo->coeff_i = RC_PID_COEFF_I;
  345. pinfo->coeff_d = RC_PID_COEFF_D;
  346. pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT;
  347. pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR;
  348. pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION;
  349. pinfo->norm_offset = RC_PID_NORM_OFFSET;
  350. pinfo->rinfo = rinfo;
  351. pinfo->oldrate = 0;
  352. /* Sort the rates. This is optimized for the most common case (i.e.
  353. * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed
  354. * mapping too. */
  355. for (i = 0; i < sband->n_bitrates; i++) {
  356. rinfo[i].index = i;
  357. rinfo[i].rev_index = i;
  358. if (RC_PID_FAST_START)
  359. rinfo[i].diff = 0;
  360. else
  361. rinfo[i].diff = i * pinfo->norm_offset;
  362. }
  363. for (i = 1; i < sband->n_bitrates; i++) {
  364. s = 0;
  365. for (j = 0; j < sband->n_bitrates - i; j++)
  366. if (unlikely(sband->bitrates[rinfo[j].index].bitrate >
  367. sband->bitrates[rinfo[j + 1].index].bitrate)) {
  368. tmp = rinfo[j].index;
  369. rinfo[j].index = rinfo[j + 1].index;
  370. rinfo[j + 1].index = tmp;
  371. rinfo[rinfo[j].index].rev_index = j;
  372. rinfo[rinfo[j + 1].index].rev_index = j + 1;
  373. s = 1;
  374. }
  375. if (!s)
  376. break;
  377. }
  378. #ifdef CONFIG_MAC80211_DEBUGFS
  379. de = &pinfo->dentries;
  380. de->dir = debugfs_create_dir("rc80211_pid",
  381. local->hw.wiphy->debugfsdir);
  382. de->target = debugfs_create_u32("target_pf", S_IRUSR | S_IWUSR,
  383. de->dir, &pinfo->target);
  384. de->sampling_period = debugfs_create_u32("sampling_period",
  385. S_IRUSR | S_IWUSR, de->dir,
  386. &pinfo->sampling_period);
  387. de->coeff_p = debugfs_create_u32("coeff_p", S_IRUSR | S_IWUSR,
  388. de->dir, &pinfo->coeff_p);
  389. de->coeff_i = debugfs_create_u32("coeff_i", S_IRUSR | S_IWUSR,
  390. de->dir, &pinfo->coeff_i);
  391. de->coeff_d = debugfs_create_u32("coeff_d", S_IRUSR | S_IWUSR,
  392. de->dir, &pinfo->coeff_d);
  393. de->smoothing_shift = debugfs_create_u32("smoothing_shift",
  394. S_IRUSR | S_IWUSR, de->dir,
  395. &pinfo->smoothing_shift);
  396. de->sharpen_factor = debugfs_create_u32("sharpen_factor",
  397. S_IRUSR | S_IWUSR, de->dir,
  398. &pinfo->sharpen_factor);
  399. de->sharpen_duration = debugfs_create_u32("sharpen_duration",
  400. S_IRUSR | S_IWUSR, de->dir,
  401. &pinfo->sharpen_duration);
  402. de->norm_offset = debugfs_create_u32("norm_offset",
  403. S_IRUSR | S_IWUSR, de->dir,
  404. &pinfo->norm_offset);
  405. #endif
  406. return pinfo;
  407. }
  408. static void rate_control_pid_free(void *priv)
  409. {
  410. struct rc_pid_info *pinfo = priv;
  411. #ifdef CONFIG_MAC80211_DEBUGFS
  412. struct rc_pid_debugfs_entries *de = &pinfo->dentries;
  413. debugfs_remove(de->norm_offset);
  414. debugfs_remove(de->sharpen_duration);
  415. debugfs_remove(de->sharpen_factor);
  416. debugfs_remove(de->smoothing_shift);
  417. debugfs_remove(de->coeff_d);
  418. debugfs_remove(de->coeff_i);
  419. debugfs_remove(de->coeff_p);
  420. debugfs_remove(de->sampling_period);
  421. debugfs_remove(de->target);
  422. debugfs_remove(de->dir);
  423. #endif
  424. kfree(pinfo->rinfo);
  425. kfree(pinfo);
  426. }
  427. static void rate_control_pid_clear(void *priv)
  428. {
  429. }
  430. static void *rate_control_pid_alloc_sta(void *priv, gfp_t gfp)
  431. {
  432. struct rc_pid_sta_info *spinfo;
  433. spinfo = kzalloc(sizeof(*spinfo), gfp);
  434. if (spinfo == NULL)
  435. return NULL;
  436. spinfo->last_sample = jiffies;
  437. #ifdef CONFIG_MAC80211_DEBUGFS
  438. spin_lock_init(&spinfo->events.lock);
  439. init_waitqueue_head(&spinfo->events.waitqueue);
  440. #endif
  441. return spinfo;
  442. }
  443. static void rate_control_pid_free_sta(void *priv, void *priv_sta)
  444. {
  445. struct rc_pid_sta_info *spinfo = priv_sta;
  446. kfree(spinfo);
  447. }
  448. static struct rate_control_ops mac80211_rcpid = {
  449. .name = "pid",
  450. .tx_status = rate_control_pid_tx_status,
  451. .get_rate = rate_control_pid_get_rate,
  452. .rate_init = rate_control_pid_rate_init,
  453. .clear = rate_control_pid_clear,
  454. .alloc = rate_control_pid_alloc,
  455. .free = rate_control_pid_free,
  456. .alloc_sta = rate_control_pid_alloc_sta,
  457. .free_sta = rate_control_pid_free_sta,
  458. #ifdef CONFIG_MAC80211_DEBUGFS
  459. .add_sta_debugfs = rate_control_pid_add_sta_debugfs,
  460. .remove_sta_debugfs = rate_control_pid_remove_sta_debugfs,
  461. #endif
  462. };
  463. MODULE_DESCRIPTION("PID controller based rate control algorithm");
  464. MODULE_AUTHOR("Stefano Brivio");
  465. MODULE_AUTHOR("Mattias Nissler");
  466. MODULE_LICENSE("GPL");
  467. int __init rc80211_pid_init(void)
  468. {
  469. return ieee80211_rate_control_register(&mac80211_rcpid);
  470. }
  471. void rc80211_pid_exit(void)
  472. {
  473. ieee80211_rate_control_unregister(&mac80211_rcpid);
  474. }
  475. #ifdef CONFIG_MAC80211_RC_PID_MODULE
  476. module_init(rc80211_pid_init);
  477. module_exit(rc80211_pid_exit);
  478. #endif