Add 802.11 link-layer header.
This adds both the 802.11 frame header and the 802.2 LLC/SNAP header used on data packets.
We also check here for state of the link that would make it invalid to send a data packet; every data packet must pass through here, and no non-data packet (e.g. management frame) should.
struct golan_inbox_hdr hdr
Message header.
#define iob_push(iobuf, len)
#define IEEE80211_LLC_SSAP
Value for SSAP field in 802.2 LLC header for 802.11 frames: SNAP.
An 802.11 data or management frame without QoS or WDS header fields.
u16 net80211_duration(struct net80211_device *dev, int bytes, u16 rate)
Calculate one frame's contribution to 802.11 duration field.
#define IEEE80211_MAKESEQ(seqnr, frag)
Make 802.11 Sequence Control field from sequence and fragment numbers.
#define IEEE80211_THIS_VERSION
Expected value of Version bits in Frame Control.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define IEEE80211_STYPE_DATA
Subtype value for ordinary data frames, with no QoS or CF add-ons.
void * priv
Driver private data.
#define IEEE80211_TYP_FRAME_HEADER_LEN
Frame header length for frames we might work with.
static struct net_device * netdev
int assoc_rc
Return status code associated with state.
#define NET80211_ASSOCIATED
Whether we have successfully associated with the network.
Structure encapsulating the complete state of an 802.11 device.
#define IEEE80211_LLC_DSAP
Value for DSAP field in 802.2 LLC header for 802.11 frames: SNAP.
u16 rates[NET80211_MAX_RATES]
A list of all possible TX rates we might use.
#define IEEE80211_FC_TODS
802.11 Frame Control field: To Data System flag
#define IEEE80211_LLC_HEADER_LEN
Length of LLC/SNAP headers on data frames.
#define IEEE80211_LLC_CTRL
Value for control field in 802.2 LLC header for 802.11 frames.
u8 bssid[ETH_ALEN]
MAC address of the access point most recently associated.
u16 state
State of our association to the network.
#define ENETUNREACH
Network unreachable.
u8 rate
The rate currently in use, as an index into the rates array.
#define IEEE80211_TYPE_DATA
Type value for data frames.
void * memset(void *dest, int character, size_t len) __nonnull
u16 last_tx_seqnr
The sequence number of the last packet we sent.