Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2007 22:44:03 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 114514 for review
Message-ID:  <200702142244.l1EMi3GR021441@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114514

Change 114514 by sam@sam_ebb on 2007/02/14 22:43:36

	expose some stuff we'll use for 11n

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_input.c#84 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#63 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#29 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_var.h#46 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#84 (text+ko) ====

@@ -73,38 +73,8 @@
 	return 1;
 }
 
-/*
- * Emit a debug message about discarding a frame or information
- * element.  One format is for extracting the mac address from
- * the frame header; the other is for when a header is not
- * available or otherwise appropriate.
- */
-#define	IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...) do {		\
-	if ((_ic)->ic_debug & (_m))					\
-		ieee80211_discard_frame(_ic, _wh, _type, _fmt, __VA_ARGS__);\
-} while (0)
-#define	IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...) do {	\
-	if ((_ic)->ic_debug & (_m))					\
-		ieee80211_discard_ie(_ic, _wh, _type, _fmt, __VA_ARGS__);\
-} while (0)
-#define	IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...) do {	\
-	if ((_ic)->ic_debug & (_m))					\
-		ieee80211_discard_mac(_ic, _mac, _type, _fmt, __VA_ARGS__);\
-} while (0)
-
 static const u_int8_t *ieee80211_getbssid(struct ieee80211com *,
 	const struct ieee80211_frame *);
-static void ieee80211_discard_frame(struct ieee80211com *,
-	const struct ieee80211_frame *, const char *type, const char *fmt, ...);
-static void ieee80211_discard_ie(struct ieee80211com *,
-	const struct ieee80211_frame *, const char *type, const char *fmt, ...);
-static void ieee80211_discard_mac(struct ieee80211com *,
-	const u_int8_t mac[IEEE80211_ADDR_LEN], const char *type,
-	const char *fmt, ...);
-#else
-#define	IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...)
-#define	IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...)
-#define	IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...)
 #endif /* IEEE80211_DEBUG */
 
 static struct mbuf *ieee80211_defrag(struct ieee80211com *,
@@ -112,8 +82,6 @@
 static struct mbuf *ieee80211_decap(struct ieee80211com *, struct mbuf *, int);
 static void ieee80211_send_error(struct ieee80211com *, struct ieee80211_node *,
 		const u_int8_t *mac, int subtype, int arg);
-static void ieee80211_deliver_data(struct ieee80211com *,
-	struct ieee80211_node *, struct mbuf *);
 static struct mbuf *ieee80211_decap_fastframe(struct ieee80211com *,
 	struct ieee80211_node *, struct mbuf *);
 static void ieee80211_recv_pspoll(struct ieee80211com *,
@@ -690,7 +658,7 @@
 	return mfrag;
 }
 
-static void
+void
 ieee80211_deliver_data(struct ieee80211com *ic,
 	struct ieee80211_node *ni, struct mbuf *m)
 {
@@ -861,7 +829,7 @@
 /*
  * Decap a frame encapsulated in a fast-frame.
  */
-static struct mbuf *
+struct mbuf *
 ieee80211_decap1(struct mbuf *m, int *framelen)
 {
 #define	FF_LLC_SIZE	(sizeof(struct ether_header) + sizeof(struct llc))
@@ -3059,7 +3027,7 @@
 	if_printf(ic->ic_ifp, "[%s] %s\n", ether_sprintf(mac), buf);
 }
 
-static void
+void
 ieee80211_discard_frame(struct ieee80211com *ic,
 	const struct ieee80211_frame *wh,
 	const char *type, const char *fmt, ...)
@@ -3078,7 +3046,7 @@
 	printf("\n");
 }
 
-static void
+void
 ieee80211_discard_ie(struct ieee80211com *ic,
 	const struct ieee80211_frame *wh,
 	const char *type, const char *fmt, ...)
@@ -3097,7 +3065,7 @@
 	printf("\n");
 }
 
