Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Use the EDCA and QOS stuff from net80211 instead...



details:   https://anonhg.NetBSD.org/src/rev/10de1735d523
branches:  trunk
changeset: 785782:10de1735d523
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 30 01:10:00 2013 +0000

description:
Use the EDCA and QOS stuff from net80211 instead of a home grown copy.
(now that more than one driver needs it, duplicating would be gross)

diffstat:

 sys/dev/usb/if_otusvar.h |  56 +-----------------------------------------------
 1 files changed, 1 insertions(+), 55 deletions(-)

diffs (77 lines):

diff -r 77f2882252b6 -r 10de1735d523 sys/dev/usb/if_otusvar.h
--- a/sys/dev/usb/if_otusvar.h  Sat Mar 30 01:06:37 2013 +0000
+++ b/sys/dev/usb/if_otusvar.h  Sat Mar 30 01:10:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_otusvar.h,v 1.6 2013/01/29 13:54:26 christos Exp $  */
+/*     $NetBSD: if_otusvar.h,v 1.7 2013/03/30 01:10:00 christos Exp $  */
 /*     $OpenBSD: if_otusreg.h,v 1.6 2009/04/06 18:17:01 damien Exp $   */
 
 /*-
@@ -20,10 +20,6 @@
 #ifndef _IF_OTUSVAR_H_
 #define _IF_OTUSVAR_H_
 
-#ifdef EDCA_NUM_AC
-#define HAVE_EDCA
-#endif
-
 #ifndef HAVE_EDCA
 /************************************************************
  * XXX: This block belongs in sys/net80211/ieee80211_var.h.
@@ -41,56 +37,6 @@
 /************************************************************/
 #endif /* ! HAVE_EDCA */
 
-#ifndef HAVE_EDCA
-/************************************************************
- * XXX: This block belongs in sys/net80211/ieee80211.h.
- */
-
-/*
- * EDCA Access Categories.
- */
-enum ieee80211_edca_ac {
-       EDCA_AC_BK  = 1,        /* Background */
-       EDCA_AC_BE  = 0,        /* Best Effort */
-       EDCA_AC_VI  = 2,        /* Video */
-       EDCA_AC_VO  = 3         /* Voice */
-};
-#define EDCA_NUM_AC    4
-
-/* XXX: OpenBSD has more of these defined with the standard referenced */
-#define IEEE80211_QOS_ACK_POLICY_NOACK         0x0020
-#define IEEE80211_QOS_ACK_POLICY_MASK          0x0060
-
-static __inline int
-ieee80211_has_addr4(const struct ieee80211_frame *wh)
-{
-       return (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) ==
-           IEEE80211_FC1_DIR_DSTODS;
-}
-
-static __inline int
-ieee80211_has_qos(const struct ieee80211_frame *wh)
-{
-       return (wh->i_fc[0] &
-           (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_QOS)) ==
-           (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS);
-}
-
-static __inline u_int16_t
-ieee80211_get_qos(const struct ieee80211_frame *wh)
-{
-       const u_int8_t *frm;
-
-       if (ieee80211_has_addr4(wh))
-               frm = ((const struct ieee80211_qosframe_addr4 *)wh)->i_qos;
-       else
-               frm = ((const struct ieee80211_qosframe *)wh)->i_qos;
-
-       return le16toh(*(const u_int16_t *)frm);
-}
-/************************************************************/
-#endif /* ! HAVE_EDCA */
-
 /* Default EDCA parameters for when QoS is disabled. */
 static const struct ieee80211_edca_ac_params otus_edca_def[] = {
        { 4, 10, 3,  0, 0 },



Home | Main Index | Thread Index | Old Index