Pradeep Kumar Chitrapu <pradeepc@xxxxxxxxxxxxxx> writes: > With addition of 6Ghz channels, it is possible that wmi buffer size can > exceed the maximum wmi buffer size. So iterate over the channel list, > and send multiple messages till channel list is empty. > Also mark PSC channel flag for 6GHz channels accordingly. > > Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@xxxxxxxxxxxxxx> > --- > drivers/net/wireless/ath/ath11k/wmi.c | 170 ++++++++++++++------------ > drivers/net/wireless/ath/ath11k/wmi.h | 3 + > 2 files changed, 98 insertions(+), 75 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c > index 239a336f55f4..ad3a7b68d308 100644 > --- a/drivers/net/wireless/ath/ath11k/wmi.c > +++ b/drivers/net/wireless/ath/ath11k/wmi.c > @@ -2194,91 +2194,111 @@ int ath11k_wmi_send_scan_chan_list_cmd(struct ath11k *ar, > struct channel_param *tchan_info; > struct wmi_tlv *tlv; > void *ptr; > - int i, ret, len; > + int i, ret = 0, len; > + u16 num_send_chans, num_sends = 0, max_chan_limit = 0; > u32 *reg1, *reg2; > [...] > + ret = ath11k_wmi_cmd_send(wmi, skb, WMI_SCAN_CHAN_LIST_CMDID); > + if (ret) { > + ath11k_warn(ar->ab, "failed to send WMI_SCAN_CHAN_LIST cmd\n"); > + dev_kfree_skb(skb); > + goto end; > + } > + > + num_sends++; > + } > +end: > return ret; > } The end label is useless, I removed that and replaced the goto with 'return ret'. And I replaced the return in the end to 'return 0' which made it possible to not initialise the ret variable. Please check my changes in the pending branch (which I will push shortly). -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches