Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134991
b: refs/heads/master
c: 6a0f7ab
h: refs/heads/master
i:
  134989: 8cfc802
  134987: 5683477
  134983: c107a55
  134975: 6f11aec
v: v3
  • Loading branch information
Inaky Perez-Gonzalez authored and David S. Miller committed Mar 2, 2009
1 parent a883b6b commit f8a6951
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efa05d0f0a723642fd0d88bb97b0f31800a3f716
refs/heads/master: 6a0f7ab8305cb60a43a6c4a548f57adab784e6cd
12 changes: 7 additions & 5 deletions trunk/drivers/net/wimax/i2400m/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
*
* i2400m_dev_initalize() Called by i2400m_dev_start()
* i2400m_set_init_config()
* i2400m_firmware_check()
* i2400m_cmd_get_state()
* i2400m_dev_shutdown() Called by i2400m_dev_stop()
* i2400m->bus_reset()
Expand Down Expand Up @@ -959,6 +958,10 @@ enum {
* Long function, but quite simple; first chunk launches the command
* and double checks the reply for the right TLV. Then we process the
* TLV (where the meat is).
*
* Once we process the TLV that gives us the firmware's interface
* version, we encode it and save it in i2400m->fw_version for future
* reference.
*/
int i2400m_firmware_check(struct i2400m *i2400m)
{
Expand Down Expand Up @@ -1018,9 +1021,11 @@ int i2400m_firmware_check(struct i2400m *i2400m)
if (minor < I2400M_HDIv_MINOR_2 && minor > I2400M_HDIv_MINOR)
dev_warn(dev, "untested minor fw version %u.%u.%u\n",
major, minor, branch);
error_bad_major:
/* Yes, we ignore the branch -- we don't have to track it */
i2400m->fw_version = major << 16 | minor;
dev_info(dev, "firmware interface version %u.%u.%u\n",
major, minor, branch);
error_bad_major:
error_no_tlv:
error_cmd_failed:
kfree_skb(ack_skb);
Expand Down Expand Up @@ -1249,9 +1254,6 @@ int i2400m_dev_initialize(struct i2400m *i2400m)
args[argc++] = &idle_params.hdr;
}
result = i2400m_set_init_config(i2400m, args, argc);
if (result < 0)
goto error;
result = i2400m_firmware_check(i2400m); /* fw versions ok? */
if (result < 0)
goto error;
/*
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/wimax/i2400m/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* i2400m_dev_bootstrap()
* i2400m_tx_setup()
* i2400m->bus_dev_start()
* i2400m_firmware_check()
* i2400m_check_mac_addr()
* wimax_dev_add()
*
Expand Down Expand Up @@ -404,6 +405,9 @@ int __i2400m_dev_start(struct i2400m *i2400m, enum i2400m_bri flags)
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)
Expand All @@ -421,6 +425,7 @@ int __i2400m_dev_start(struct i2400m *i2400m, enum i2400m_bri flags)

error_dev_initialize:
error_check_mac_addr:
error_fw_check:
destroy_workqueue(i2400m->work_queue);
error_create_workqueue:
i2400m->bus_dev_stop(i2400m);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wimax/i2400m/i2400m.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ struct i2400m_reset_ctx;
* module unloads, as we don't keep each dentry.
*
* @fw_name: name of the firmware image that is currently being used.
*
* @fw_version: version of the firmware interface, Major.minor,
* encoded in the high word and low word (major << 16 | minor).
*/
struct i2400m {
struct wimax_dev wimax_dev; /* FIRST! See doc */
Expand Down Expand Up @@ -424,6 +427,7 @@ struct i2400m {

struct dentry *debugfs_dentry;
const char *fw_name; /* name of the current firmware image */
unsigned long fw_version; /* version of the firmware interface */
};


Expand Down

0 comments on commit f8a6951

Please sign in to comment.