Commit b4017c53 authored by David S. Miller's avatar David S. Miller

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
	drivers/net/ethernet/broadcom/tg3.c

Conflicts in the statistics regression bug fix from 'net',
but happily Matt Carlson originally posted the fix against
'net-next' so I used that to resolve this.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 97767a87 413708bb
...@@ -8001,10 +8001,8 @@ static int tg3_chip_reset(struct tg3 *tp) ...@@ -8001,10 +8001,8 @@ static int tg3_chip_reset(struct tg3 *tp)
return 0; return 0;
} }
static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *, static void tg3_get_nstats(struct tg3 *, struct rtnl_link_stats64 *);
struct rtnl_link_stats64 *); static void tg3_get_estats(struct tg3 *, struct tg3_ethtool_stats *);
static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *,
struct tg3_ethtool_stats *);
/* tp->lock is held. */ /* tp->lock is held. */
static int tg3_halt(struct tg3 *tp, int kind, int silent) static int tg3_halt(struct tg3 *tp, int kind, int silent)
...@@ -8025,7 +8023,7 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent) ...@@ -8025,7 +8023,7 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent)
if (tp->hw_stats) { if (tp->hw_stats) {
/* Save the stats across chip resets... */ /* Save the stats across chip resets... */
tg3_get_stats64(tp->dev, &tp->net_stats_prev), tg3_get_nstats(tp, &tp->net_stats_prev);
tg3_get_estats(tp, &tp->estats_prev); tg3_get_estats(tp, &tp->estats_prev);
/* And make sure the next sample is new data */ /* And make sure the next sample is new data */
...@@ -10125,7 +10123,7 @@ static inline u64 get_stat64(tg3_stat64_t *val) ...@@ -10125,7 +10123,7 @@ static inline u64 get_stat64(tg3_stat64_t *val)
return ((u64)val->high << 32) | ((u64)val->low); return ((u64)val->high << 32) | ((u64)val->low);
} }
static u64 calc_crc_errors(struct tg3 *tp) static u64 tg3_calc_crc_errors(struct tg3 *tp)
{ {
struct tg3_hw_stats *hw_stats = tp->hw_stats; struct tg3_hw_stats *hw_stats = tp->hw_stats;
...@@ -10134,14 +10132,12 @@ static u64 calc_crc_errors(struct tg3 *tp) ...@@ -10134,14 +10132,12 @@ static u64 calc_crc_errors(struct tg3 *tp)
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
u32 val; u32 val;
spin_lock_bh(&tp->lock);
if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) { if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) {
tg3_writephy(tp, MII_TG3_TEST1, tg3_writephy(tp, MII_TG3_TEST1,
val | MII_TG3_TEST1_CRC_EN); val | MII_TG3_TEST1_CRC_EN);
tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val); tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val);
} else } else
val = 0; val = 0;
spin_unlock_bh(&tp->lock);
tp->phy_crc_errors += val; tp->phy_crc_errors += val;
...@@ -10155,8 +10151,7 @@ static u64 calc_crc_errors(struct tg3 *tp) ...@@ -10155,8 +10151,7 @@ static u64 calc_crc_errors(struct tg3 *tp)
estats->member = old_estats->member + \ estats->member = old_estats->member + \
get_stat64(&hw_stats->member) get_stat64(&hw_stats->member)
static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp, static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats)
struct tg3_ethtool_stats *estats)
{ {
struct tg3_ethtool_stats *old_estats = &tp->estats_prev; struct tg3_ethtool_stats *old_estats = &tp->estats_prev;
struct tg3_hw_stats *hw_stats = tp->hw_stats; struct tg3_hw_stats *hw_stats = tp->hw_stats;
...@@ -10238,20 +10233,13 @@ static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp, ...@@ -10238,20 +10233,13 @@ static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp,
ESTAT_ADD(nic_tx_threshold_hit); ESTAT_ADD(nic_tx_threshold_hit);
ESTAT_ADD(mbuf_lwm_thresh_hit); ESTAT_ADD(mbuf_lwm_thresh_hit);
return estats;
} }
static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
struct rtnl_link_stats64 *stats)
{ {
struct tg3 *tp = netdev_priv(dev);
struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev; struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
struct tg3_hw_stats *hw_stats = tp->hw_stats; struct tg3_hw_stats *hw_stats = tp->hw_stats;
if (!hw_stats)
return old_stats;
stats->rx_packets = old_stats->rx_packets + stats->rx_packets = old_stats->rx_packets +
get_stat64(&hw_stats->rx_ucast_packets) + get_stat64(&hw_stats->rx_ucast_packets) +
get_stat64(&hw_stats->rx_mcast_packets) + get_stat64(&hw_stats->rx_mcast_packets) +
...@@ -10294,15 +10282,13 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, ...@@ -10294,15 +10282,13 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
get_stat64(&hw_stats->tx_carrier_sense_errors); get_stat64(&hw_stats->tx_carrier_sense_errors);
stats->rx_crc_errors = old_stats->rx_crc_errors + stats->rx_crc_errors = old_stats->rx_crc_errors +
calc_crc_errors(tp); tg3_calc_crc_errors(tp);
stats->rx_missed_errors = old_stats->rx_missed_errors + stats->rx_missed_errors = old_stats->rx_missed_errors +
get_stat64(&hw_stats->rx_discards); get_stat64(&hw_stats->rx_discards);
stats->rx_dropped = tp->rx_dropped; stats->rx_dropped = tp->rx_dropped;
stats->tx_dropped = tp->tx_dropped; stats->tx_dropped = tp->tx_dropped;
return stats;
} }
static int tg3_get_regs_len(struct net_device *dev) static int tg3_get_regs_len(struct net_device *dev)
...@@ -12213,6 +12199,21 @@ static const struct ethtool_ops tg3_ethtool_ops = { ...@@ -12213,6 +12199,21 @@ static const struct ethtool_ops tg3_ethtool_ops = {
.set_rxfh_indir = tg3_set_rxfh_indir, .set_rxfh_indir = tg3_set_rxfh_indir,
}; };
static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
struct rtnl_link_stats64 *stats)
{
struct tg3 *tp = netdev_priv(dev);
if (!tp->hw_stats)
return &tp->net_stats_prev;
spin_lock_bh(&tp->lock);
tg3_get_nstats(tp, stats);
spin_unlock_bh(&tp->lock);
return stats;
}
static void tg3_set_rx_mode(struct net_device *dev) static void tg3_set_rx_mode(struct net_device *dev)
{ {
struct tg3 *tp = netdev_priv(dev); struct tg3 *tp = netdev_priv(dev);
......
...@@ -94,7 +94,7 @@ struct enic { ...@@ -94,7 +94,7 @@ struct enic {
u32 rx_coalesce_usecs; u32 rx_coalesce_usecs;
u32 tx_coalesce_usecs; u32 tx_coalesce_usecs;
#ifdef CONFIG_PCI_IOV #ifdef CONFIG_PCI_IOV
u32 num_vfs; u16 num_vfs;
#endif #endif
struct enic_port_profile *pp; struct enic_port_profile *pp;
......
...@@ -2390,7 +2390,7 @@ static int __devinit enic_probe(struct pci_dev *pdev, ...@@ -2390,7 +2390,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV); pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
if (pos) { if (pos) {
pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF, pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF,
(u16 *)&enic->num_vfs); &enic->num_vfs);
if (enic->num_vfs) { if (enic->num_vfs) {
err = pci_enable_sriov(pdev, enic->num_vfs); err = pci_enable_sriov(pdev, enic->num_vfs);
if (err) { if (err) {
......
...@@ -321,10 +321,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -321,10 +321,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n"); pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n");
hw->phy.autoneg_advertised = opt.def; hw->phy.autoneg_advertised = opt.def;
} else { } else {
hw->phy.autoneg_advertised = AutoNeg; int tmp = AutoNeg;
pch_gbe_validate_option(
(int *)(&hw->phy.autoneg_advertised), pch_gbe_validate_option(&tmp, &opt, adapter);
&opt, adapter); hw->phy.autoneg_advertised = tmp;
} }
} }
...@@ -495,9 +495,10 @@ void pch_gbe_check_options(struct pch_gbe_adapter *adapter) ...@@ -495,9 +495,10 @@ void pch_gbe_check_options(struct pch_gbe_adapter *adapter)
.arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list), .arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list),
.p = fc_list } } .p = fc_list } }
}; };
hw->mac.fc = FlowControl; int tmp = FlowControl;
pch_gbe_validate_option((int *)(&hw->mac.fc),
&opt, adapter); pch_gbe_validate_option(&tmp, &opt, adapter);
hw->mac.fc = tmp;
} }
pch_gbe_check_copper_options(adapter); pch_gbe_check_copper_options(adapter);
......
...@@ -489,8 +489,6 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah) ...@@ -489,8 +489,6 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah)
ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows); ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows);
ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows); ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows);
ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows); ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows);
ATH_ALLOC_BANK(ah->addac5416_21,
ah->iniAddac.ia_rows * ah->iniAddac.ia_columns);
ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows); ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows);
return 0; return 0;
...@@ -519,7 +517,6 @@ static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah) ...@@ -519,7 +517,6 @@ static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah)
ATH_FREE_BANK(ah->analogBank6Data); ATH_FREE_BANK(ah->analogBank6Data);
ATH_FREE_BANK(ah->analogBank6TPCData); ATH_FREE_BANK(ah->analogBank6TPCData);
ATH_FREE_BANK(ah->analogBank7Data); ATH_FREE_BANK(ah->analogBank7Data);
ATH_FREE_BANK(ah->addac5416_21);
ATH_FREE_BANK(ah->bank6Temp); ATH_FREE_BANK(ah->bank6Temp);
#undef ATH_FREE_BANK #undef ATH_FREE_BANK
...@@ -805,27 +802,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah, ...@@ -805,27 +802,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
if (ah->eep_ops->set_addac) if (ah->eep_ops->set_addac)
ah->eep_ops->set_addac(ah, chan); ah->eep_ops->set_addac(ah, chan);
if (AR_SREV_5416_22_OR_LATER(ah)) { REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites);
REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites);
} else {
struct ar5416IniArray temp;
u32 addacSize =
sizeof(u32) * ah->iniAddac.ia_rows *
ah->iniAddac.ia_columns;
/* For AR5416 2.0/2.1 */
memcpy(ah->addac5416_21,
ah->iniAddac.ia_array, addacSize);
/* override CLKDRV value at [row, column] = [31, 1] */
(ah->addac5416_21)[31 * ah->iniAddac.ia_columns + 1] = 0;
temp.ia_array = ah->addac5416_21;
temp.ia_columns = ah->iniAddac.ia_columns;
temp.ia_rows = ah->iniAddac.ia_rows;
REG_WRITE_ARRAY(&temp, 1, regWrites);
}
REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC); REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC);
ENABLE_REGWRITE_BUFFER(ah); ENABLE_REGWRITE_BUFFER(ah);
......
...@@ -180,6 +180,25 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah) ...@@ -180,6 +180,25 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac, INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac,
ARRAY_SIZE(ar5416Addac), 2); ARRAY_SIZE(ar5416Addac), 2);
} }
/* iniAddac needs to be modified for these chips */
if (AR_SREV_9160(ah) || !AR_SREV_5416_22_OR_LATER(ah)) {
struct ar5416IniArray *addac = &ah->iniAddac;
u32 size = sizeof(u32) * addac->ia_rows * addac->ia_columns;
u32 *data;
data = kmalloc(size, GFP_KERNEL);
if (!data)
return;
memcpy(data, addac->ia_array, size);
addac->ia_array = data;
if (!AR_SREV_5416_22_OR_LATER(ah)) {
/* override CLKDRV value */
INI_RA(addac, 31,1) = 0;
}
}
} }
/* Support for Japan ch.14 (2484) spread */ /* Support for Japan ch.14 (2484) spread */
......
...@@ -940,7 +940,6 @@ struct ath_hw { ...@@ -940,7 +940,6 @@ struct ath_hw {
u32 *analogBank6Data; u32 *analogBank6Data;
u32 *analogBank6TPCData; u32 *analogBank6TPCData;
u32 *analogBank7Data; u32 *analogBank7Data;
u32 *addac5416_21;
u32 *bank6Temp; u32 *bank6Temp;
u8 txpower_limit; u8 txpower_limit;
......
...@@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
} }
/* either retransmit or send bar if ack not recd */ /* either retransmit or send bar if ack not recd */
if (!ack_recd) { if (!ack_recd) {
struct ieee80211_tx_rate *txrate = if (retry && (ini->txretry[index] < (int)retry_limit)) {
tx_info->status.rates;
if (retry && (txrate[0].count < (int)retry_limit)) {
ini->txretry[index]++; ini->txretry[index]++;
ini->tx_in_transit--; ini->tx_in_transit--;
/* /*
* Use high prededence for retransmit to * Use high prededence for retransmit to
* give some punch * give some punch
*/ */
/* brcms_c_txq_enq(wlc, scb, p,
* BRCMS_PRIO_TO_PREC(tid)); */
brcms_c_txq_enq(wlc, scb, p, brcms_c_txq_enq(wlc, scb, p,
BRCMS_PRIO_TO_HI_PREC(tid)); BRCMS_PRIO_TO_HI_PREC(tid));
} else { } else {
...@@ -1074,9 +1070,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1074,9 +1070,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
IEEE80211_TX_STAT_AMPDU_NO_BACK; IEEE80211_TX_STAT_AMPDU_NO_BACK;
skb_pull(p, D11_PHY_HDR_LEN); skb_pull(p, D11_PHY_HDR_LEN);
skb_pull(p, D11_TXH_LEN); skb_pull(p, D11_TXH_LEN);
wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_" BCMMSG(wiphy,
"transit %d\n", "AMPDU status", seq, "BA Timeout, seq %d, in_transit %d\n",
ini->tx_in_transit); seq, ini->tx_in_transit);
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
p); p);
} }
......
...@@ -1190,6 +1190,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, ...@@ -1190,6 +1190,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
unsigned long flags; unsigned long flags;
struct iwl_addsta_cmd sta_cmd; struct iwl_addsta_cmd sta_cmd;
u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta); u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta);
__le16 key_flags;
/* if station isn't there, neither is the key */ /* if station isn't there, neither is the key */
if (sta_id == IWL_INVALID_STATION) if (sta_id == IWL_INVALID_STATION)
...@@ -1215,7 +1216,14 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, ...@@ -1215,7 +1216,14 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
IWL_ERR(priv, "offset %d not used in uCode key table.\n", IWL_ERR(priv, "offset %d not used in uCode key table.\n",
keyconf->hw_key_idx); keyconf->hw_key_idx);
sta_cmd.key.key_flags = STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID; key_flags = cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
key_flags |= STA_KEY_FLG_MAP_KEY_MSK | STA_KEY_FLG_NO_ENC |
STA_KEY_FLG_INVALID;
if (!(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE))
key_flags |= STA_KEY_MULTICAST_MSK;
sta_cmd.key.key_flags = key_flags;
sta_cmd.key.key_offset = WEP_INVALID_OFFSET; sta_cmd.key.key_offset = WEP_INVALID_OFFSET;
sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK; sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
sta_cmd.mode = STA_CONTROL_MODIFY_MSK; sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
......
...@@ -1232,7 +1232,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) ...@@ -1232,7 +1232,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
cancel_work_sync(&rt2x00dev->rxdone_work); cancel_work_sync(&rt2x00dev->rxdone_work);
cancel_work_sync(&rt2x00dev->txdone_work); cancel_work_sync(&rt2x00dev->txdone_work);
} }
destroy_workqueue(rt2x00dev->workqueue); if (rt2x00dev->workqueue)
destroy_workqueue(rt2x00dev->workqueue);
/* /*
* Free the tx status fifo. * Free the tx status fifo.
......
...@@ -412,7 +412,8 @@ struct tcp_sock { ...@@ -412,7 +412,8 @@ struct tcp_sock {
struct tcp_sack_block recv_sack_cache[4]; struct tcp_sack_block recv_sack_cache[4];
struct sk_buff *highest_sack; /* highest skb with SACK received struct sk_buff *highest_sack; /* skb just after the highest
* skb with SACKed bit set
* (validity guaranteed only if * (validity guaranteed only if
* sacked_out > 0) * sacked_out > 0)
*/ */
......
...@@ -1362,8 +1362,9 @@ static inline void tcp_push_pending_frames(struct sock *sk) ...@@ -1362,8 +1362,9 @@ static inline void tcp_push_pending_frames(struct sock *sk)
} }
} }
/* Start sequence of the highest skb with SACKed bit, valid only if /* Start sequence of the skb just after the highest skb with SACKed
* sacked > 0 or when the caller has ensured validity by itself. * bit, valid only if sacked_out > 0 or when the caller has ensured
* validity by itself.
*/ */
static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp)
{ {
......
...@@ -1893,10 +1893,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt, ...@@ -1893,10 +1893,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
switch (compat_mwt) { switch (compat_mwt) {
case EBT_COMPAT_MATCH: case EBT_COMPAT_MATCH:
match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE, match = xt_request_find_match(NFPROTO_BRIDGE, name, 0);
name, 0), "ebt_%s", name);
if (match == NULL)
return -ENOENT;
if (IS_ERR(match)) if (IS_ERR(match))
return PTR_ERR(match); return PTR_ERR(match);
...@@ -1915,10 +1912,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt, ...@@ -1915,10 +1912,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
break; break;
case EBT_COMPAT_WATCHER: /* fallthrough */ case EBT_COMPAT_WATCHER: /* fallthrough */
case EBT_COMPAT_TARGET: case EBT_COMPAT_TARGET:
wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE, wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0);
name, 0), "ebt_%s", name);
if (wt == NULL)
return -ENOENT;
if (IS_ERR(wt)) if (IS_ERR(wt))
return PTR_ERR(wt); return PTR_ERR(wt);
off = xt_compat_target_offset(wt); off = xt_compat_target_offset(wt);
......
...@@ -1403,8 +1403,16 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, ...@@ -1403,8 +1403,16 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
BUG_ON(!pcount); BUG_ON(!pcount);
/* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */ /* Adjust counters and hints for the newly sacked sequence
if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint)) * range but discard the return value since prev is already
* marked. We must tag the range first because the seq
* advancement below implicitly advances
* tcp_highest_sack_seq() when skb is highest_sack.
*/
tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
start_seq, end_seq, dup_sack, pcount);
if (skb == tp->lost_skb_hint)
tp->lost_cnt_hint += pcount; tp->lost_cnt_hint += pcount;
TCP_SKB_CB(prev)->end_seq += shifted; TCP_SKB_CB(prev)->end_seq += shifted;
...@@ -1430,12 +1438,6 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, ...@@ -1430,12 +1438,6 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
skb_shinfo(skb)->gso_type = 0; skb_shinfo(skb)->gso_type = 0;
} }
/* Adjust counters and hints for the newly sacked sequence range but
* discard the return value since prev is already marked.
*/
tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
start_seq, end_seq, dup_sack, pcount);
/* Difference in this won't matter, both ACKed by the same cumul. ACK */ /* Difference in this won't matter, both ACKed by the same cumul. ACK */
TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS);
......
...@@ -1342,6 +1342,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) ...@@ -1342,6 +1342,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
hw_roc = true; hw_roc = true;
list_for_each_entry(sdata, &local->interfaces, list) { list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
continue;
if (sdata->old_idle == sdata->vif.bss_conf.idle) if (sdata->old_idle == sdata->vif.bss_conf.idle)
continue; continue;
if (!ieee80211_sdata_running(sdata)) if (!ieee80211_sdata_running(sdata))
......
...@@ -447,7 +447,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, ...@@ -447,7 +447,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
info->control.rates[i].idx = -1; info->control.rates[i].idx = -1;
info->control.rates[i].flags = 0; info->control.rates[i].flags = 0;
info->control.rates[i].count = 1; info->control.rates[i].count = 0;
} }
if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
......
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