From: YueHaibing <redacted>
[ Upstream commit eddf11e18dff0e8671e06ce54e64cfc843303ab9 ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.
Found by coccinelle.
Signed-off-by: YueHaibing <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/openvswitch/vport-internal_dev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Yunsheng Lin <redacted>
[ Upstream commit 93d8daf460183871a965dae339839d9e35d44309 ]
Currently hns3_nic_change_mtu will try to down the netdev before
setting mtu, and it does not up the netdev when the setting fails,
which causes netdev not up problem.
This patch fixes it by not returning when the setting fails.
Fixes: a8e8b7ff3517 ("net: hns3: Add support to change MTU in HNS3 hardware")
Signed-off-by: Yunsheng Lin <redacted>
Signed-off-by: Peng Li <redacted>
Signed-off-by: Salil Mehta <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
@@ -1307,13 +1307,11 @@ static int hns3_nic_change_mtu(struct net_device *netdev, int new_mtu)}ret=h->ae_algo->ops->set_mtu(h,new_mtu);-if(ret){+if(ret)netdev_err(netdev,"failed to change MTU in hardware %d\n",ret);-returnret;-}--netdev->mtu=new_mtu;+else+netdev->mtu=new_mtu;/* if the netdev was running earlier, bring it up again */if(if_running&&hns3_nic_net_open(netdev))
From: Trond Myklebust <redacted>
[ Upstream commit f42f7c283078ce3c1e8368b140e270755b1ae313 ]
Fix up the priority queue to not batch by owner, but by queue, so that
we allow '1 << priority' elements to be dequeued before switching to
the next priority queue.
The owner field is still used to wake up requests in round robin order
by owner to avoid single processes hogging the RPC layer by loading the
queues.
Signed-off-by: Trond Myklebust <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/sunrpc/sched.h | 2 -
net/sunrpc/sched.c | 109 +++++++++++++++++------------------
2 files changed, 54 insertions(+), 57 deletions(-)
@@ -188,7 +188,6 @@ struct rpc_timer {structrpc_wait_queue{spinlock_tlock;structlist_headtasks[RPC_NR_PRIORITY];/* task queue for each priority level */-pid_towner;/* process id of last task serviced */unsignedcharmaxpriority;/* maximum priority (0 if queue is not a priority queue) */unsignedcharpriority;/* current priority */unsignedcharnr;/* # tasks remaining for cookie */
@@ -99,64 +99,78 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task)list_add(&task->u.tk_wait.timer_list,&queue->timer_list.list);}-staticvoidrpc_rotate_queue_owner(structrpc_wait_queue*queue)-{-structlist_head*q=&queue->tasks[queue->priority];-structrpc_task*task;--if(!list_empty(q)){-task=list_first_entry(q,structrpc_task,u.tk_wait.list);-if(task->tk_owner==queue->owner)-list_move_tail(&task->u.tk_wait.list,q);-}-}-staticvoidrpc_set_waitqueue_priority(structrpc_wait_queue*queue,intpriority){if(queue->priority!=priority){-/* Fairness: rotate the list when changing priority */-rpc_rotate_queue_owner(queue);queue->priority=priority;+queue->nr=1U<<priority;}}-staticvoidrpc_set_waitqueue_owner(structrpc_wait_queue*queue,pid_tpid)-{-queue->owner=pid;-queue->nr=RPC_BATCH_COUNT;-}-staticvoidrpc_reset_waitqueue_priority(structrpc_wait_queue*queue){rpc_set_waitqueue_priority(queue,queue->maxpriority);-rpc_set_waitqueue_owner(queue,0);}/*-*Addnewrequesttoapriorityqueue.+*Addarequesttoaqueuelist*/-staticvoid__rpc_add_wait_queue_priority(structrpc_wait_queue*queue,-structrpc_task*task,-unsignedcharqueue_priority)+staticvoid+__rpc_list_enqueue_task(structlist_head*q,structrpc_task*task){-structlist_head*q;structrpc_task*t;-INIT_LIST_HEAD(&task->u.tk_wait.links);-if(unlikely(queue_priority>queue->maxpriority))-queue_priority=queue->maxpriority;-if(queue_priority>queue->priority)-rpc_set_waitqueue_priority(queue,queue_priority);-q=&queue->tasks[queue_priority];list_for_each_entry(t,q,u.tk_wait.list){if(t->tk_owner==task->tk_owner){-list_add_tail(&task->u.tk_wait.list,&t->u.tk_wait.links);+list_add_tail(&task->u.tk_wait.links,+&t->u.tk_wait.links);+/* Cache the queue head in task->u.tk_wait.list */+task->u.tk_wait.list.next=q;+task->u.tk_wait.list.prev=NULL;return;}}+INIT_LIST_HEAD(&task->u.tk_wait.links);list_add_tail(&task->u.tk_wait.list,q);}+/*+*Removerequestfromaqueuelist+*/+staticvoid+__rpc_list_dequeue_task(structrpc_task*task)+{+structlist_head*q;+structrpc_task*t;++if(task->u.tk_wait.list.prev==NULL){+list_del(&task->u.tk_wait.links);+return;+}+if(!list_empty(&task->u.tk_wait.links)){+t=list_first_entry(&task->u.tk_wait.links,+structrpc_task,+u.tk_wait.links);+/* Assume __rpc_list_enqueue_task() cached the queue head */+q=t->u.tk_wait.list.next;+list_add_tail(&t->u.tk_wait.list,q);+list_del(&task->u.tk_wait.links);+}+list_del(&task->u.tk_wait.list);+}++/*+*Addnewrequesttoapriorityqueue.+*/+staticvoid__rpc_add_wait_queue_priority(structrpc_wait_queue*queue,+structrpc_task*task,+unsignedcharqueue_priority)+{+if(unlikely(queue_priority>queue->maxpriority))+queue_priority=queue->maxpriority;+__rpc_list_enqueue_task(&queue->tasks[queue_priority],task);+}+/**Addnewrequesttowaitqueue.*
From: Simon Wunderlich <sw@simonwunderlich.de>
[ Upstream commit 4fb5837ac2bd46a85620b297002c704e9958f64d ]
Since the debug print code is outside of the loop, it shouldn't use the loop
iterator anymore but instead print the found maximum index.
Cc: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -411,7 +411,7 @@ ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,ath_dbg(common,SPECTRAL_SCAN,"Calculated new upper max 0x%X at %i\n",-tmp_mag,i);+tmp_mag,fft_sample_40.upper_max_index);}elsefor(i=dc_pos;i<SPECTRAL_HT20_40_NUM_BINS;i++){if(fft_sample_40.data[i]==(upper_mag>>max_exp))
From: Nathan Chancellor <redacted>
[ Upstream commit 3b0b8f0d9a259f6a428af63e7a77547325f8e081 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:303:7: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
? CXGB4_DCB_STATE_FW_ALLSYNCED
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:304:7: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
: CXGB4_DCB_STATE_FW_INCOMPLETE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
Use the equivalent value of the expected type to silence Clang while
resulting in no functional change.
CXGB4_DCB_STATE_FW_INCOMPLETE = CXGB4_DCB_INPUT_FW_INCOMPLETE = 2
CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
Signed-off-by: Nathan Chancellor <redacted>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Nathan Chancellor <redacted>
[ Upstream commit 258b6d141878530ba1f8fc44db683822389de914 ]
Clang warns when one enumerated type is implicitly converted to another.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:390:4: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
IEEE_FAUX_SYNC(dev, dcb);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h:70:10: note: expanded
from macro 'IEEE_FAUX_SYNC'
CXGB4_DCB_STATE_FW_ALLSYNCED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use the equivalent value of the expected type to silence Clang while
resulting in no functional change.
CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
Signed-off-by: Nathan Chancellor <redacted>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -67,7 +67,7 @@do{\if((__dcb)->dcb_version==FW_PORT_DCB_VER_IEEE)\cxgb4_dcb_state_fsm((__dev),\-CXGB4_DCB_STATE_FW_ALLSYNCED);\+CXGB4_DCB_INPUT_FW_ALLSYNCED);\}while(0)/* States we can be in for a port's Data Center Bridging.
From: Radoslaw Tyl <redacted>
[ Upstream commit 5d826d209164b0752c883607be4cdbbcf7cab494 ]
This patch fix crash when we have restore flow director filters after reset
adapter. In ixgbe_fdir_filter_restore() filter->action is outside of the
rx_ring array, as it has a VF identifier in the upper 32 bits.
Signed-off-by: Radoslaw Tyl <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
From: Chung-Hsien Hsu <redacted>
[ Upstream commit edb6d6885bef82d1eac432dbeca9fbf4ec349d7e ]
Finding a common channel to send an action frame out is required for
some action types. Since a loop with several scan retry is used to find
the channel, a short wait time could be considered for each attempt.
This patch reduces the wait time from 1500 to 450 msec for each action
frame scan.
This patch fixes the WFA p2p certification 5.1.20 failure caused by the
long action frame send time.
Signed-off-by: Chung-Hsien Hsu <redacted>
Signed-off-by: Chi-Hsien Lin <redacted>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
From: Sergey Matyukevich <redacted>
[ Upstream commit d5657b709e2a92a0e581109010765d1d485580df ]
SGI should be passed to wireless core as a part of rate structure.
Otherwise wireless core performs incorrect rate calculation when
SGI is enabled in hardware but not reported to host.
Signed-off-by: Sergey Matyukevich <redacted>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/quantenna/qtnfmac/commands.c | 3 +++
1 file changed, 3 insertions(+)
From: Sergey Matyukevich <redacted>
[ Upstream commit 35da3fe63b8647ce3cc52fccdf186a60710815fb ]
On disconnect wireless core attempts to remove all the supported keys.
Following cfg80211_ops conventions, firmware returns -ENOENT code
for the out-of-bound key indexes. This is a normal behavior,
so no need to report errors for this case.
Signed-off-by: Sergey Matyukevich <redacted>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
@@ -509,9 +509,16 @@ static int qtnf_del_key(struct wiphy *wiphy, struct net_device *dev,intret;ret=qtnf_cmd_send_del_key(vif,key_index,pairwise,mac_addr);-if(ret)-pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n",-vif->mac->macid,vif->vifid,key_index,pairwise);+if(ret){+if(ret==-ENOENT){+pr_debug("VIF%u.%u: key index %d out of bounds\n",+vif->mac->macid,vif->vifid,key_index);+}else{+pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n",+vif->mac->macid,vif->vifid,+key_index,pairwise);+}+}returnret;}
From: Ido Schimmel <redacted>
[ Upstream commit 5050f6ae253ad1307af3486c26fc4f94287078b7 ]
VxLAN FDB updates are sent with the VxLAN device which is not our upper
and will therefore be ignored by current code.
Solve this by checking whether the upper device (bridge) is our upper.
Signed-off-by: Ido Schimmel <redacted>
Reviewed-by: Petr Machata <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -1939,8 +1939,15 @@ static int mlxsw_sp_switchdev_event(struct notifier_block *unused,structnet_device*dev=switchdev_notifier_info_to_dev(ptr);structmlxsw_sp_switchdev_event_work*switchdev_work;structswitchdev_notifier_fdb_info*fdb_info=ptr;+structnet_device*br_dev;-if(!mlxsw_sp_port_dev_lower_find_rcu(dev))+/* Tunnel devices are not our uppers, so check their master instead */+br_dev=netdev_master_upper_dev_get_rcu(dev);+if(!br_dev)+returnNOTIFY_DONE;+if(!netif_is_bridge_master(br_dev))+returnNOTIFY_DONE;+if(!mlxsw_sp_port_dev_lower_find_rcu(br_dev))returnNOTIFY_DONE;switchdev_work=kzalloc(sizeof(*switchdev_work),GFP_ATOMIC);
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 972b66b86f85f4e8201db454f4c3e9d990cf9836 ]
Long/short preamble selection cannot be sampled separately, since it
depends on the BSS state. Because of that, sampling attempts to
currently not used preamble modes are not counted in the statistics,
which leads to CCK rates being sampled too often.
Fix statistics accounting for long/short preamble by increasing the
index where necessary.
Fix excessive CCK rate sampling by dropping unsupported sample attempts.
This improves throughput on 2.4 GHz channels
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/rc80211_minstrel_ht.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 37439f2d6e43ae79e22be9be159f0af157468f82 ]
mi->supported[MINSTREL_CCK_GROUP] needs to be updated
short preamble rates need to be marked as supported regardless of
whether it's currently enabled. Its state can change at any time without
a rate_update call.
Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/rc80211_minstrel_ht.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
From: Pablo Neira Ayuso <pablo@netfilter.org>
[ Upstream commit d701d8117200399d85e63a737d2e4e897932f3b6 ]
Zero pad private area, otherwise we expose private kernel pointer to
userspace. This patch also zeroes the tail area after the ->matchsize
and ->targetsize that results from XT_ALIGN().
Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables")
Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/netfilter/nft_compat.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
From: Li RongQing <redacted>
[ Upstream commit f1193e915748291fb205a908db33bd3debece6e2 ]
This place should want to initialize array, not a element,
so it should be sizeof(array) instead of sizeof(element)
but now this array only has one element, so no error in
this condition that XFRM_MAX_OFFLOAD_DEPTH is 1
Signed-off-by: Li RongQing <redacted>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/xfrm/xfrm_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Sara Sharon <redacted>
[ Upstream commit 8c7fd6a365eb5b2647b2c01918730d0a485b9f85 ]
In the past, we needed to program the keys when entering D3. This was
since we replaced the image. However, now that there is a single
image, this is no longer needed. Note that RSC is sent separately in
a new command. This solves issues with newer devices that support PN
offload. Since driver re-sent the keys, the PN got zeroed and the
receiver dropped the next packets, until PN caught up again.
Signed-off-by: Sara Sharon <redacted>
Signed-off-by: Luca Coelho <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Chung-Hsien Hsu <redacted>
[ Upstream commit fbf07000960d9c8a13fdc17c6de0230d681c7543 ]
The driver sends an action frame down and waits for a completion signal
triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event
to continue the process. However, the action frame could be transmitted
either on the current channel or on an off channel. For the on-channel
case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when
the frame is transmitted, which make the driver always wait a full
timeout duration. This patch has the completion signal be triggered by
receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel
case.
This change fixes WFA p2p certification 5.1.19 failure.
Signed-off-by: Chung-Hsien Hsu <redacted>
Signed-off-by: Chi-Hsien Lin <redacted>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../wireless/broadcom/brcm80211/brcmfmac/p2p.c | 17 +++++++++++++++--
.../wireless/broadcom/brcm80211/brcmfmac/p2p.h | 2 ++
2 files changed, 17 insertions(+), 2 deletions(-)
@@ -1462,10 +1462,12 @@ int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp,return0;if(e->event_code==BRCMF_E_ACTION_FRAME_COMPLETE){-if(e->status==BRCMF_E_STATUS_SUCCESS)+if(e->status==BRCMF_E_STATUS_SUCCESS){set_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED,&p2p->status);-else{+if(!p2p->wait_for_offchan_complete)+complete(&p2p->send_af_done);+}else{set_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK,&p2p->status);/* If there is no ack, we don't need to wait for*WLC_E_ACTION_FRAME_OFFCHAN_COMPLETEevent
From: Nathan Chancellor <redacted>
[ Upstream commit 43ade6ad18416b8fd5bb3c9e9789faa666527eec ]
Clang warns when one enumerated type is converted implicitly to another.
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:4214:42: warning:
implicit conversion from enumeration type 'enum i40e_aq_link_speed' to
different enumeration type 'enum virtchnl_link_speed'
[-Wenum-conversion]
pfe.event_data.link_event.link_speed = I40E_LINK_SPEED_40GB;
~ ^~~~~~~~~~~~~~~~~~~~
1 warning generated.
Use the proper enum from virtchnl_link_speed, which has the same value
as I40E_LINK_SPEED_40GB, VIRTCHNL_LINK_SPEED_40GB. This appears to be
missed by commit ff3f4cc267f6 ("virtchnl: finish conversion to virtchnl
interface").
Link: https://github.com/ClangBuiltLinux/linux/issues/81
Signed-off-by: Nathan Chancellor <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -3191,7 +3191,7 @@ int i40e_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link)vf->link_forced=true;vf->link_up=true;pfe.event_data.link_event.link_status=true;-pfe.event_data.link_event.link_speed=I40E_LINK_SPEED_40GB;+pfe.event_data.link_event.link_speed=VIRTCHNL_LINK_SPEED_40GB;break;caseIFLA_VF_LINK_STATE_DISABLE:vf->link_forced=true;
From: Radoslaw Tyl <redacted>
[ Upstream commit 8d7179b1e2d64b3493c0114916486fe92e6109a9 ]
We have Tx hang when number Tx and XDP queues are more than 64.
In XDP always is MTQC == 0x0 (64TxQs). We need more space for Tx queues.
Signed-off-by: Radoslaw Tyl <redacted>
Tested-by: Andrew Bowers <redacted>
Signed-off-by: Jeff Kirsher <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
From: Chuck Lever <redacted>
[ Upstream commit 3968a8a5310404c2f0b9e4d9f28cab13a12bc4fd ]
For TCP, the logic in xprt_connect_status is currently never invoked
to record a successful connection. Commit 2a4919919a97 ("SUNRPC:
Return EAGAIN instead of ENOTCONN when waking up xprt->pending")
changed the way TCP xprt's are awoken after a connect succeeds.
Instead, change connection-oriented transports to bump connect_count
and compute connect_time the moment that XPRT_CONNECTED is set.
Signed-off-by: Chuck Lever <redacted>
Signed-off-by: Anna Schumaker <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/sunrpc/xprt.c | 14 ++++----------
net/sunrpc/xprtrdma/transport.c | 6 +++++-
net/sunrpc/xprtsock.c | 10 ++++++----
3 files changed, 15 insertions(+), 15 deletions(-)
From: Andrew Zaborowski <redacted>
[ Upstream commit efdfce7270de85a8706d1ea051bef3a7486809ff ]
Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in
NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy.
This is unlikely to affect existing userspace.
Signed-off-by: Andrew Zaborowski <redacted>
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Ben Greear <redacted>
[ Upstream commit 833fd34d743c728afe6d127ef7bee67e7d9199a8 ]
The vdev-start-response message should cause the
completion to fire, even in the error case. Otherwise,
the user still gets no useful information and everything
is blocked until the timeout period.
Add some warning text to print out the invalid status
code to aid debugging, and propagate failure code.
Signed-off-by: Ben Greear <redacted>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath10k/core.h | 1 +
drivers/net/wireless/ath/ath10k/mac.c | 2 +-
drivers/net/wireless/ath/ath10k/wmi.c | 19 ++++++++++++++++---
drivers/net/wireless/ath/ath10k/wmi.h | 8 +++++++-
4 files changed, 25 insertions(+), 5 deletions(-)
@@ -3132,18 +3132,31 @@ void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb){structwmi_vdev_start_ev_argarg={};intret;+u32status;ath10k_dbg(ar,ATH10K_DBG_WMI,"WMI_VDEV_START_RESP_EVENTID\n");+ar->last_wmi_vdev_start_status=0;+ret=ath10k_wmi_pull_vdev_start(ar,skb,&arg);if(ret){ath10k_warn(ar,"failed to parse vdev start event: %d\n",ret);-return;+ar->last_wmi_vdev_start_status=ret;+gotoout;}-if(WARN_ON(__le32_to_cpu(arg.status)))-return;+status=__le32_to_cpu(arg.status);+if(WARN_ON_ONCE(status)){+ath10k_warn(ar,"vdev-start-response reports status error: %d (%s)\n",+status,(status==WMI_VDEV_START_CHAN_INVALID)?+"chan-invalid":"unknown");+/* Setup is done one way or another though, so we should still+*dothecompletion,sodon'treturnhere.+*/+ar->last_wmi_vdev_start_status=-EINVAL;+}+out:complete(&ar->vdev_setup_done);}
@@ -6480,11 +6480,17 @@ struct wmi_ch_info_ev_arg {__le32rx_frame_count;};+/* From 10.4 firmware, not sure all have the same values. */+enumwmi_vdev_start_status{+WMI_VDEV_START_OK=0,+WMI_VDEV_START_CHAN_INVALID,+};+structwmi_vdev_start_ev_arg{__le32vdev_id;__le32req_id;__le32resp_type;/* %WMI_VDEV_RESP_ */-__le32status;+__le32status;/* See wmi_vdev_start_status enum above */};structwmi_peer_kick_ev_arg{
From: YueHaibing <redacted>
[ Upstream commit a9ca7f17c6d240e269a24cbcd76abf9a940309dd ]
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.
Found by coccinelle.
Signed-off-by: YueHaibing <redacted>
Acked-by: Wei Liu <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/xen-netback/interface.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)