diff options
author | David S. Miller <davem@davemloft.net> | 2012-08-24 15:15:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-24 15:15:10 -0400 |
commit | d05cebb9153e500648befaa6f135e6976bbfbd84 (patch) | |
tree | 775debd33b800947197e4ae7dae38d5e4111b1c7 /drivers | |
parent | 7c4a56fec379ac0d7754e0d4da6a7361f1a4fe64 (diff) | |
parent | e72615f6abde92e961feee13e1078a1352cde4f7 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says:
====================
This batch of fixes is intended for 3.6...
Johannes Berg gives us a pair of iwlwifi fixes. One corrects some
improperly defined ifdefs that lead to crashes and BUG_ONs. The other
prevents attempts to read SRAM for devices that aren't actually started.
Julia Lawall provides an ipw2100 fix to properly set the return code
from a function call before testing it! :-)
Thomas Huehn corrects the improper use of a constant related to a power
setting in ath5k.
Thomas Pedersen offers a mac80211 fix to properly handle destination
addresses of unicast frames passing though a mesh gate.
Vladimir Zapolskiy provides a brcmsmac fix to properly mark the
interface state when the device goes down.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/eeprom.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/eeprom.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/debugfs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/internal.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 30 |
8 files changed, 28 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 4026c906cc7b..b7e0258887e7 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c | |||
@@ -1482,7 +1482,7 @@ ath5k_eeprom_read_target_rate_pwr_info(struct ath5k_hw *ah, unsigned int mode) | |||
1482 | case AR5K_EEPROM_MODE_11A: | 1482 | case AR5K_EEPROM_MODE_11A: |
1483 | offset += AR5K_EEPROM_TARGET_PWR_OFF_11A(ee->ee_version); | 1483 | offset += AR5K_EEPROM_TARGET_PWR_OFF_11A(ee->ee_version); |
1484 | rate_pcal_info = ee->ee_rate_tpwr_a; | 1484 | rate_pcal_info = ee->ee_rate_tpwr_a; |
1485 | ee->ee_rate_target_pwr_num[mode] = AR5K_EEPROM_N_5GHZ_CHAN; | 1485 | ee->ee_rate_target_pwr_num[mode] = AR5K_EEPROM_N_5GHZ_RATE_CHAN; |
1486 | break; | 1486 | break; |
1487 | case AR5K_EEPROM_MODE_11B: | 1487 | case AR5K_EEPROM_MODE_11B: |
1488 | offset += AR5K_EEPROM_TARGET_PWR_OFF_11B(ee->ee_version); | 1488 | offset += AR5K_EEPROM_TARGET_PWR_OFF_11B(ee->ee_version); |
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h index dc2bcfeadeb4..94a9bbea6874 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.h +++ b/drivers/net/wireless/ath/ath5k/eeprom.h | |||
@@ -182,6 +182,7 @@ | |||
182 | #define AR5K_EEPROM_EEP_DELTA 10 | 182 | #define AR5K_EEPROM_EEP_DELTA 10 |
183 | #define AR5K_EEPROM_N_MODES 3 | 183 | #define AR5K_EEPROM_N_MODES 3 |
184 | #define AR5K_EEPROM_N_5GHZ_CHAN 10 | 184 | #define AR5K_EEPROM_N_5GHZ_CHAN 10 |
185 | #define AR5K_EEPROM_N_5GHZ_RATE_CHAN 8 | ||
185 | #define AR5K_EEPROM_N_2GHZ_CHAN 3 | 186 | #define AR5K_EEPROM_N_2GHZ_CHAN 3 |
186 | #define AR5K_EEPROM_N_2GHZ_CHAN_2413 4 | 187 | #define AR5K_EEPROM_N_2GHZ_CHAN_2413 4 |
187 | #define AR5K_EEPROM_N_2GHZ_CHAN_MAX 4 | 188 | #define AR5K_EEPROM_N_2GHZ_CHAN_MAX 4 |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 192ad5c1fcc8..a5edebeb0b4f 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -1233,6 +1233,9 @@ uint brcms_reset(struct brcms_info *wl) | |||
1233 | /* dpc will not be rescheduled */ | 1233 | /* dpc will not be rescheduled */ |
1234 | wl->resched = false; | 1234 | wl->resched = false; |
1235 | 1235 | ||
1236 | /* inform publicly that interface is down */ | ||
1237 | wl->pub->up = false; | ||
1238 | |||
1236 | return 0; | 1239 | return 0; |
1237 | } | 1240 | } |
1238 | 1241 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 95aa8e1683ec..83324b321652 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -2042,7 +2042,8 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status) | |||
2042 | return; | 2042 | return; |
2043 | } | 2043 | } |
2044 | len = ETH_ALEN; | 2044 | len = ETH_ALEN; |
2045 | ipw2100_get_ordinal(priv, IPW_ORD_STAT_ASSN_AP_BSSID, &bssid, &len); | 2045 | ret = ipw2100_get_ordinal(priv, IPW_ORD_STAT_ASSN_AP_BSSID, bssid, |
2046 | &len); | ||
2046 | if (ret) { | 2047 | if (ret) { |
2047 | IPW_DEBUG_INFO("failed querying ordinals at line %d\n", | 2048 | IPW_DEBUG_INFO("failed querying ordinals at line %d\n", |
2048 | __LINE__); | 2049 | __LINE__); |
diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c index 46782f1102ac..a47b306b522c 100644 --- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c | |||
@@ -124,6 +124,9 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, | |||
124 | const struct fw_img *img; | 124 | const struct fw_img *img; |
125 | size_t bufsz; | 125 | size_t bufsz; |
126 | 126 | ||
127 | if (!iwl_is_ready_rf(priv)) | ||
128 | return -EAGAIN; | ||
129 | |||
127 | /* default is to dump the entire data segment */ | 130 | /* default is to dump the entire data segment */ |
128 | if (!priv->dbgfs_sram_offset && !priv->dbgfs_sram_len) { | 131 | if (!priv->dbgfs_sram_offset && !priv->dbgfs_sram_len) { |
129 | priv->dbgfs_sram_offset = 0x800000; | 132 | priv->dbgfs_sram_offset = 0x800000; |
diff --git a/drivers/net/wireless/iwlwifi/pcie/internal.h b/drivers/net/wireless/iwlwifi/pcie/internal.h index d9694c58208c..4ffc18dc3a57 100644 --- a/drivers/net/wireless/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/iwlwifi/pcie/internal.h | |||
@@ -350,7 +350,7 @@ int iwl_queue_space(const struct iwl_queue *q); | |||
350 | /***************************************************** | 350 | /***************************************************** |
351 | * Error handling | 351 | * Error handling |
352 | ******************************************************/ | 352 | ******************************************************/ |
353 | int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display); | 353 | int iwl_dump_fh(struct iwl_trans *trans, char **buf); |
354 | void iwl_dump_csr(struct iwl_trans *trans); | 354 | void iwl_dump_csr(struct iwl_trans *trans); |
355 | 355 | ||
356 | /***************************************************** | 356 | /***************************************************** |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 39a6ca1f009c..d1a61ba6247a 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -555,7 +555,7 @@ static void iwl_irq_handle_error(struct iwl_trans *trans) | |||
555 | } | 555 | } |
556 | 556 | ||
557 | iwl_dump_csr(trans); | 557 | iwl_dump_csr(trans); |
558 | iwl_dump_fh(trans, NULL, false); | 558 | iwl_dump_fh(trans, NULL); |
559 | 559 | ||
560 | iwl_op_mode_nic_error(trans->op_mode); | 560 | iwl_op_mode_nic_error(trans->op_mode); |
561 | } | 561 | } |
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 939c2f78df58..1e86ea2266d4 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -1649,13 +1649,9 @@ static const char *get_fh_string(int cmd) | |||
1649 | #undef IWL_CMD | 1649 | #undef IWL_CMD |
1650 | } | 1650 | } |
1651 | 1651 | ||
1652 | int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display) | 1652 | int iwl_dump_fh(struct iwl_trans *trans, char **buf) |
1653 | { | 1653 | { |
1654 | int i; | 1654 | int i; |
1655 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1656 | int pos = 0; | ||
1657 | size_t bufsz = 0; | ||
1658 | #endif | ||
1659 | static const u32 fh_tbl[] = { | 1655 | static const u32 fh_tbl[] = { |
1660 | FH_RSCSR_CHNL0_STTS_WPTR_REG, | 1656 | FH_RSCSR_CHNL0_STTS_WPTR_REG, |
1661 | FH_RSCSR_CHNL0_RBDCB_BASE_REG, | 1657 | FH_RSCSR_CHNL0_RBDCB_BASE_REG, |
@@ -1667,29 +1663,35 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display) | |||
1667 | FH_TSSR_TX_STATUS_REG, | 1663 | FH_TSSR_TX_STATUS_REG, |
1668 | FH_TSSR_TX_ERROR_REG | 1664 | FH_TSSR_TX_ERROR_REG |
1669 | }; | 1665 | }; |
1670 | #ifdef CONFIG_IWLWIFI_DEBUG | 1666 | |
1671 | if (display) { | 1667 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1672 | bufsz = ARRAY_SIZE(fh_tbl) * 48 + 40; | 1668 | if (buf) { |
1669 | int pos = 0; | ||
1670 | size_t bufsz = ARRAY_SIZE(fh_tbl) * 48 + 40; | ||
1671 | |||
1673 | *buf = kmalloc(bufsz, GFP_KERNEL); | 1672 | *buf = kmalloc(bufsz, GFP_KERNEL); |
1674 | if (!*buf) | 1673 | if (!*buf) |
1675 | return -ENOMEM; | 1674 | return -ENOMEM; |
1675 | |||
1676 | pos += scnprintf(*buf + pos, bufsz - pos, | 1676 | pos += scnprintf(*buf + pos, bufsz - pos, |
1677 | "FH register values:\n"); | 1677 | "FH register values:\n"); |
1678 | for (i = 0; i < ARRAY_SIZE(fh_tbl); i++) { | 1678 | |
1679 | for (i = 0; i < ARRAY_SIZE(fh_tbl); i++) | ||
1679 | pos += scnprintf(*buf + pos, bufsz - pos, | 1680 | pos += scnprintf(*buf + pos, bufsz - pos, |
1680 | " %34s: 0X%08x\n", | 1681 | " %34s: 0X%08x\n", |
1681 | get_fh_string(fh_tbl[i]), | 1682 | get_fh_string(fh_tbl[i]), |
1682 | iwl_read_direct32(trans, fh_tbl[i])); | 1683 | iwl_read_direct32(trans, fh_tbl[i])); |
1683 | } | 1684 | |
1684 | return pos; | 1685 | return pos; |
1685 | } | 1686 | } |
1686 | #endif | 1687 | #endif |
1688 | |||
1687 | IWL_ERR(trans, "FH register values:\n"); | 1689 | IWL_ERR(trans, "FH register values:\n"); |
1688 | for (i = 0; i < ARRAY_SIZE(fh_tbl); i++) { | 1690 | for (i = 0; i < ARRAY_SIZE(fh_tbl); i++) |
1689 | IWL_ERR(trans, " %34s: 0X%08x\n", | 1691 | IWL_ERR(trans, " %34s: 0X%08x\n", |
1690 | get_fh_string(fh_tbl[i]), | 1692 | get_fh_string(fh_tbl[i]), |
1691 | iwl_read_direct32(trans, fh_tbl[i])); | 1693 | iwl_read_direct32(trans, fh_tbl[i])); |
1692 | } | 1694 | |
1693 | return 0; | 1695 | return 0; |
1694 | } | 1696 | } |
1695 | 1697 | ||
@@ -1982,11 +1984,11 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file, | |||
1982 | size_t count, loff_t *ppos) | 1984 | size_t count, loff_t *ppos) |
1983 | { | 1985 | { |
1984 | struct iwl_trans *trans = file->private_data; | 1986 | struct iwl_trans *trans = file->private_data; |
1985 | char *buf; | 1987 | char *buf = NULL; |
1986 | int pos = 0; | 1988 | int pos = 0; |
1987 | ssize_t ret = -EFAULT; | 1989 | ssize_t ret = -EFAULT; |
1988 | 1990 | ||
1989 | ret = pos = iwl_dump_fh(trans, &buf, true); | 1991 | ret = pos = iwl_dump_fh(trans, &buf); |
1990 | if (buf) { | 1992 | if (buf) { |
1991 | ret = simple_read_from_buffer(user_buf, | 1993 | ret = simple_read_from_buffer(user_buf, |
1992 | count, ppos, buf, pos); | 1994 | count, ppos, buf, pos); |