summaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/driver.c
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-02-28 23:42:49 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-02 03:10:24 -0800
commit6a0f7ab8305cb60a43a6c4a548f57adab784e6cd (patch)
tree549aaceafa4e95e35050a6e98e8953afbbc1b1c8 /drivers/net/wimax/i2400m/driver.c
parentefa05d0f0a723642fd0d88bb97b0f31800a3f716 (diff)
wimax/i2400m: firmware_check() encodes the firmware version in i2400m->fw_version
Upcoming modifications will need to test for the running firmware version before activating a feature or not. This is helpful to implement backward compatibility with older firmware versions. Modify i2400m_firmware_check() to encode in i2400m->fw_version the major and minor version numbers of the firmware interface. As well, move the call to be done as the very first operation once we have communication with the device during probe() [in __i2400m_dev_start()]. This is needed so any operation that is executed afterwards can determine which fw version it is talking to. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wimax/i2400m/driver.c')
-rw-r--r--drivers/net/wimax/i2400m/driver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c
index e80a0b65a75..69a816e7c5d 100644
--- a/drivers/net/wimax/i2400m/driver.c
+++ b/drivers/net/wimax/i2400m/driver.c
@@ -48,6 +48,7 @@
* i2400m_dev_bootstrap()
* i2400m_tx_setup()
* i2400m->bus_dev_start()
+ * i2400m_firmware_check()
* i2400m_check_mac_addr()
* wimax_dev_add()
*
@@ -404,6 +405,9 @@ retry:
dev_err(dev, "cannot create workqueue\n");
goto error_create_workqueue;
}
+ result = i2400m_firmware_check(i2400m); /* fw versions ok? */
+ if (result < 0)
+ goto error_fw_check;
/* At this point is ok to send commands to the device */
result = i2400m_check_mac_addr(i2400m);
if (result < 0)
@@ -421,6 +425,7 @@ retry:
error_dev_initialize:
error_check_mac_addr:
+error_fw_check:
destroy_workqueue(i2400m->work_queue);
error_create_workqueue:
i2400m->bus_dev_stop(i2400m);