-static void
+void
 ieee80211_discard_mac(struct ieee80211com *ic,
 	const u_int8_t mac[IEEE80211_ADDR_LEN],
 	const char *type, const char *fmt, ...)

==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#63 (text+ko) ====

@@ -155,7 +155,7 @@
  * dispatched to the driver, then it is responsible for freeing the
  * reference (and potentially free'ing up any associated storage).
  */
-static int
+int
 ieee80211_mgmt_output(struct ieee80211com *ic, struct ieee80211_node *ni,
     struct mbuf *m, int type)
 {

==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#29 (text+ko) ====

@@ -59,12 +59,17 @@
 struct ieee80211_node;
 int	ieee80211_input(struct ieee80211com *, struct mbuf *,
 		struct ieee80211_node *, int, int, u_int32_t);
+void	ieee80211_deliver_data(struct ieee80211com *,
+		struct ieee80211_node *, struct mbuf *);
+struct mbuf *ieee80211_decap1(struct mbuf *, int *);
 int	ieee80211_setup_rates(struct ieee80211_node *ni,
 		const u_int8_t *rates, const u_int8_t *xrates, int flags);
 void	ieee80211_saveie(u_int8_t **, const u_int8_t *);
 void	ieee80211_saveath(struct ieee80211_node *, u_int8_t *);
 void	ieee80211_recv_mgmt(struct ieee80211com *, struct mbuf *,
 		struct ieee80211_node *, int, int, int, u_int32_t);
+int	ieee80211_mgmt_output(struct ieee80211com *, struct ieee80211_node *,
+		struct mbuf *, int type);
 struct ieee80211_bpf_params;
 int	ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *,
 		const struct ieee80211_bpf_params *);

==== //depot/projects/wifi/sys/net80211/ieee80211_var.h#46 (text+ko) ====

@@ -477,12 +477,43 @@
 	((_ic)->ic_debug & IEEE80211_MSG_SCAN)
 #define	ieee80211_msg_assoc(_ic) \
 	((_ic)->ic_debug & IEEE80211_MSG_ASSOC)
+
+/*
+ * Emit a debug message about discarding a frame or information
+ * element.  One format is for extracting the mac address from
+ * the frame header; the other is for when a header is not
+ * available or otherwise appropriate.
+ */
+#define	IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...) do {		\
+	if ((_ic)->ic_debug & (_m))					\
+		ieee80211_discard_frame(_ic, _wh, _type, _fmt, __VA_ARGS__);\
+} while (0)
+#define	IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...) do {	\
+	if ((_ic)->ic_debug & (_m))					\
+		ieee80211_discard_ie(_ic, _wh, _type, _fmt, __VA_ARGS__);\
+} while (0)
+#define	IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...) do {	\
+	if ((_ic)->ic_debug & (_m))					\
+		ieee80211_discard_mac(_ic, _mac, _type, _fmt, __VA_ARGS__);\
+} while (0)
+
+void ieee80211_discard_frame(struct ieee80211com *,
+	const struct ieee80211_frame *, const char *type, const char *fmt, ...);
+void ieee80211_discard_ie(struct ieee80211com *,
+	const struct ieee80211_frame *, const char *type, const char *fmt, ...);
+void ieee80211_discard_mac(struct ieee80211com *,
+	const u_int8_t mac[IEEE80211_ADDR_LEN], const char *type,
+	const char *fmt, ...);
 #else
 #define	IEEE80211_DPRINTF(_ic, _m, _fmt, ...)
 #define	IEEE80211_NOTE_FRAME(_ic, _m, _wh, _fmt, ...)
 #define	IEEE80211_NOTE_MAC(_ic, _m, _mac, _fmt, ...)
 #define	ieee80211_msg_dumppkts(_ic)	0
 #define	ieee80211_msg(_ic, _m)		0
+
+#define	IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...)
+#define	IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...)
+#define	IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...)
 #endif
 
 #endif /* _NET80211_IEEE80211_VAR_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702142244.l1EMi3GR021441>