Skip to content

Commit ecefc36

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: Add a flow_cache_flush_deferred function ipv4: reintroduce route cache garbage collector net: have ipconfig not wait if no dev is available sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd asix: new device id davinci-cpdma: fix locking issue in cpdma_chan_stop sctp: fix incorrect overflow check on autoclose r8169: fix Config2 MSIEnable bit setting. llc: llc_cmsg_rcv was getting called after sk_eat_skb. net: bpf_jit: fix an off-one bug in x86_64 cond jump target iwlwifi: update SCD BC table for all SCD queues Revert "Bluetooth: Revert: Fix L2CAP connection establishment" Bluetooth: Clear RFCOMM session timer when disconnecting last channel Bluetooth: Prevent uninitialized data access in L2CAP configuration iwlwifi: allow to switch to HT40 if not associated iwlwifi: tx_sync only on PAN context mwifiex: avoid double list_del in command cancel path ath9k: fix max phy rate at rate control init nfc: signedness bug in __nci_request() iwlwifi: do not set the sequence control bit is not needed
2 parents d5ed5e4 + c0ed1c1 commit ecefc36

27 files changed

Lines changed: 220 additions & 47 deletions

File tree

‎arch/x86/net/bpf_jit_comp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
568568
break;
569569
}
570570
if (filter[i].jt != 0) {
571-
if (filter[i].jf)
572-
t_offset += is_near(f_offset) ? 2 : 6;
571+
if (filter[i].jf && f_offset)
572+
t_offset += is_near(f_offset) ? 2 : 5;
573573
EMIT_COND_JMP(t_op, t_offset);
574574
if (filter[i].jf)
575575
EMIT_JMP(f_offset);

‎drivers/net/ethernet/realtek/r8169.c‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,14 +477,14 @@ enum rtl_register_content {
477477
/* Config1 register p.24 */
478478
LEDS1 = (1 << 7),
479479
LEDS0 = (1 << 6),
480-
MSIEnable = (1 << 5), /* Enable Message Signaled Interrupt */
481480
Speed_down = (1 << 4),
482481
MEMMAP = (1 << 3),
483482
IOMAP = (1 << 2),
484483
VPD = (1 << 1),
485484
PMEnable = (1 << 0), /* Power Management Enable */
486485

487486
/* Config2 register p. 25 */
487+
MSIEnable = (1 << 5), /* 8169 only. Reserved in the 8168. */
488488
PCI_Clock_66MHz = 0x01,
489489
PCI_Clock_33MHz = 0x00,
490490

@@ -3426,22 +3426,24 @@ static const struct rtl_cfg_info {
34263426
};
34273427

34283428
/* Cfg9346_Unlock assumed. */
3429-
static unsigned rtl_try_msi(struct pci_dev *pdev, void __iomem *ioaddr,
3429+
static unsigned rtl_try_msi(struct rtl8169_private *tp,
34303430
const struct rtl_cfg_info *cfg)
34313431
{
3432+
void __iomem *ioaddr = tp->mmio_addr;
34323433
unsigned msi = 0;
34333434
u8 cfg2;
34343435

34353436
cfg2 = RTL_R8(Config2) & ~MSIEnable;
34363437
if (cfg->features & RTL_FEATURE_MSI) {
3437-
if (pci_enable_msi(pdev)) {
3438-
dev_info(&pdev->dev, "no MSI. Back to INTx.\n");
3438+
if (pci_enable_msi(tp->pci_dev)) {
3439+
netif_info(tp, hw, tp->dev, "no MSI. Back to INTx.\n");
34393440
} else {
34403441
cfg2 |= MSIEnable;
34413442
msi = RTL_FEATURE_MSI;
34423443
}
34433444
}
3444-
RTL_W8(Config2, cfg2);
3445+
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
3446+
RTL_W8(Config2, cfg2);
34453447
return msi;
34463448
}
34473449

@@ -4077,7 +4079,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
40774079
tp->features |= RTL_FEATURE_WOL;
40784080
if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0)
40794081
tp->features |= RTL_FEATURE_WOL;
4080-
tp->features |= rtl_try_msi(pdev, ioaddr, cfg);
4082+
tp->features |= rtl_try_msi(tp, cfg);
40814083
RTL_W8(Cfg9346, Cfg9346_Lock);
40824084

40834085
if (rtl_tbi_enabled(tp)) {

‎drivers/net/ethernet/ti/davinci_cpdma.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,11 +836,13 @@ int cpdma_chan_stop(struct cpdma_chan *chan)
836836
chan_write(chan, cp, CPDMA_TEARDOWN_VALUE);
837837

838838
/* handle completed packets */
839+
spin_unlock_irqrestore(&chan->lock, flags);
839840
do {
840841
ret = __cpdma_chan_process(chan);
841842
if (ret < 0)
842843
break;
843844
} while ((ret & CPDMA_DESC_TD_COMPLETE) == 0);
845+
spin_lock_irqsave(&chan->lock, flags);
844846

845847
/* remaining packets haven't been tx/rx'ed, clean them up */
846848
while (chan->head) {

‎drivers/net/usb/asix.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,10 @@ static const struct usb_device_id products [] = {
16551655
// ASIX 88772a
16561656
USB_DEVICE(0x0db0, 0xa877),
16571657
.driver_info = (unsigned long) &ax88772_info,
1658+
}, {
1659+
// Asus USB Ethernet Adapter
1660+
USB_DEVICE (0x0b95, 0x7e2b),
1661+
.driver_info = (unsigned long) &ax88772_info,
16581662
},
16591663
{ }, // END
16601664
};

‎drivers/net/wireless/ath/ath9k/rc.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,9 @@ static void ath_rc_init(struct ath_softc *sc,
12711271

12721272
ath_rc_priv->max_valid_rate = k;
12731273
ath_rc_sort_validrates(rate_table, ath_rc_priv);
1274-
ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4];
1274+
ath_rc_priv->rate_max_phy = (k > 4) ?
1275+
ath_rc_priv->valid_rate_index[k-4] :
1276+
ath_rc_priv->valid_rate_index[k-1];
12751277
ath_rc_priv->rate_table = rate_table;
12761278

12771279
ath_dbg(common, ATH_DBG_CONFIG,

‎drivers/net/wireless/iwlwifi/iwl-agn-rxon.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
606606
if (ctx->ht.enabled) {
607607
/* if HT40 is used, it should not change
608608
* after associated except channel switch */
609-
if (iwl_is_associated_ctx(ctx) &&
610-
!ctx->ht.is_40mhz)
609+
if (!ctx->ht.is_40mhz ||
610+
!iwl_is_associated_ctx(ctx))
611611
iwlagn_config_ht40(conf, ctx);
612612
} else
613613
ctx->ht.is_40mhz = false;

‎drivers/net/wireless/iwlwifi/iwl-agn-tx.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
9191
tx_cmd->tid_tspec = qc[0] & 0xf;
9292
tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
9393
} else {
94-
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
94+
if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
95+
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
96+
else
97+
tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
9598
}
9699

97100
iwlagn_tx_cmd_protection(priv, info, fc, &tx_flags);

‎drivers/net/wireless/iwlwifi/iwl-agn.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,6 +2850,9 @@ static int iwlagn_mac_tx_sync(struct ieee80211_hw *hw,
28502850
int ret;
28512851
u8 sta_id;
28522852

2853+
if (ctx->ctxid != IWL_RXON_CTX_PAN)
2854+
return 0;
2855+
28532856
IWL_DEBUG_MAC80211(priv, "enter\n");
28542857
mutex_lock(&priv->shrd->mutex);
28552858

@@ -2898,6 +2901,9 @@ static void iwlagn_mac_finish_tx_sync(struct ieee80211_hw *hw,
28982901
struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv;
28992902
struct iwl_rxon_context *ctx = vif_priv->ctx;
29002903

2904+
if (ctx->ctxid != IWL_RXON_CTX_PAN)
2905+
return;
2906+
29012907
IWL_DEBUG_MAC80211(priv, "enter\n");
29022908
mutex_lock(&priv->shrd->mutex);
29032909

‎drivers/net/wireless/iwlwifi/iwl-trans-pcie.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,9 +1197,7 @@ static int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
11971197
iwl_print_hex_dump(trans, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len);
11981198

11991199
/* Set up entry for this TFD in Tx byte-count array */
1200-
if (is_agg)
1201-
iwl_trans_txq_update_byte_cnt_tbl(trans, txq,
1202-
le16_to_cpu(tx_cmd->len));
1200+
iwl_trans_txq_update_byte_cnt_tbl(trans, txq, le16_to_cpu(tx_cmd->len));
12031201

12041202
dma_sync_single_for_device(bus(trans)->dev, txcmd_phys, firstlen,
12051203
DMA_BIDIRECTIONAL);

‎drivers/net/wireless/mwifiex/cmdevt.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)
939939
{
940940
struct cmd_ctrl_node *cmd_node = NULL, *tmp_node = NULL;
941941
unsigned long cmd_flags;
942-
unsigned long cmd_pending_q_flags;
943942
unsigned long scan_pending_q_flags;
944943
uint16_t cancel_scan_cmd = false;
945944

@@ -949,12 +948,9 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)
949948
cmd_node = adapter->curr_cmd;
950949
cmd_node->wait_q_enabled = false;
951950
cmd_node->cmd_flag |= CMD_F_CANCELED;
952-
spin_lock_irqsave(&adapter->cmd_pending_q_lock,
953-
cmd_pending_q_flags);
954-
list_del(&cmd_node->list);
955-
spin_unlock_irqrestore(&adapter->cmd_pending_q_lock,
956-
cmd_pending_q_flags);
957951
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
952+
mwifiex_complete_cmd(adapter, adapter->curr_cmd);
953+
adapter->curr_cmd = NULL;
958954
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags);
959955
}
960956

@@ -981,7 +977,6 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)
981977
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags);
982978
}
983979
adapter->cmd_wait_q.status = -1;
984-
mwifiex_complete_cmd(adapter, adapter->curr_cmd);
985980
}
986981

987982
/*

0 commit comments

Comments
 (0)