Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Mar 2012 14:51:56 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r233129 - head/sys/net80211
Message-ID:  <CAJ-Vmo=pjpxR%2Bs9CDQaPee1EzdshAbfzJtEtpt85iMmoUbJC0Q@mail.gmail.com>
In-Reply-To: <201203181935.q2IJZUbr033080@svn.freebsd.org>
References:  <201203181935.q2IJZUbr033080@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
pointy-hat to me, sorry!

*grumbles*


Adrian


On 18 March 2012 12:35, Adrian Chadd <adrian@freebsd.org> wrote:
> Author: adrian
> Date: Sun Mar 18 19:35:30 2012
> New Revision: 233129
> URL: http://svn.freebsd.org/changeset/base/233129
>
> Log:
> =A0Add a missing endian conversion.
>
> Modified:
> =A0head/sys/net80211/ieee80211_alq.h
>
> Modified: head/sys/net80211/ieee80211_alq.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/net80211/ieee80211_alq.h =A0 Sun Mar 18 19:28:52 2012 =A0 =
=A0 =A0 =A0(r233128)
> +++ head/sys/net80211/ieee80211_alq.h =A0 Sun Mar 18 19:35:30 2012 =A0 =
=A0 =A0 =A0(r233129)
> @@ -27,7 +27,10 @@
> =A0#ifndef =A0 =A0 =A0 =A0__IEEE80211_ALQ_H__
> =A0#define =A0 =A0 =A0 =A0__IEEE80211_ALQ_H__
>
> -#define =A0 =A0 =A0 =A0IEEE80211_ALQ_PAYLOAD_SIZE =A0 =A0 =A024
> +/*
> + * 64 byte ieee80211_alq_rec size.
> + */
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_PAYLOAD_SIZE =A0 =A0 =A052
>
> =A0/*
> =A0* timestamp
> @@ -50,4 +53,124 @@ struct ieee80211_alq_rec {
> =A0extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op,
> =A0 =A0 =A0 =A0 =A0 =A0u_char *p, int l);
>
> +/*
> + * Debugging entry points
> + */
> +
> +/*
> + * This should be called by the driver on each RX frame.
> + */
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_RXFRAME =A0 =A0 =A0 =A00x1
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_TXFRAME =A0 =A0 =A0 =A00x2
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_TXCOMPLETE =A0 =A0 0x3
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_TX_BAW =A0 =A0 =A0 =A0 0x4
> +
> +/* Driver-specific - for descriptor contents, etc */
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_RX_DESC =A0 =A0 =A0 =A00x81
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_TX_DESC =A0 =A0 =A0 =A00x82
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_OP_TX_DESCCOMP =A0 =A00x83
> +
> +struct ieee80211_alq_rx_frame_struct {
> + =A0 =A0 =A0 uint64_t =A0 =A0 =A0 =A0tsf; =A0 =A0/* Network order */
> + =A0 =A0 =A0 uintptr_t =A0 =A0 =A0 bf; =A0 =A0 /* Driver-specific buffer=
 ptr */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 rxq; =A0 =A0/* Driver-specific RX q=
ueue */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 pad[3]; /* Pad alignment */
> + =A0 =A0 =A0 struct ieee80211_qosframe wh; =A0 /* XXX 4 bytes, QoS? */
> +};
> +
> +struct ieee80211_alq_tx_frame {
> + =A0 =A0 =A0 uint64_t =A0 =A0 =A0 =A0tsf; =A0 =A0/* Network order */
> + =A0 =A0 =A0 uintptr_t =A0 =A0 =A0 bf; =A0 =A0 /* Driver-specific buffer=
 ptr */
> + =A0 =A0 =A0 uint32_t =A0 =A0 =A0 =A0tx_flags; =A0 =A0 =A0 /* Driver-spe=
cific TX flags */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 txq; =A0 =A0/* Driver-specific TX q=
ueue */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 pad[3]; /* Pad alignment */
> + =A0 =A0 =A0 struct ieee80211_qosframe wh; =A0 /* XXX 4 bytes, QoS? */
> +};
> +
> +struct ieee80211_alq_tx_frame_complete {
> + =A0 =A0 =A0 uint64_t =A0 =A0 =A0 =A0tsf; =A0 =A0/* Network order */
> + =A0 =A0 =A0 uintptr_t =A0 =A0 =A0 bf; =A0 =A0 /* Driver-specific buffer=
 ptr */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 txq; =A0 =A0/* Driver-specific TX q=
ueue */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 txstatus; =A0 =A0 =A0 /* driver-spe=
cific TX status */
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 pad[2]; /* Pad alignment */
> + =A0 =A0 =A0 struct ieee80211_qosframe wh; =A0 /* XXX 4 bytes, QoS? */
> +};
> +
> +
> +/*
> + * This is used for frame RX.
> + */
> +static inline void
> +ieee80211_alq_rx_frame(struct ieee80211vap *vap,
> + =A0 =A0struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t rxq)
> +{
> + =A0 =A0 =A0 struct ieee80211_alq_rx_frame_struct rf;
> +
> + =A0 =A0 =A0 memset(&rf, 0, sizeof(rf));
> + =A0 =A0 =A0 rf.tsf =3D htole64(tsf);
> + =A0 =A0 =A0 rf.bf =3D (uintptr_t) bf;
> + =A0 =A0 =A0 rf.rxq =3D rxq;
> + =A0 =A0 =A0 memcpy(&rf.wh, wh, sizeof(struct ieee80211_qosframe));
> + =A0 =A0 =A0 ieee80211_alq_log(vap, IEEE80211_ALQ_OP_RXFRAME, (char *) &=
rf,
> + =A0 =A0 =A0 =A0 =A0 sizeof(rf));
> +}
> +
> +/*
> + * Frame TX scheduling
> + */
> +static inline void
> +ieee80211_alq_tx_frame(struct ieee80211vap *vap,
> + =A0 =A0struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t txq,
> + =A0 =A0uint32_t tx_flags)
> +{
> +
> +}
> +
> +/*
> + * Frame TX completion
> + */
> +static inline void
> +ieee80211_alq_tx_frame_comp(struct ieee80211vap *vap,
> + =A0 =A0struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t txq,
> + =A0 =A0uint8_t tx_status)
> +{
> +
> +}
> +
> +struct ieee80211_alq_tx_baw_note_struct {
> + =A0 =A0 =A0 uintptr_t =A0 =A0 =A0 bf;
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 tid;
> + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 what;
> + =A0 =A0 =A0 uint16_t =A0 =A0 =A0 =A0baw;
> + =A0 =A0 =A0 uint16_t =A0 =A0 =A0 =A0wnd;
> + =A0 =A0 =A0 uint16_t =A0 =A0 =A0 =A0new_baw;
> +};
> +
> +/*
> + * TX BAW noting - add, remove, etc
> + */
> +
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_TX_BAW_ADD =A0 =A0 =A0 =A00x1
> +#define =A0 =A0 =A0 =A0IEEE80211_ALQ_TX_BAW_COMPLETE =A0 0x2
> +
> +static inline void
> +ieee80211_alq_tx_baw_note(struct ieee80211vap *vap,
> + =A0 =A0struct ieee80211_frame *wh, void *bf, uint8_t tid, uint8_t what,
> + =A0 =A0uint16_t baw, uint16_t wnd, uint16_t new_baw)
> +{
> + =A0 =A0 =A0 struct ieee80211_alq_tx_baw_note_struct tb;
> +
> + =A0 =A0 =A0 memset(&tb, 0, sizeof(tb));
> +
> + =A0 =A0 =A0 tb.bf =3D (uintptr_t) bf;
> + =A0 =A0 =A0 tb.tid =3D tid;
> + =A0 =A0 =A0 tb.what =3D what;
> + =A0 =A0 =A0 tb.baw =3D htons(baw);
> + =A0 =A0 =A0 tb.wnd =3D htons(wnd);
> + =A0 =A0 =A0 tb.new_baw =3D htons(new_baw);
> +
> + =A0 =A0 =A0 ieee80211_alq_log(vap, IEEE80211_ALQ_OP_TX_BAW, (char *) &t=
b,
> + =A0 =A0 =A0 =A0 =A0 sizeof(tb));
> +}
> +
> =A0#endif /* __IEEE80211_ALQ_H__ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=pjpxR%2Bs9CDQaPee1EzdshAbfzJtEtpt85iMmoUbJC0Q>