mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'net-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
"Including fixes from WiFi and netfilter.
Most regressions addressed here come from quite old versions, with the
exceptions of the iavf one and the WiFi fixes. No known outstanding
reports or investigation.
Fixes to fixes:
- eth: iavf: in iavf_down, disable queues when removing the driver
Previous releases - regressions:
- sched: act_ct: additional checks for outdated flows
- tcp: do not leave an empty skb in write queue
- tcp: fix wrong RTO timeout when received SACK reneging
- wifi: cfg80211: pass correct pointer to rdev_inform_bss()
- eth: i40e: sync next_to_clean and next_to_process for programming
status desc
- eth: iavf: initialize waitqueues before starting watchdog_task
Previous releases - always broken:
- eth: r8169: fix data-races
- eth: igb: fix potential memory leak in igb_add_ethtool_nfc_entry
- eth: r8152: avoid writing garbage to the adapter's registers
- eth: gtp: fix fragmentation needed check with gso"
* tag 'net-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (43 commits)
iavf: in iavf_down, disable queues when removing the driver
vsock/virtio: initialize the_virtio_vsock before using VQs
net: ipv6: fix typo in comments
net: ipv4: fix typo in comments
net/sched: act_ct: additional checks for outdated flows
netfilter: flowtable: GC pushes back packets to classic path
i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
gtp: fix fragmentation needed check with gso
gtp: uapi: fix GTPA_MAX
Fix NULL pointer dereference in cn_filter()
sfc: cleanup and reduce netlink error messages
net/handshake: fix file ref count in handshake_nl_accept_doit()
wifi: mac80211: don't drop all unprotected public action frames
wifi: cfg80211: fix assoc response warning on failed links
wifi: cfg80211: pass correct pointer to rdev_inform_bss()
isdn: mISDN: hfcsusb: Spelling fix in comment
tcp: fix wrong RTO timeout when received SACK reneging
r8152: Block future register access if register access fails
r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE
r8152: Check for unplug in r8153b_ups_en() / r8153c_ups_en()
...
This commit is contained in:
@@ -54,7 +54,7 @@ static int cn_filter(struct sock *dsk, struct sk_buff *skb, void *data)
|
||||
enum proc_cn_mcast_op mc_op;
|
||||
uintptr_t val;
|
||||
|
||||
if (!dsk || !data)
|
||||
if (!dsk || !dsk->sk_user_data || !data)
|
||||
return 0;
|
||||
|
||||
ptr = (__u32 *)data;
|
||||
|
||||
@@ -678,7 +678,7 @@ ph_state(struct dchannel *dch)
|
||||
}
|
||||
|
||||
/*
|
||||
* disable/enable BChannel for desired protocoll
|
||||
* disable/enable BChannel for desired protocol
|
||||
*/
|
||||
static int
|
||||
hfcsusb_setup_bch(struct bchannel *bch, int protocol)
|
||||
|
||||
@@ -294,7 +294,7 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv)
|
||||
{
|
||||
struct adin1110_priv *priv = port_priv->priv;
|
||||
u32 header_len = ADIN1110_RD_HEADER_LEN;
|
||||
struct spi_transfer t;
|
||||
struct spi_transfer t = {0};
|
||||
u32 frame_size_no_fcs;
|
||||
struct sk_buff *rxb;
|
||||
u32 frame_size;
|
||||
|
||||
@@ -2170,7 +2170,7 @@ static void xgene_enet_shutdown(struct platform_device *pdev)
|
||||
static struct platform_driver xgene_enet_driver = {
|
||||
.driver = {
|
||||
.name = "xgene-enet",
|
||||
.of_match_table = of_match_ptr(xgene_enet_of_match),
|
||||
.of_match_table = xgene_enet_of_match,
|
||||
.acpi_match_table = ACPI_PTR(xgene_enet_acpi_match),
|
||||
},
|
||||
.probe = xgene_enet_probe,
|
||||
|
||||
@@ -3816,6 +3816,8 @@ int t4_load_phy_fw(struct adapter *adap, int win,
|
||||
FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD));
|
||||
ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1,
|
||||
¶m, &val, 30000);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* If we have version number support, then check to see that the new
|
||||
* firmware got loaded properly.
|
||||
|
||||
@@ -580,7 +580,6 @@ struct i40e_pf {
|
||||
#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
|
||||
#define I40E_FLAG_RS_FEC BIT(25)
|
||||
#define I40E_FLAG_BASE_R_FEC BIT(26)
|
||||
#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
|
||||
/* TOTAL_PORT_SHUTDOWN
|
||||
* Allows to physically disable the link on the NIC's port.
|
||||
* If enabled, (after link down request from the OS)
|
||||
@@ -603,6 +602,7 @@ struct i40e_pf {
|
||||
* in abilities field of i40e_aq_set_phy_config structure
|
||||
*/
|
||||
#define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27)
|
||||
#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)
|
||||
|
||||
struct i40e_client_instance *cinst;
|
||||
bool stat_offsets_loaded;
|
||||
|
||||
@@ -2544,7 +2544,14 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget,
|
||||
rx_buffer = i40e_rx_bi(rx_ring, ntp);
|
||||
i40e_inc_ntp(rx_ring);
|
||||
i40e_reuse_rx_page(rx_ring, rx_buffer);
|
||||
cleaned_count++;
|
||||
/* Update ntc and bump cleaned count if not in the
|
||||
* middle of mb packet.
|
||||
*/
|
||||
if (rx_ring->next_to_clean == ntp) {
|
||||
rx_ring->next_to_clean =
|
||||
rx_ring->next_to_process;
|
||||
cleaned_count++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2847,7 +2854,7 @@ tx_only:
|
||||
return budget;
|
||||
}
|
||||
|
||||
if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
|
||||
if (q_vector->tx.ring[0].flags & I40E_TXR_FLAGS_WB_ON_ITR)
|
||||
q_vector->arm_wb_state = false;
|
||||
|
||||
/* Exit the polling mode, but don't re-enable interrupts if stack might
|
||||
|
||||
@@ -437,12 +437,12 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
|
||||
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
|
||||
u16 next_to_process = rx_ring->next_to_process;
|
||||
u16 next_to_clean = rx_ring->next_to_clean;
|
||||
u16 count_mask = rx_ring->count - 1;
|
||||
unsigned int xdp_res, xdp_xmit = 0;
|
||||
struct xdp_buff *first = NULL;
|
||||
u32 count = rx_ring->count;
|
||||
struct bpf_prog *xdp_prog;
|
||||
u32 entries_to_alloc;
|
||||
bool failure = false;
|
||||
u16 cleaned_count;
|
||||
|
||||
if (next_to_process != next_to_clean)
|
||||
first = *i40e_rx_bi(rx_ring, next_to_clean);
|
||||
@@ -475,7 +475,8 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
|
||||
qword);
|
||||
bi = *i40e_rx_bi(rx_ring, next_to_process);
|
||||
xsk_buff_free(bi);
|
||||
next_to_process = (next_to_process + 1) & count_mask;
|
||||
if (++next_to_process == count)
|
||||
next_to_process = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -493,7 +494,8 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
|
||||
else if (i40e_add_xsk_frag(rx_ring, first, bi, size))
|
||||
break;
|
||||
|
||||
next_to_process = (next_to_process + 1) & count_mask;
|
||||
if (++next_to_process == count)
|
||||
next_to_process = 0;
|
||||
|
||||
if (i40e_is_non_eop(rx_ring, rx_desc))
|
||||
continue;
|
||||
@@ -513,10 +515,10 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
|
||||
|
||||
rx_ring->next_to_clean = next_to_clean;
|
||||
rx_ring->next_to_process = next_to_process;
|
||||
cleaned_count = (next_to_clean - rx_ring->next_to_use - 1) & count_mask;
|
||||
|
||||
if (cleaned_count >= I40E_RX_BUFFER_WRITE)
|
||||
failure |= !i40e_alloc_rx_buffers_zc(rx_ring, cleaned_count);
|
||||
entries_to_alloc = I40E_DESC_UNUSED(rx_ring);
|
||||
if (entries_to_alloc >= I40E_RX_BUFFER_WRITE)
|
||||
failure |= !i40e_alloc_rx_buffers_zc(rx_ring, entries_to_alloc);
|
||||
|
||||
i40e_finalize_xdp_rx(rx_ring, xdp_xmit);
|
||||
i40e_update_rx_stats(rx_ring, total_rx_bytes, total_rx_packets);
|
||||
@@ -752,14 +754,16 @@ int i40e_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags)
|
||||
|
||||
void i40e_xsk_clean_rx_ring(struct i40e_ring *rx_ring)
|
||||
{
|
||||
u16 count_mask = rx_ring->count - 1;
|
||||
u16 ntc = rx_ring->next_to_clean;
|
||||
u16 ntu = rx_ring->next_to_use;
|
||||
|
||||
for ( ; ntc != ntu; ntc = (ntc + 1) & count_mask) {
|
||||
while (ntc != ntu) {
|
||||
struct xdp_buff *rx_bi = *i40e_rx_bi(rx_ring, ntc);
|
||||
|
||||
xsk_buff_free(rx_bi);
|
||||
ntc++;
|
||||
if (ntc >= rx_ring->count)
|
||||
ntc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1437,9 +1437,9 @@ void iavf_down(struct iavf_adapter *adapter)
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DEL_FDIR_FILTER;
|
||||
if (!list_empty(&adapter->adv_rss_list_head))
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DEL_ADV_RSS_CFG;
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DISABLE_QUEUES;
|
||||
}
|
||||
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_DISABLE_QUEUES;
|
||||
mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0);
|
||||
}
|
||||
|
||||
@@ -4982,8 +4982,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
INIT_WORK(&adapter->finish_config, iavf_finish_config);
|
||||
INIT_DELAYED_WORK(&adapter->watchdog_task, iavf_watchdog_task);
|
||||
INIT_DELAYED_WORK(&adapter->client_task, iavf_client_task);
|
||||
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
|
||||
msecs_to_jiffies(5 * (pdev->devfn & 0x07)));
|
||||
|
||||
/* Setup the wait queue for indicating transition to down status */
|
||||
init_waitqueue_head(&adapter->down_waitqueue);
|
||||
@@ -4994,6 +4992,9 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
/* Setup the wait queue for indicating virtchannel events */
|
||||
init_waitqueue_head(&adapter->vc_waitqueue);
|
||||
|
||||
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
|
||||
msecs_to_jiffies(5 * (pdev->devfn & 0x07)));
|
||||
/* Initialization goes on in the work. Do not add more of it below. */
|
||||
return 0;
|
||||
|
||||
err_ioremap:
|
||||
|
||||
@@ -2978,11 +2978,15 @@ static int igb_add_ethtool_nfc_entry(struct igb_adapter *adapter,
|
||||
if (err)
|
||||
goto err_out_w_lock;
|
||||
|
||||
igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
|
||||
err = igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
|
||||
if (err)
|
||||
goto err_out_input_filter;
|
||||
|
||||
spin_unlock(&adapter->nfc_lock);
|
||||
return 0;
|
||||
|
||||
err_out_input_filter:
|
||||
igb_erase_filter(adapter, input);
|
||||
err_out_w_lock:
|
||||
spin_unlock(&adapter->nfc_lock);
|
||||
err_out:
|
||||
|
||||
@@ -1817,7 +1817,7 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,
|
||||
struct igc_adapter *adapter = netdev_priv(netdev);
|
||||
struct net_device *dev = adapter->netdev;
|
||||
struct igc_hw *hw = &adapter->hw;
|
||||
u32 advertising;
|
||||
u16 advertised = 0;
|
||||
|
||||
/* When adapter in resetting mode, autoneg/speed/duplex
|
||||
* cannot be changed
|
||||
@@ -1842,18 +1842,33 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,
|
||||
while (test_and_set_bit(__IGC_RESETTING, &adapter->state))
|
||||
usleep_range(1000, 2000);
|
||||
|
||||
ethtool_convert_link_mode_to_legacy_u32(&advertising,
|
||||
cmd->link_modes.advertising);
|
||||
/* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT.
|
||||
* We have to check this and convert it to ADVERTISE_2500_FULL
|
||||
* (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly.
|
||||
*/
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full))
|
||||
advertising |= ADVERTISE_2500_FULL;
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
2500baseT_Full))
|
||||
advertised |= ADVERTISE_2500_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
1000baseT_Full))
|
||||
advertised |= ADVERTISE_1000_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
100baseT_Full))
|
||||
advertised |= ADVERTISE_100_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
100baseT_Half))
|
||||
advertised |= ADVERTISE_100_HALF;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
10baseT_Full))
|
||||
advertised |= ADVERTISE_10_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
10baseT_Half))
|
||||
advertised |= ADVERTISE_10_HALF;
|
||||
|
||||
if (cmd->base.autoneg == AUTONEG_ENABLE) {
|
||||
hw->mac.autoneg = 1;
|
||||
hw->phy.autoneg_advertised = advertising;
|
||||
hw->phy.autoneg_advertised = advertised;
|
||||
if (adapter->fc_autoneg)
|
||||
hw->fc.requested_mode = igc_fc_default;
|
||||
} else {
|
||||
|
||||
@@ -4364,7 +4364,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,
|
||||
unsigned int entry = dirty_tx % NUM_TX_DESC;
|
||||
u32 status;
|
||||
|
||||
status = le32_to_cpu(tp->TxDescArray[entry].opts1);
|
||||
status = le32_to_cpu(READ_ONCE(tp->TxDescArray[entry].opts1));
|
||||
if (status & DescOwn)
|
||||
break;
|
||||
|
||||
@@ -4394,7 +4394,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,
|
||||
* If skb is NULL then we come here again once a tx irq is
|
||||
* triggered after the last fragment is marked transmitted.
|
||||
*/
|
||||
if (tp->cur_tx != dirty_tx && skb)
|
||||
if (READ_ONCE(tp->cur_tx) != dirty_tx && skb)
|
||||
rtl8169_doorbell(tp);
|
||||
}
|
||||
}
|
||||
@@ -4427,7 +4427,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, int budget
|
||||
dma_addr_t addr;
|
||||
u32 status;
|
||||
|
||||
status = le32_to_cpu(desc->opts1);
|
||||
status = le32_to_cpu(READ_ONCE(desc->opts1));
|
||||
if (status & DescOwn)
|
||||
break;
|
||||
|
||||
|
||||
@@ -629,14 +629,14 @@ static int efx_tc_flower_record_encap_match(struct efx_nic *efx,
|
||||
}
|
||||
if (child_ip_tos_mask != old->child_ip_tos_mask) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Pseudo encap match for TOS mask %#04x conflicts with existing pseudo(MASK) entry for TOS mask %#04x",
|
||||
"Pseudo encap match for TOS mask %#04x conflicts with existing mask %#04x",
|
||||
child_ip_tos_mask,
|
||||
old->child_ip_tos_mask);
|
||||
return -EEXIST;
|
||||
}
|
||||
if (child_udp_sport_mask != old->child_udp_sport_mask) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Pseudo encap match for UDP src port mask %#x conflicts with existing pseudo(MASK) entry for mask %#x",
|
||||
"Pseudo encap match for UDP src port mask %#x conflicts with existing mask %#x",
|
||||
child_udp_sport_mask,
|
||||
old->child_udp_sport_mask);
|
||||
return -EEXIST;
|
||||
@@ -1081,7 +1081,7 @@ static int efx_tc_pedit_add(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
/* check that we do not decrement ttl twice */
|
||||
if (!efx_tc_flower_action_order_ok(act,
|
||||
EFX_TC_AO_DEC_TTL)) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Unsupported: multiple dec ttl");
|
||||
NL_SET_ERR_MSG_MOD(extack, "multiple dec ttl are not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
act->do_ttl_dec = 1;
|
||||
@@ -1106,7 +1106,7 @@ static int efx_tc_pedit_add(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
/* check that we do not decrement hoplimit twice */
|
||||
if (!efx_tc_flower_action_order_ok(act,
|
||||
EFX_TC_AO_DEC_TTL)) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Unsupported: multiple dec ttl");
|
||||
NL_SET_ERR_MSG_MOD(extack, "multiple dec ttl are not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
act->do_ttl_dec = 1;
|
||||
@@ -1120,7 +1120,7 @@ static int efx_tc_pedit_add(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
}
|
||||
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: ttl add action type %x %x %x/%x",
|
||||
"ttl add action type %x %x %x/%x is not supported",
|
||||
fa->mangle.htype, fa->mangle.offset,
|
||||
fa->mangle.val, fa->mangle.mask);
|
||||
return -EOPNOTSUPP;
|
||||
@@ -1164,7 +1164,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
case 0:
|
||||
if (fa->mangle.mask) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: mask (%#x) of eth.dst32 mangle",
|
||||
"mask (%#x) of eth.dst32 mangle is not supported",
|
||||
fa->mangle.mask);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
mung->dst_mac_16 = 1;
|
||||
} else {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: mask (%#x) of eth+4 mangle is not high or low 16b",
|
||||
"mask (%#x) of eth+4 mangle is not high or low 16b",
|
||||
fa->mangle.mask);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1192,7 +1192,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
case 8:
|
||||
if (fa->mangle.mask) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: mask (%#x) of eth.src32 mangle",
|
||||
"mask (%#x) of eth.src32 mangle is not supported",
|
||||
fa->mangle.mask);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1201,7 +1201,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
mung->src_mac_32 = 1;
|
||||
return efx_tc_complete_mac_mangle(efx, act, mung, extack);
|
||||
default:
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported: mangle eth+%u %x/%x",
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack, "mangle eth+%u %x/%x is not supported",
|
||||
fa->mangle.offset, fa->mangle.val, fa->mangle.mask);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1217,7 +1217,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
/* check that pedit applies to ttl only */
|
||||
if (fa->mangle.mask != ~EFX_TC_HDR_TYPE_TTL_MASK) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: mask (%#x) out of range, only support mangle action on ipv4.ttl",
|
||||
"mask (%#x) out of range, only support mangle action on ipv4.ttl",
|
||||
fa->mangle.mask);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1227,7 +1227,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
*/
|
||||
if (match->mask.ip_ttl != U8_MAX) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: only support mangle ipv4.ttl when we have an exact match on ttl, mask used for match (%#x)",
|
||||
"only support mangle ttl when we have an exact match, current mask (%#x)",
|
||||
match->mask.ip_ttl);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1237,7 +1237,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
*/
|
||||
if (match->value.ip_ttl == 0) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Unsupported: we cannot decrement ttl past 0");
|
||||
"decrement ttl past 0 is not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -1245,7 +1245,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
if (!efx_tc_flower_action_order_ok(act,
|
||||
EFX_TC_AO_DEC_TTL)) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Unsupported: multiple dec ttl");
|
||||
"multiple dec ttl is not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -1259,7 +1259,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
fallthrough;
|
||||
default:
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: only support mangle on the ttl field (offset is %u)",
|
||||
"only support mangle on the ttl field (offset is %u)",
|
||||
fa->mangle.offset);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1275,7 +1275,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
/* check that pedit applies to ttl only */
|
||||
if (fa->mangle.mask != EFX_TC_HDR_TYPE_HLIMIT_MASK) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: mask (%#x) out of range, only support mangle action on ipv6.hop_limit",
|
||||
"mask (%#x) out of range, only support mangle action on ipv6.hop_limit",
|
||||
fa->mangle.mask);
|
||||
|
||||
return -EOPNOTSUPP;
|
||||
@@ -1286,7 +1286,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
*/
|
||||
if (match->mask.ip_ttl != U8_MAX) {
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: only support mangle ipv6.hop_limit when we have an exact match on ttl, mask used for match (%#x)",
|
||||
"only support hop_limit when we have an exact match, current mask (%#x)",
|
||||
match->mask.ip_ttl);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1296,7 +1296,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
*/
|
||||
if (match->value.ip_ttl == 0) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Unsupported: we cannot decrement hop_limit past 0");
|
||||
"decrementing hop_limit past 0 is not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -1304,7 +1304,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
if (!efx_tc_flower_action_order_ok(act,
|
||||
EFX_TC_AO_DEC_TTL)) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Unsupported: multiple dec ttl");
|
||||
"multiple dec ttl is not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -1318,7 +1318,7 @@ static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
|
||||
fallthrough;
|
||||
default:
|
||||
NL_SET_ERR_MSG_FMT_MOD(extack,
|
||||
"Unsupported: only support mangle on the hop_limit field");
|
||||
"only support mangle on the hop_limit field");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -1197,6 +1197,17 @@ static int stmmac_init_phy(struct net_device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void stmmac_set_half_duplex(struct stmmac_priv *priv)
|
||||
{
|
||||
/* Half-Duplex can only work with single tx queue */
|
||||
if (priv->plat->tx_queues_to_use > 1)
|
||||
priv->phylink_config.mac_capabilities &=
|
||||
~(MAC_10HD | MAC_100HD | MAC_1000HD);
|
||||
else
|
||||
priv->phylink_config.mac_capabilities |=
|
||||
(MAC_10HD | MAC_100HD | MAC_1000HD);
|
||||
}
|
||||
|
||||
static int stmmac_phy_setup(struct stmmac_priv *priv)
|
||||
{
|
||||
struct stmmac_mdio_bus_data *mdio_bus_data;
|
||||
@@ -1228,10 +1239,7 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
|
||||
MAC_10FD | MAC_100FD |
|
||||
MAC_1000FD;
|
||||
|
||||
/* Half-Duplex can only work with single queue */
|
||||
if (priv->plat->tx_queues_to_use <= 1)
|
||||
priv->phylink_config.mac_capabilities |= MAC_10HD | MAC_100HD |
|
||||
MAC_1000HD;
|
||||
stmmac_set_half_duplex(priv);
|
||||
|
||||
/* Get the MAC specific capabilities */
|
||||
stmmac_mac_phylink_get_caps(priv);
|
||||
@@ -7172,6 +7180,7 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt)
|
||||
priv->rss.table[i] = ethtool_rxfh_indir_default(i,
|
||||
rx_cnt);
|
||||
|
||||
stmmac_set_half_duplex(priv);
|
||||
stmmac_napi_add(dev);
|
||||
|
||||
if (netif_running(dev))
|
||||
|
||||
@@ -1217,7 +1217,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev,
|
||||
key_index = wl->current_key;
|
||||
|
||||
if (!enc->length && (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)) {
|
||||
/* reques to change default key index */
|
||||
/* request to change default key index */
|
||||
pr_debug("%s: request to change default key to %d\n",
|
||||
__func__, key_index);
|
||||
wl->current_key = key_index;
|
||||
|
||||
+3
-2
@@ -872,8 +872,9 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
skb_dst_update_pmtu_no_confirm(skb, mtu);
|
||||
|
||||
if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) &&
|
||||
mtu < ntohs(iph->tot_len)) {
|
||||
if (iph->frag_off & htons(IP_DF) &&
|
||||
((!skb_is_gso(skb) && skb->len > mtu) ||
|
||||
(skb_is_gso(skb) && !skb_gso_validate_network_len(skb, mtu)))) {
|
||||
netdev_dbg(dev, "packet too big, fragmentation needed\n");
|
||||
icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
|
||||
htonl(mtu));
|
||||
|
||||
@@ -1162,9 +1162,10 @@ static int adf7242_stats_show(struct seq_file *file, void *offset)
|
||||
|
||||
static void adf7242_debugfs_init(struct adf7242_local *lp)
|
||||
{
|
||||
char debugfs_dir_name[DNAME_INLINE_LEN + 1] = "adf7242-";
|
||||
char debugfs_dir_name[DNAME_INLINE_LEN + 1];
|
||||
|
||||
strncat(debugfs_dir_name, dev_name(&lp->spi->dev), DNAME_INLINE_LEN);
|
||||
snprintf(debugfs_dir_name, sizeof(debugfs_dir_name),
|
||||
"adf7242-%s", dev_name(&lp->spi->dev));
|
||||
|
||||
lp->debugfs_root = debugfs_create_dir(debugfs_dir_name, NULL);
|
||||
|
||||
|
||||
+230
-73
File diff suppressed because it is too large
Load Diff
@@ -95,7 +95,9 @@ static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
ret = fn(dev, USB_VENDOR_REQUEST_READ_REGISTER, USB_DIR_IN
|
||||
| USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
0, index, &buf, 4);
|
||||
if (ret < 0) {
|
||||
if (ret < 4) {
|
||||
ret = ret < 0 ? ret : -ENODATA;
|
||||
|
||||
if (ret != -ENODEV)
|
||||
netdev_warn(dev->net, "Failed to read reg index 0x%08x: %d\n",
|
||||
index, ret);
|
||||
|
||||
@@ -4355,6 +4355,35 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
|
||||
return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* ieee80211_is_protected_dual_of_public_action - check if skb contains a
|
||||
* protected dual of public action management frame
|
||||
* @skb: the skb containing the frame, length will be checked
|
||||
*
|
||||
* Return: true if the skb contains a protected dual of public action
|
||||
* management frame, false otherwise.
|
||||
*/
|
||||
static inline bool
|
||||
ieee80211_is_protected_dual_of_public_action(struct sk_buff *skb)
|
||||
{
|
||||
u8 action;
|
||||
|
||||
if (!ieee80211_is_public_action((void *)skb->data, skb->len) ||
|
||||
skb->len < IEEE80211_MIN_ACTION_SIZE + 1)
|
||||
return false;
|
||||
|
||||
action = *(u8 *)(skb->data + IEEE80211_MIN_ACTION_SIZE);
|
||||
|
||||
return action != WLAN_PUB_ACTION_20_40_BSS_COEX &&
|
||||
action != WLAN_PUB_ACTION_DSE_REG_LOC_ANN &&
|
||||
action != WLAN_PUB_ACTION_MSMT_PILOT &&
|
||||
action != WLAN_PUB_ACTION_TDLS_DISCOVER_RES &&
|
||||
action != WLAN_PUB_ACTION_LOC_TRACK_NOTI &&
|
||||
action != WLAN_PUB_ACTION_FTM_REQUEST &&
|
||||
action != WLAN_PUB_ACTION_FTM_RESPONSE &&
|
||||
action != WLAN_PUB_ACTION_FILS_DISCOVERY;
|
||||
}
|
||||
|
||||
/**
|
||||
* _ieee80211_is_group_privacy_action - check if frame is a group addressed
|
||||
* privacy action frame
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user