Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341556
b: refs/heads/master
c: 0672938
h: refs/heads/master
v: v3
  • Loading branch information
Stanislav Yakovlev authored and John W. Linville committed Nov 21, 2012
1 parent bb3ba6f commit 17b0e56
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 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: 2884561a6472d6f9c960ccf2250a72ca058167a1
refs/heads/master: 067293876ef9be3f29492d4b80c267bbd6369b92
37 changes: 23 additions & 14 deletions trunk/drivers/net/wireless/ipw2x00/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -11269,10 +11269,31 @@ static const struct libipw_geo ipw_geos[] = {
}
};

static void ipw_set_geo(struct ipw_priv *priv)
{
int j;

for (j = 0; j < ARRAY_SIZE(ipw_geos); j++) {
if (!memcmp(&priv->eeprom[EEPROM_COUNTRY_CODE],
ipw_geos[j].name, 3))
break;
}

if (j == ARRAY_SIZE(ipw_geos)) {
IPW_WARNING("SKU [%c%c%c] not recognized.\n",
priv->eeprom[EEPROM_COUNTRY_CODE + 0],
priv->eeprom[EEPROM_COUNTRY_CODE + 1],
priv->eeprom[EEPROM_COUNTRY_CODE + 2]);
j = 0;
}

libipw_set_geo(priv->ieee, &ipw_geos[j]);
}

#define MAX_HW_RESTARTS 5
static int ipw_up(struct ipw_priv *priv)
{
int rc, i, j;
int rc, i;

/* Age scan list entries found before suspend */
if (priv->suspend_time) {
Expand Down Expand Up @@ -11310,19 +11331,7 @@ static int ipw_up(struct ipw_priv *priv)
memcpy(priv->net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
memcpy(priv->net_dev->perm_addr, priv->mac_addr, ETH_ALEN);

for (j = 0; j < ARRAY_SIZE(ipw_geos); j++) {
if (!memcmp(&priv->eeprom[EEPROM_COUNTRY_CODE],
ipw_geos[j].name, 3))
break;
}
if (j == ARRAY_SIZE(ipw_geos)) {
IPW_WARNING("SKU [%c%c%c] not recognized.\n",
priv->eeprom[EEPROM_COUNTRY_CODE + 0],
priv->eeprom[EEPROM_COUNTRY_CODE + 1],
priv->eeprom[EEPROM_COUNTRY_CODE + 2]);
j = 0;
}
libipw_set_geo(priv->ieee, &ipw_geos[j]);
ipw_set_geo(priv);

if (priv->status & STATUS_RF_KILL_SW) {
IPW_WARNING("Radio disabled by module parameter.\n");
Expand Down

0 comments on commit 17b0e56

Please sign in to comment.