Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171245
b: refs/heads/master
c: 02eb41e
h: refs/heads/master
i:
  171243: 26d301d
v: v3
  • Loading branch information
Inaky Perez-Gonzalez committed Nov 3, 2009
1 parent 8a163e0 commit 33c2e3e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 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: 296bd4bdd0a43c5e56ee310bcb9b4722e5d52db8
refs/heads/master: 02eb41ef2a8631022fd90e096c57562dec9e7a9a
3 changes: 3 additions & 0 deletions trunk/drivers/net/wimax/i2400m/i2400m-sdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ struct i2400ms {
wait_queue_head_t bm_wfa_wq;
int bm_wait_result;
size_t bm_ack_size;

/* Device is any of the iwmc3200 SKUs */
unsigned iwmc3200:1;
};


Expand Down
16 changes: 13 additions & 3 deletions trunk/drivers/net/wimax/i2400m/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ static const struct i2400m_poke_table i2400ms_pokes[] = {
* error (-ENODEV when it was unable to enable the function).
*/
static
int i2400ms_enable_function(struct sdio_func *func, unsigned maxtries)
int i2400ms_enable_function(struct i2400ms *i2400ms, unsigned maxtries)
{
struct sdio_func *func = i2400ms->func;
u64 timeout;
int err;
struct device *dev = &func->dev;
Expand All @@ -126,7 +127,7 @@ int i2400ms_enable_function(struct sdio_func *func, unsigned maxtries)
* platforms (system hang). We explicitly overwrite
* func->enable_timeout here to work around the issue.
*/
if (func->device == SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX)
if (i2400ms->iwmc3200)
func->enable_timeout = IWMC3200_IOR_TIMEOUT;
err = sdio_enable_func(func);
if (0 == err) {
Expand Down Expand Up @@ -176,7 +177,7 @@ int i2400ms_bus_setup(struct i2400m *i2400m)
goto error_set_blk_size;
}

result = i2400ms_enable_function(func, 1);
result = i2400ms_enable_function(i2400ms, 1);
if (result < 0) {
dev_err(dev, "Cannot enable SDIO function: %d\n", result);
goto error_func_enable;
Expand Down Expand Up @@ -487,6 +488,15 @@ int i2400ms_probe(struct sdio_func *func,
i2400m->bus_bm_mac_addr_impaired = 1;
i2400m->bus_bm_pokes_table = &i2400ms_pokes[0];

switch (func->device) {
case SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX:
case SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5:
i2400ms->iwmc3200 = 1;
break;
default:
i2400ms->iwmc3200 = 0;
}

result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT);
if (result < 0) {
dev_err(dev, "cannot setup device: %d\n", result);
Expand Down

0 comments on commit 33c2e3e

Please sign in to comment.