wme.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * IEEE 802.11 driver (80211.o) - QoS datatypes
  3. * Copyright 2004, Instant802 Networks, Inc.
  4. * Copyright 2005, Devicescape Software, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef _WME_H
  11. #define _WME_H
  12. #include <linux/netdevice.h>
  13. #include "ieee80211_i.h"
  14. #define QOS_CONTROL_LEN 2
  15. #define QOS_CONTROL_ACK_POLICY_NORMAL 0
  16. #define QOS_CONTROL_ACK_POLICY_NOACK 1
  17. #define QOS_CONTROL_TID_MASK 0x0f
  18. #define QOS_CONTROL_ACK_POLICY_SHIFT 5
  19. #define QOS_CONTROL_TAG1D_MASK 0x07
  20. extern const int ieee802_1d_to_ac[8];
  21. static inline int WLAN_FC_IS_QOS_DATA(u16 fc)
  22. {
  23. return (fc & 0x8C) == 0x88;
  24. }
  25. #ifdef CONFIG_NET_SCHED
  26. void ieee80211_install_qdisc(struct net_device *dev);
  27. int ieee80211_qdisc_installed(struct net_device *dev);
  28. int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
  29. struct sta_info *sta, u16 tid);
  30. void ieee80211_ht_agg_queue_remove(struct ieee80211_local *local,
  31. struct sta_info *sta, u16 tid,
  32. u8 requeue);
  33. void ieee80211_requeue(struct ieee80211_local *local, int queue);
  34. int ieee80211_wme_register(void);
  35. void ieee80211_wme_unregister(void);
  36. #else
  37. static inline void ieee80211_install_qdisc(struct net_device *dev)
  38. {
  39. }
  40. static inline int ieee80211_qdisc_installed(struct net_device *dev)
  41. {
  42. return 0;
  43. }
  44. static inline int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
  45. struct sta_info *sta, u16 tid)
  46. {
  47. return -EAGAIN;
  48. }
  49. static inline void ieee80211_ht_agg_queue_remove(struct ieee80211_local *local,
  50. struct sta_info *sta, u16 tid,
  51. u8 requeue)
  52. {
  53. }
  54. static inline void ieee80211_requeue(struct ieee80211_local *local, int queue)
  55. {
  56. }
  57. static inline int ieee80211_wme_register(void)
  58. {
  59. return 0;
  60. }
  61. static inline void ieee80211_wme_unregister(void)
  62. {
  63. }
  64. #endif /* CONFIG_NET_SCHED */
  65. #endif /* _WME_H */