diff options
author | Dirk Brandewie <dirk.j.brandewie@intel.com> | 2009-08-12 14:29:46 -0400 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-19 02:55:44 -0400 |
commit | 2093586de29418820b89aae05746511392f8ad73 (patch) | |
tree | b5d021b77a886380e3ac529e6a837b063cff0779 /drivers/net/wimax/i2400m/usb.c | |
parent | 8bec9a5efd5691c5a32d85da1da09643290ebb72 (diff) |
wimax/i2400m: USB driver uses a configurable endpoint map
Newer generations of the i2400m USB WiMAX device use a different
endpoint map; in order to make it easy to support it, we make the
endpoint-to-function mapeable instead of static.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/usb.c')
-rw-r--r-- | drivers/net/wimax/i2400m/usb.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index 8f7b16a6bf3c..a5879e21bbf3 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -232,13 +232,15 @@ int i2400mu_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt) | |||
232 | 232 | ||
233 | d_fnstart(3, dev, "(i2400m %p rt %u)\n", i2400m, rt); | 233 | d_fnstart(3, dev, "(i2400m %p rt %u)\n", i2400m, rt); |
234 | if (rt == I2400M_RT_WARM) | 234 | if (rt == I2400M_RT_WARM) |
235 | result = __i2400mu_send_barker(i2400mu, i2400m_WARM_BOOT_BARKER, | 235 | result = __i2400mu_send_barker( |
236 | sizeof(i2400m_WARM_BOOT_BARKER), | 236 | i2400mu, i2400m_WARM_BOOT_BARKER, |
237 | I2400MU_EP_BULK_OUT); | 237 | sizeof(i2400m_WARM_BOOT_BARKER), |
238 | i2400mu->endpoint_cfg.bulk_out); | ||
238 | else if (rt == I2400M_RT_COLD) | 239 | else if (rt == I2400M_RT_COLD) |
239 | result = __i2400mu_send_barker(i2400mu, i2400m_COLD_BOOT_BARKER, | 240 | result = __i2400mu_send_barker( |
240 | sizeof(i2400m_COLD_BOOT_BARKER), | 241 | i2400mu, i2400m_COLD_BOOT_BARKER, |
241 | I2400MU_EP_RESET_COLD); | 242 | sizeof(i2400m_COLD_BOOT_BARKER), |
243 | i2400mu->endpoint_cfg.reset_cold); | ||
242 | else if (rt == I2400M_RT_BUS) { | 244 | else if (rt == I2400M_RT_BUS) { |
243 | do_bus_reset: | 245 | do_bus_reset: |
244 | result = usb_reset_device(i2400mu->usb_dev); | 246 | result = usb_reset_device(i2400mu->usb_dev); |
@@ -412,6 +414,12 @@ int i2400mu_probe(struct usb_interface *iface, | |||
412 | i2400m->bus_fw_names = i2400mu_bus_fw_names; | 414 | i2400m->bus_fw_names = i2400mu_bus_fw_names; |
413 | i2400m->bus_bm_mac_addr_impaired = 0; | 415 | i2400m->bus_bm_mac_addr_impaired = 0; |
414 | 416 | ||
417 | { | ||
418 | i2400mu->endpoint_cfg.bulk_out = 0; | ||
419 | i2400mu->endpoint_cfg.notification = 1; | ||
420 | i2400mu->endpoint_cfg.reset_cold = 2; | ||
421 | i2400mu->endpoint_cfg.bulk_in = 3; | ||
422 | } | ||
415 | #ifdef CONFIG_PM | 423 | #ifdef CONFIG_PM |
416 | iface->needs_remote_wakeup = 1; /* autosuspend (15s delay) */ | 424 | iface->needs_remote_wakeup = 1; /* autosuspend (15s delay) */ |
417 | device_init_wakeup(dev, 1); | 425 | device_init_wakeup(dev, 1); |