aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/i2400m.h
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-07 08:43:10 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 02:56:19 -0400
commita0beba21c3e2dff9a31739f1660ba3ff8c7150a7 (patch)
treec38d559fd600274c4526f835c2b614a55df5d4c6 /drivers/net/wimax/i2400m/i2400m.h
parentaf77dfa7811cd4e533003a9e7e9bf27dece96c6d (diff)
wimax/i2400m: queue device's report until the driver is ready for them
The i2400m might start sending reports to the driver before it is done setting up all the infrastructure needed for handling them. Currently we were just dropping them when the driver wasn't ready and that is bad in certain situations, as the sync between the driver's idea of the device's state and the device's state dissapears. This changes that by implementing a queue for handling reports. Incoming reports are appended to it and a workstruct is woken to process the list of queued reports. When the device is not yet ready to handle them, the workstruct is not woken, but at soon as the device becomes ready again, the queue is processed. As a consequence of this, i2400m_queue_work() is no longer used, and thus removed. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/i2400m.h')
-rw-r--r--drivers/net/wimax/i2400m/i2400m.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wimax/i2400m/i2400m.h b/drivers/net/wimax/i2400m/i2400m.h
index 4f8815d88874..55bca430c69b 100644
--- a/drivers/net/wimax/i2400m/i2400m.h
+++ b/drivers/net/wimax/i2400m/i2400m.h
@@ -421,6 +421,13 @@ struct i2400m_barker_db;
421 * delivered. Then the driver can release them to the host. See 421 * delivered. Then the driver can release them to the host. See
422 * drivers/net/i2400m/rx.c for details. 422 * drivers/net/i2400m/rx.c for details.
423 * 423 *
424 * @rx_reports: reports received from the device that couldn't be
425 * processed because the driver wasn't still ready; when ready,
426 * they are pulled from here and chewed.
427 *
428 * @rx_reports_ws: Work struct used to kick a scan of the RX reports
429 * list and to process each.
430 *
424 * @src_mac_addr: MAC address used to make ethernet packets be coming 431 * @src_mac_addr: MAC address used to make ethernet packets be coming
425 * from. This is generated at i2400m_setup() time and used during 432 * from. This is generated at i2400m_setup() time and used during
426 * the life cycle of the instance. See i2400m_fake_eth_header(). 433 * the life cycle of the instance. See i2400m_fake_eth_header().
@@ -548,6 +555,8 @@ struct i2400m {
548 rx_num, rx_size_acc, rx_size_min, rx_size_max; 555 rx_num, rx_size_acc, rx_size_min, rx_size_max;
549 struct i2400m_roq *rx_roq; /* not under rx_lock! */ 556 struct i2400m_roq *rx_roq; /* not under rx_lock! */
550 u8 src_mac_addr[ETH_HLEN]; 557 u8 src_mac_addr[ETH_HLEN];
558 struct list_head rx_reports; /* under rx_lock! */
559 struct work_struct rx_report_ws;
551 560
552 struct mutex msg_mutex; /* serialize command execution */ 561 struct mutex msg_mutex; /* serialize command execution */
553 struct completion msg_completion; 562 struct completion msg_completion;
@@ -830,9 +839,7 @@ struct i2400m_work {
830 size_t pl_size; 839 size_t pl_size;
831 u8 pl[0]; 840 u8 pl[0];
832}; 841};
833extern int i2400m_queue_work(struct i2400m *, 842
834 void (*)(struct work_struct *), gfp_t,
835 const void *, size_t);
836extern int i2400m_schedule_work(struct i2400m *, 843extern int i2400m_schedule_work(struct i2400m *,
837 void (*)(struct work_struct *), gfp_t, 844 void (*)(struct work_struct *), gfp_t,
838 const void *, size_t); 845 const void *, size_t);
@@ -847,6 +854,7 @@ extern void i2400m_msg_ack_hook(struct i2400m *,
847 const struct i2400m_l3l4_hdr *, size_t); 854 const struct i2400m_l3l4_hdr *, size_t);
848extern void i2400m_report_hook(struct i2400m *, 855extern void i2400m_report_hook(struct i2400m *,
849 const struct i2400m_l3l4_hdr *, size_t); 856 const struct i2400m_l3l4_hdr *, size_t);
857extern void i2400m_report_hook_work(struct work_struct *);
850extern int i2400m_cmd_enter_powersave(struct i2400m *); 858extern int i2400m_cmd_enter_powersave(struct i2400m *);
851extern int i2400m_cmd_get_state(struct i2400m *); 859extern int i2400m_cmd_get_state(struct i2400m *);
852extern int i2400m_cmd_exit_idle(struct i2400m *); 860extern int i2400m_cmd_exit_idle(struct i2400m *);