svn commit: r233129 - head/sys/net80211

Adrian Chadd adrian at freebsd.org
Sun Mar 18 21:51:57 UTC 2012


pointy-hat to me, sorry!

*grumbles*


Adrian


On 18 March 2012 12:35, Adrian Chadd <adrian at 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:
>  Add a missing endian conversion.
>
> Modified:
>  head/sys/net80211/ieee80211_alq.h
>
> Modified: head/sys/net80211/ieee80211_alq.h
> ==============================================================================
> --- head/sys/net80211/ieee80211_alq.h   Sun Mar 18 19:28:52 2012        (r233128)
> +++ head/sys/net80211/ieee80211_alq.h   Sun Mar 18 19:35:30 2012        (r233129)
> @@ -27,7 +27,10 @@
>  #ifndef        __IEEE80211_ALQ_H__
>  #define        __IEEE80211_ALQ_H__
>
> -#define        IEEE80211_ALQ_PAYLOAD_SIZE      24
> +/*
> + * 64 byte ieee80211_alq_rec size.
> + */
> +#define        IEEE80211_ALQ_PAYLOAD_SIZE      52
>
>  /*
>  * timestamp
> @@ -50,4 +53,124 @@ struct ieee80211_alq_rec {
>  extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op,
>            u_char *p, int l);
>
> +/*
> + * Debugging entry points
> + */
> +
> +/*
> + * This should be called by the driver on each RX frame.
> + */
> +#define        IEEE80211_ALQ_OP_RXFRAME        0x1
> +#define        IEEE80211_ALQ_OP_TXFRAME        0x2
> +#define        IEEE80211_ALQ_OP_TXCOMPLETE     0x3
> +#define        IEEE80211_ALQ_OP_TX_BAW         0x4
> +
> +/* Driver-specific - for descriptor contents, etc */
> +#define        IEEE80211_ALQ_OP_RX_DESC        0x81
> +#define        IEEE80211_ALQ_OP_TX_DESC        0x82
> +#define        IEEE80211_ALQ_OP_TX_DESCCOMP    0x83
> +
> +struct ieee80211_alq_rx_frame_struct {
> +       uint64_t        tsf;    /* Network order */
> +       uintptr_t       bf;     /* Driver-specific buffer ptr */
> +       uint8_t         rxq;    /* Driver-specific RX queue */
> +       uint8_t         pad[3]; /* Pad alignment */
> +       struct ieee80211_qosframe wh;   /* XXX 4 bytes, QoS? */
> +};
> +
> +struct ieee80211_alq_tx_frame {
> +       uint64_t        tsf;    /* Network order */
> +       uintptr_t       bf;     /* Driver-specific buffer ptr */
> +       uint32_t        tx_flags;       /* Driver-specific TX flags */
> +       uint8_t         txq;    /* Driver-specific TX queue */
> +       uint8_t         pad[3]; /* Pad alignment */
> +       struct ieee80211_qosframe wh;   /* XXX 4 bytes, QoS? */
> +};
> +
> +struct ieee80211_alq_tx_frame_complete {
> +       uint64_t        tsf;    /* Network order */
> +       uintptr_t       bf;     /* Driver-specific buffer ptr */
> +       uint8_t         txq;    /* Driver-specific TX queue */
> +       uint8_t         txstatus;       /* driver-specific TX status */
> +       uint8_t         pad[2]; /* Pad alignment */
> +       struct ieee80211_qosframe wh;   /* XXX 4 bytes, QoS? */
> +};
> +
> +
> +/*
> + * This is used for frame RX.
> + */
> +static inline void
> +ieee80211_alq_rx_frame(struct ieee80211vap *vap,
> +    struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t rxq)
> +{
> +       struct ieee80211_alq_rx_frame_struct rf;
> +
> +       memset(&rf, 0, sizeof(rf));
> +       rf.tsf = htole64(tsf);
> +       rf.bf = (uintptr_t) bf;
> +       rf.rxq = rxq;
> +       memcpy(&rf.wh, wh, sizeof(struct ieee80211_qosframe));
> +       ieee80211_alq_log(vap, IEEE80211_ALQ_OP_RXFRAME, (char *) &rf,
> +           sizeof(rf));
> +}
> +
> +/*
> + * Frame TX scheduling
> + */
> +static inline void
> +ieee80211_alq_tx_frame(struct ieee80211vap *vap,
> +    struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t txq,
> +    uint32_t tx_flags)
> +{
> +
> +}
> +
> +/*
> + * Frame TX completion
> + */
> +static inline void
> +ieee80211_alq_tx_frame_comp(struct ieee80211vap *vap,
> +    struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t txq,
> +    uint8_t tx_status)
> +{
> +
> +}
> +
> +struct ieee80211_alq_tx_baw_note_struct {
> +       uintptr_t       bf;
> +       uint8_t         tid;
> +       uint8_t         what;
> +       uint16_t        baw;
> +       uint16_t        wnd;
> +       uint16_t        new_baw;
> +};
> +
> +/*
> + * TX BAW noting - add, remove, etc
> + */
> +
> +#define        IEEE80211_ALQ_TX_BAW_ADD        0x1
> +#define        IEEE80211_ALQ_TX_BAW_COMPLETE   0x2
> +
> +static inline void
> +ieee80211_alq_tx_baw_note(struct ieee80211vap *vap,
> +    struct ieee80211_frame *wh, void *bf, uint8_t tid, uint8_t what,
> +    uint16_t baw, uint16_t wnd, uint16_t new_baw)
> +{
> +       struct ieee80211_alq_tx_baw_note_struct tb;
> +
> +       memset(&tb, 0, sizeof(tb));
> +
> +       tb.bf = (uintptr_t) bf;
> +       tb.tid = tid;
> +       tb.what = what;
> +       tb.baw = htons(baw);
> +       tb.wnd = htons(wnd);
> +       tb.new_baw = htons(new_baw);
> +
> +       ieee80211_alq_log(vap, IEEE80211_ALQ_OP_TX_BAW, (char *) &tb,
> +           sizeof(tb));
> +}
> +
>  #endif /* __IEEE80211_ALQ_H__ */


More information about the svn-src-head mailing list