EXPORT_SYMBOL_GPL(i2400m_dev_reset_handle);
-/**
- * i2400m_bm_buf_alloc - Alloc the command and ack buffers for boot mode
+/*
+ * Alloc the command and ack buffers for boot mode
*
* Get the buffers needed to deal with boot mode messages. These
* buffers need to be allocated before the sdio recieve irq is setup.
*/
+static
int i2400m_bm_buf_alloc(struct i2400m *i2400m)
{
int result;
error_bm_cmd_kzalloc:
return result;
}
-EXPORT_SYMBOL_GPL(i2400m_bm_buf_alloc);
-/**
- * i2400m_bm_buf_free - Free boot mode command and ack buffers.
- *
- * Free the command and ack buffers
- *
+
+/*
+ * Free boot mode command and ack buffers.
*/
+static
void i2400m_bm_buf_free(struct i2400m *i2400m)
{
kfree(i2400m->bm_ack_buf);
kfree(i2400m->bm_cmd_buf);
- return;
}
-EXPORT_SYMBOL_GPL(i2400m_bm_buf_free
-);
+
+
/**
* i2400m_setup - bus-generic setup function for the i2400m device
*
snprintf(wimax_dev->name, sizeof(wimax_dev->name),
"i2400m-%s:%s", dev->bus->name, dev_name(dev));
+ result = i2400m_bm_buf_alloc(i2400m);
+ if (result < 0) {
+ dev_err(dev, "cannot allocate bootmode scratch buffers\n");
+ goto error_bm_buf_alloc;
+ }
+
if (i2400m->bus_setup) {
result = i2400m->bus_setup(i2400m);
if (result < 0) {
if (i2400m->bus_release)
i2400m->bus_release(i2400m);
error_bus_setup:
+ i2400m_bm_buf_free(i2400m);
+error_bm_buf_alloc:
d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result);
return result;
}
}
extern int i2400m_dev_reset_handle(struct i2400m *, const char *);
-extern int i2400m_bm_buf_alloc(struct i2400m *i2400m);
-extern void i2400m_bm_buf_free(struct i2400m *i2400m);
/*
* _setup()/_release() are called by the probe/disconnect functions of
i2400m->bus_bm_mac_addr_impaired = 1;
i2400m->bus_bm_pokes_table = &i2400ms_pokes[0];
- /*
- * Before we are enabling the device interrupt register, make
- * sure the buffer used during bootmode operation is setup so
- * when the first D2H data interrupt comes, the memory is
- * available for copying the D2H data.
- */
- result = i2400m_bm_buf_alloc(i2400m);
- if (result < 0) {
- dev_err(dev, "cannot allocate SDIO bootmode buffer\n");
- goto error_bootmode_buf_setup;
- }
-
result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT);
if (result < 0) {
dev_err(dev, "cannot setup device: %d\n", result);
error_debugfs_add:
i2400m_release(i2400m);
error_setup:
- i2400m_bm_buf_free(i2400m);
-error_bootmode_buf_setup:
sdio_set_drvdata(func, NULL);
free_netdev(net_dev);
error_alloc_netdev:
usb_dev->autosuspend_disabled = 0;
#endif
- result = i2400m_bm_buf_alloc(i2400m);
- if (result < 0) {
- dev_err(dev, "cannot allocate USB bootmode buffer\n");
- goto error_bm_buf_alloc;
- }
-
result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT);
if (result < 0) {
dev_err(dev, "cannot setup device: %d\n", result);
error_debugfs_add:
i2400m_release(i2400m);
error_setup:
- i2400m_bm_buf_free(i2400m);
-error_bm_buf_alloc:
usb_set_intfdata(iface, NULL);
usb_put_dev(i2400mu->usb_dev);
free_netdev(net_dev);