diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-08 16:44:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-08 16:44:44 -0500 |
commit | e61444d9209821469ed0d5a9128dcf2e494533ea (patch) | |
tree | 17b406ce83e925da011d2b463ddf278b821c365d /drivers/net/wireless/rtl818x/rtl8187_dev.c | |
parent | a252e749f1ae17e43ccc5824f7b1b5854417c98b (diff) | |
parent | 6a213afd058436dbbd01098d7422c6a0073c39b5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8187_dev.c')
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_dev.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 76973b8c7099..bc5726dd5fe4 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -1322,6 +1322,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, | |||
1322 | struct ieee80211_channel *channel; | 1322 | struct ieee80211_channel *channel; |
1323 | const char *chip_name; | 1323 | const char *chip_name; |
1324 | u16 txpwr, reg; | 1324 | u16 txpwr, reg; |
1325 | u16 product_id = le16_to_cpu(udev->descriptor.idProduct); | ||
1325 | int err, i; | 1326 | int err, i; |
1326 | 1327 | ||
1327 | dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); | 1328 | dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); |
@@ -1481,6 +1482,13 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, | |||
1481 | (*channel++).hw_value = txpwr & 0xFF; | 1482 | (*channel++).hw_value = txpwr & 0xFF; |
1482 | (*channel++).hw_value = txpwr >> 8; | 1483 | (*channel++).hw_value = txpwr >> 8; |
1483 | } | 1484 | } |
1485 | /* Handle the differing rfkill GPIO bit in different models */ | ||
1486 | priv->rfkill_mask = RFKILL_MASK_8187_89_97; | ||
1487 | if (product_id == 0x8197 || product_id == 0x8198) { | ||
1488 | eeprom_93cx6_read(&eeprom, RTL8187_EEPROM_SELECT_GPIO, ®); | ||
1489 | if (reg & 0xFF00) | ||
1490 | priv->rfkill_mask = RFKILL_MASK_8198; | ||
1491 | } | ||
1484 | 1492 | ||
1485 | /* | 1493 | /* |
1486 | * XXX: Once this driver supports anything that requires | 1494 | * XXX: Once this driver supports anything that requires |
@@ -1509,9 +1517,9 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, | |||
1509 | mutex_init(&priv->conf_mutex); | 1517 | mutex_init(&priv->conf_mutex); |
1510 | skb_queue_head_init(&priv->b_tx_status.queue); | 1518 | skb_queue_head_init(&priv->b_tx_status.queue); |
1511 | 1519 | ||
1512 | printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s\n", | 1520 | printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", |
1513 | wiphy_name(dev->wiphy), dev->wiphy->perm_addr, | 1521 | wiphy_name(dev->wiphy), dev->wiphy->perm_addr, |
1514 | chip_name, priv->asic_rev, priv->rf->name); | 1522 | chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); |
1515 | 1523 | ||
1516 | #ifdef CONFIG_RTL8187_LEDS | 1524 | #ifdef CONFIG_RTL8187_LEDS |
1517 | eeprom_93cx6_read(&eeprom, 0x3F, ®); | 1525 | eeprom_93cx6_read(&eeprom, 0x3F, ®); |