Commit e72615f6 authored by John W. Linville's avatar John W. Linville

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
parents a0dfb263 c6b6eedc
...@@ -1482,7 +1482,7 @@ ath5k_eeprom_read_target_rate_pwr_info(struct ath5k_hw *ah, unsigned int mode) ...@@ -1482,7 +1482,7 @@ ath5k_eeprom_read_target_rate_pwr_info(struct ath5k_hw *ah, unsigned int mode)
case AR5K_EEPROM_MODE_11A: case AR5K_EEPROM_MODE_11A:
offset += AR5K_EEPROM_TARGET_PWR_OFF_11A(ee->ee_version); offset += AR5K_EEPROM_TARGET_PWR_OFF_11A(ee->ee_version);
rate_pcal_info = ee->ee_rate_tpwr_a; rate_pcal_info = ee->ee_rate_tpwr_a;
ee->ee_rate_target_pwr_num[mode] = AR5K_EEPROM_N_5GHZ_CHAN; ee->ee_rate_target_pwr_num[mode] = AR5K_EEPROM_N_5GHZ_RATE_CHAN;
break; break;
case AR5K_EEPROM_MODE_11B: case AR5K_EEPROM_MODE_11B:
offset += AR5K_EEPROM_TARGET_PWR_OFF_11B(ee->ee_version); offset += AR5K_EEPROM_TARGET_PWR_OFF_11B(ee->ee_version);
......
...@@ -182,6 +182,7 @@ ...@@ -182,6 +182,7 @@
#define AR5K_EEPROM_EEP_DELTA 10 #define AR5K_EEPROM_EEP_DELTA 10
#define AR5K_EEPROM_N_MODES 3 #define AR5K_EEPROM_N_MODES 3
#define AR5K_EEPROM_N_5GHZ_CHAN 10 #define AR5K_EEPROM_N_5GHZ_CHAN 10
#define AR5K_EEPROM_N_5GHZ_RATE_CHAN 8
#define AR5K_EEPROM_N_2GHZ_CHAN 3 #define AR5K_EEPROM_N_2GHZ_CHAN 3
#define AR5K_EEPROM_N_2GHZ_CHAN_2413 4 #define AR5K_EEPROM_N_2GHZ_CHAN_2413 4
#define AR5K_EEPROM_N_2GHZ_CHAN_MAX 4 #define AR5K_EEPROM_N_2GHZ_CHAN_MAX 4
......
...@@ -1233,6 +1233,9 @@ uint brcms_reset(struct brcms_info *wl) ...@@ -1233,6 +1233,9 @@ uint brcms_reset(struct brcms_info *wl)
/* dpc will not be rescheduled */ /* dpc will not be rescheduled */
wl->resched = false; wl->resched = false;
/* inform publicly that interface is down */
wl->pub->up = false;
return 0; return 0;
} }
......
...@@ -2042,7 +2042,8 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status) ...@@ -2042,7 +2042,8 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
return; return;
} }
len = ETH_ALEN; len = ETH_ALEN;
ipw2100_get_ordinal(priv, IPW_ORD_STAT_ASSN_AP_BSSID, &bssid, &len); ret = ipw2100_get_ordinal(priv, IPW_ORD_STAT_ASSN_AP_BSSID, bssid,
&len);
if (ret) { if (ret) {
IPW_DEBUG_INFO("failed querying ordinals at line %d\n", IPW_DEBUG_INFO("failed querying ordinals at line %d\n",
__LINE__); __LINE__);
......
...@@ -124,6 +124,9 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, ...@@ -124,6 +124,9 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file,
const struct fw_img *img; const struct fw_img *img;
size_t bufsz; size_t bufsz;
if (!iwl_is_ready_rf(priv))
return -EAGAIN;
/* default is to dump the entire data segment */ /* default is to dump the entire data segment */
if (!priv->dbgfs_sram_offset && !priv->dbgfs_sram_len) { if (!priv->dbgfs_sram_offset && !priv->dbgfs_sram_len) {
priv->dbgfs_sram_offset = 0x800000; priv->dbgfs_sram_offset = 0x800000;
......
...@@ -350,7 +350,7 @@ int iwl_queue_space(const struct iwl_queue *q); ...@@ -350,7 +350,7 @@ int iwl_queue_space(const struct iwl_queue *q);
/***************************************************** /*****************************************************
* Error handling * Error handling
******************************************************/ ******************************************************/
int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display); int iwl_dump_fh(struct iwl_trans *trans, char **buf);
void iwl_dump_csr(struct iwl_trans *trans); void iwl_dump_csr(struct iwl_trans *trans);
/***************************************************** /*****************************************************
......
...@@ -555,7 +555,7 @@ static void iwl_irq_handle_error(struct iwl_trans *trans) ...@@ -555,7 +555,7 @@ static void iwl_irq_handle_error(struct iwl_trans *trans)
} }
iwl_dump_csr(trans); iwl_dump_csr(trans);
iwl_dump_fh(trans, NULL, false); iwl_dump_fh(trans, NULL);
iwl_op_mode_nic_error(trans->op_mode); iwl_op_mode_nic_error(trans->op_mode);
} }
......
...@@ -1649,13 +1649,9 @@ static const char *get_fh_string(int cmd) ...@@ -1649,13 +1649,9 @@ static const char *get_fh_string(int cmd)
#undef IWL_CMD #undef IWL_CMD
} }
int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display) int iwl_dump_fh(struct iwl_trans *trans, char **buf)
{ {
int i; int i;
#ifdef CONFIG_IWLWIFI_DEBUG
int pos = 0;
size_t bufsz = 0;
#endif
static const u32 fh_tbl[] = { static const u32 fh_tbl[] = {
FH_RSCSR_CHNL0_STTS_WPTR_REG, FH_RSCSR_CHNL0_STTS_WPTR_REG,
FH_RSCSR_CHNL0_RBDCB_BASE_REG, FH_RSCSR_CHNL0_RBDCB_BASE_REG,
...@@ -1667,29 +1663,35 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display) ...@@ -1667,29 +1663,35 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display)
FH_TSSR_TX_STATUS_REG, FH_TSSR_TX_STATUS_REG,
FH_TSSR_TX_ERROR_REG FH_TSSR_TX_ERROR_REG
}; };
#ifdef CONFIG_IWLWIFI_DEBUG
if (display) { #ifdef CONFIG_IWLWIFI_DEBUGFS
bufsz = ARRAY_SIZE(fh_tbl) * 48 + 40; if (buf) {
int pos = 0;
size_t bufsz = ARRAY_SIZE(fh_tbl) * 48 + 40;
*buf = kmalloc(bufsz, GFP_KERNEL); *buf = kmalloc(bufsz, GFP_KERNEL);
if (!*buf) if (!*buf)
return -ENOMEM; return -ENOMEM;
pos += scnprintf(*buf + pos, bufsz - pos, pos += scnprintf(*buf + pos, bufsz - pos,
"FH register values:\n"); "FH register values:\n");
for (i = 0; i < ARRAY_SIZE(fh_tbl); i++) {
for (i = 0; i < ARRAY_SIZE(fh_tbl); i++)
pos += scnprintf(*buf + pos, bufsz - pos, pos += scnprintf(*buf + pos, bufsz - pos,
" %34s: 0X%08x\n", " %34s: 0X%08x\n",
get_fh_string(fh_tbl[i]), get_fh_string(fh_tbl[i]),
iwl_read_direct32(trans, fh_tbl[i])); iwl_read_direct32(trans, fh_tbl[i]));
}
return pos; return pos;
} }
#endif #endif
IWL_ERR(trans, "FH register values:\n"); IWL_ERR(trans, "FH register values:\n");
for (i = 0; i < ARRAY_SIZE(fh_tbl); i++) { for (i = 0; i < ARRAY_SIZE(fh_tbl); i++)
IWL_ERR(trans, " %34s: 0X%08x\n", IWL_ERR(trans, " %34s: 0X%08x\n",
get_fh_string(fh_tbl[i]), get_fh_string(fh_tbl[i]),
iwl_read_direct32(trans, fh_tbl[i])); iwl_read_direct32(trans, fh_tbl[i]));
}
return 0; return 0;
} }
...@@ -1982,11 +1984,11 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file, ...@@ -1982,11 +1984,11 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_trans *trans = file->private_data; struct iwl_trans *trans = file->private_data;
char *buf; char *buf = NULL;
int pos = 0; int pos = 0;
ssize_t ret = -EFAULT; ssize_t ret = -EFAULT;
ret = pos = iwl_dump_fh(trans, &buf, true); ret = pos = iwl_dump_fh(trans, &buf);
if (buf) { if (buf) {
ret = simple_read_from_buffer(user_buf, ret = simple_read_from_buffer(user_buf,
count, ppos, buf, pos); count, ppos, buf, pos);
......
...@@ -1811,37 +1811,31 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, ...@@ -1811,37 +1811,31 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
sdata, NULL, NULL); sdata, NULL, NULL);
} else { } else {
int is_mesh_mcast = 1; /* DS -> MBSS (802.11-2012 13.11.3.3).
const u8 *mesh_da; * For unicast with unknown forwarding information,
* destination might be in the MBSS or if that fails
if (is_multicast_ether_addr(skb->data)) * forwarded to another mesh gate. In either case
/* DA TA mSA AE:SA */ * resolution will be handled in ieee80211_xmit(), so
mesh_da = skb->data; * leave the original DA. This also works for mcast */
else { const u8 *mesh_da = skb->data;
static const u8 bcast[ETH_ALEN] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; if (mppath)
if (mppath) {
/* RA TA mDA mSA AE:DA SA */
mesh_da = mppath->mpp; mesh_da = mppath->mpp;
is_mesh_mcast = 0; else if (mpath)
} else if (mpath) {
mesh_da = mpath->dst; mesh_da = mpath->dst;
is_mesh_mcast = 0; rcu_read_unlock();
} else {
/* DA TA mSA AE:SA */
mesh_da = bcast;
}
}
hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc,
mesh_da, sdata->vif.addr); mesh_da, sdata->vif.addr);
rcu_read_unlock(); if (is_multicast_ether_addr(mesh_da))
if (is_mesh_mcast) /* DA TA mSA AE:SA */
meshhdrlen = meshhdrlen =
ieee80211_new_mesh_header(&mesh_hdr, ieee80211_new_mesh_header(&mesh_hdr,
sdata, sdata,
skb->data + ETH_ALEN, skb->data + ETH_ALEN,
NULL); NULL);
else else
/* RA TA mDA mSA AE:DA SA */
meshhdrlen = meshhdrlen =
ieee80211_new_mesh_header(&mesh_hdr, ieee80211_new_mesh_header(&mesh_hdr,
sdata, sdata,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment