aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wimax/i2400m/driver.c')
-rw-r--r--drivers/net/wimax/i2400m/driver.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c
index 10673af5a7f0..9b78e059563d 100644
--- a/drivers/net/wimax/i2400m/driver.c
+++ b/drivers/net/wimax/i2400m/driver.c
@@ -849,6 +849,36 @@ void i2400m_bm_buf_free(struct i2400m *i2400m)
849 849
850 850
851/** 851/**
852 * i2400m_init - Initialize a 'struct i2400m' from all zeroes
853 *
854 * This is a bus-generic API call.
855 */
856void i2400m_init(struct i2400m *i2400m)
857{
858 wimax_dev_init(&i2400m->wimax_dev);
859
860 i2400m->boot_mode = 1;
861 i2400m->rx_reorder = 1;
862 init_waitqueue_head(&i2400m->state_wq);
863
864 spin_lock_init(&i2400m->tx_lock);
865 i2400m->tx_pl_min = UINT_MAX;
866 i2400m->tx_size_min = UINT_MAX;
867
868 spin_lock_init(&i2400m->rx_lock);
869 i2400m->rx_pl_min = UINT_MAX;
870 i2400m->rx_size_min = UINT_MAX;
871
872 mutex_init(&i2400m->msg_mutex);
873 init_completion(&i2400m->msg_completion);
874
875 mutex_init(&i2400m->init_mutex);
876 /* wake_tx_ws is initialized in i2400m_tx_setup() */
877}
878EXPORT_SYMBOL_GPL(i2400m_init);
879
880
881/**
852 * i2400m_setup - bus-generic setup function for the i2400m device 882 * i2400m_setup - bus-generic setup function for the i2400m device
853 * 883 *
854 * @i2400m: device descriptor (bus-specific parts have been initialized) 884 * @i2400m: device descriptor (bus-specific parts have been initialized)