Module Name:    src
Committed By:   christos
Date:           Sat Mar 30 01:10:00 UTC 2013

Modified Files:
        src/sys/dev/usb: if_otusvar.h

Log Message:
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)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_otusvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/if_otusvar.h
diff -u src/sys/dev/usb/if_otusvar.h:1.6 src/sys/dev/usb/if_otusvar.h:1.7
--- src/sys/dev/usb/if_otusvar.h:1.6	Tue Jan 29 08:54:26 2013
+++ src/sys/dev/usb/if_otusvar.h	Fri Mar 29 21:10:00 2013
@@ -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 @@ struct ieee80211_edca_ac_params {
 /************************************************************/
 #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 },

Reply via email to