aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/wimax
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-02-28 23:42:52 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-02 03:10:26 -0800
commitfd5c565c0c04d2716cfdac3f1de3c2261d6a457d (patch)
tree0f64176368c6ffb5b4f95abf37b422bfba7fdd6e /include/linux/wimax
parent347707baa77d273d79258303e00200d40cf3b323 (diff)
downloadkernel_goldelico_gta04-fd5c565c0c04d2716cfdac3f1de3c2261d6a457d.zip
kernel_goldelico_gta04-fd5c565c0c04d2716cfdac3f1de3c2261d6a457d.tar.gz
kernel_goldelico_gta04-fd5c565c0c04d2716cfdac3f1de3c2261d6a457d.tar.bz2
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.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/wimax/i2400m.h b/include/linux/wimax/i2400m.h
index 686eeb2..ad36e07 100644
--- a/include/linux/wimax/i2400m.h
+++ b/include/linux/wimax/i2400m.h
@@ -207,6 +207,7 @@ enum i2400m_pt {
I2400M_PT_TRACE, /* For device debug */
I2400M_PT_RESET_WARM, /* device reset */
I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */
+ I2400M_PT_EDATA, /* Extended RX data */
I2400M_PT_ILLEGAL
};
@@ -221,6 +222,32 @@ struct i2400m_pl_data_hdr {
} __attribute__((packed));
+/*
+ * Payload for an extended data packet
+ *
+ * New in v1.4
+ *
+ * @cs: the type of data in the packet, as defined per (802.16e
+ * T11.13.19.1). Currently only 2 (IPv4 packet) supported.
+ *
+ * This is prefixed to each and every INCOMING DATA packet.
+ */
+struct i2400m_pl_edata_hdr {
+ __le32 reorder;
+ __u8 cs;
+ __u8 reserved[11];
+} __attribute__((packed));
+
+enum i2400m_cs {
+ I2400M_CS_IPV4_0 = 0,
+ I2400M_CS_IPV4 = 2,
+};
+
+enum i2400m_reorder {
+ I2400M_REORDER_NEEDED = 0x01,
+};
+
+
/* Misc constants */
enum {
I2400M_PL_PAD = 16, /* Payload data size alignment */
@@ -382,6 +409,7 @@ enum i2400m_tlv {
I2400M_TLV_DEVICE_RESET_TYPE = 132,
I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601,
I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611,
+ I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614,
};
@@ -518,5 +546,12 @@ struct i2400m_tlv_config_idle_timeout {
* 0 disabled */
} __attribute__((packed));
+/* New in v1.4 -- for backward compat, will be removed */
+struct i2400m_tlv_config_d2h_data_format {
+ struct i2400m_tlv_hdr hdr;
+ __u8 format; /* 0 old format, 1 enhanced */
+ __u8 reserved[3];
+} __attribute__((packed));
+
#endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */