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: 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(-)
@@ -185,7 +185,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: 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(-)
@@ -3102,18 +3102,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);}
@@ -6248,11 +6248,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: 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: 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: 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 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: 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: 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: 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: 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: 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(-)