diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-02-28 18:42:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-02 06:10:26 -0500 |
commit | fd5c565c0c04d2716cfdac3f1de3c2261d6a457d (patch) | |
tree | 0f64176368c6ffb5b4f95abf37b422bfba7fdd6e /include/linux/wimax | |
parent | 347707baa77d273d79258303e00200d40cf3b323 (diff) |
wimax/i2400m: support extended data RX protocol (no need to reallocate skbs)
Newer i2400m firmwares (>= v1.4) extend the data RX protocol so that
each packet has a 16 byte header. This header is mainly used to
implement host reordeing (which is addressed in later commits).
However, this header also allows us to overwrite it (once data has
been extracted) with an Ethernet header and deliver to the networking
stack without having to reallocate the skb (as it happened in fw <=
v1.3) to make room for it.
- control.c: indicate the device [dev_initialize()] that the driver
wants to use the extended data RX protocol. Also involves adding the
definition of the needed data types in include/linux/wimax/i2400m.h.
- rx.c: handle the new payload type for the extended RX data
protocol. Prepares the skb for delivery to
netdev.c:i2400m_net_erx().
- netdev.c: Introduce i2400m_net_erx() that adds the fake ethernet
address to a prepared skb and delivers it to the networking
stack.
- cleanup: in most instances in rx.c, the variable 'single' was
renamed to 'single_last' for it better conveys its meaning.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/wimax')
-rw-r--r-- | include/linux/wimax/i2400m.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/wimax/i2400m.h b/include/linux/wimax/i2400m.h index 686eeb2b9704..ad36e073a70c 100644 --- a/include/linux/wimax/i2400m.h +++ b/include/linux/wimax/i2400m.h | |||
@@ -207,6 +207,7 @@ enum i2400m_pt { | |||
207 | I2400M_PT_TRACE, /* For device debug */ | 207 | I2400M_PT_TRACE, /* For device debug */ |
208 | I2400M_PT_RESET_WARM, /* device reset */ | 208 | I2400M_PT_RESET_WARM, /* device reset */ |
209 | I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */ | 209 | I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */ |
210 | I2400M_PT_EDATA, /* Extended RX data */ | ||
210 | I2400M_PT_ILLEGAL | 211 | I2400M_PT_ILLEGAL |
211 | }; | 212 | }; |
212 | 213 | ||
@@ -221,6 +222,32 @@ struct i2400m_pl_data_hdr { | |||
221 | } __attribute__((packed)); | 222 | } __attribute__((packed)); |
222 | 223 | ||
223 | 224 | ||
225 | /* | ||
226 | * Payload for an extended data packet | ||
227 | * | ||
228 | * New in v1.4 | ||
229 | * | ||
230 | * @cs: the type of data in the packet, as defined per (802.16e | ||
231 | * T11.13.19.1). Currently only 2 (IPv4 packet) supported. | ||
232 | * | ||
233 | * This is prefixed to each and every INCOMING DATA packet. | ||
234 | */ | ||
235 | struct i2400m_pl_edata_hdr { | ||
236 | __le32 reorder; | ||
237 | __u8 cs; | ||
238 | __u8 reserved[11]; | ||
239 | } __attribute__((packed)); | ||
240 | |||
241 | enum i2400m_cs { | ||
242 | I2400M_CS_IPV4_0 = 0, | ||
243 | I2400M_CS_IPV4 = 2, | ||
244 | }; | ||
245 | |||
246 | enum i2400m_reorder { | ||
247 | I2400M_REORDER_NEEDED = 0x01, | ||
248 | }; | ||
249 | |||
250 | |||
224 | /* Misc constants */ | 251 | /* Misc constants */ |
225 | enum { | 252 | enum { |
226 | I2400M_PL_PAD = 16, /* Payload data size alignment */ | 253 | I2400M_PL_PAD = 16, /* Payload data size alignment */ |
@@ -382,6 +409,7 @@ enum i2400m_tlv { | |||
382 | I2400M_TLV_DEVICE_RESET_TYPE = 132, | 409 | I2400M_TLV_DEVICE_RESET_TYPE = 132, |
383 | I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601, | 410 | I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601, |
384 | I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611, | 411 | I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611, |
412 | I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614, | ||
385 | }; | 413 | }; |
386 | 414 | ||
387 | 415 | ||
@@ -518,5 +546,12 @@ struct i2400m_tlv_config_idle_timeout { | |||
518 | * 0 disabled */ | 546 | * 0 disabled */ |
519 | } __attribute__((packed)); | 547 | } __attribute__((packed)); |
520 | 548 | ||
549 | /* New in v1.4 -- for backward compat, will be removed */ | ||
550 | struct i2400m_tlv_config_d2h_data_format { | ||
551 | struct i2400m_tlv_hdr hdr; | ||
552 | __u8 format; /* 0 old format, 1 enhanced */ | ||
553 | __u8 reserved[3]; | ||
554 | } __attribute__((packed)); | ||
555 | |||
521 | 556 | ||
522 | #endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */ | 557 | #endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */ |