OSDN Git Service

qtnfmac: set valid edmg in cfg80211_chan_def
authorSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Thu, 13 Feb 2020 11:45:30 +0000 (11:45 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 12 Mar 2020 13:38:57 +0000 (15:38 +0200)
Make sure that edmg field of cfg80211_chan_def structure is properly
initialized by zeros. Otherwise cfg80211_chandef_valid may return
false if edmg fields contain some garbage.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/qlink_util.c

index 1a972bc..30b60d6 100644 (file)
@@ -124,6 +124,8 @@ void qlink_chandef_q2cfg(struct wiphy *wiphy,
        chdef->center_freq1 = le16_to_cpu(qch->center_freq1);
        chdef->center_freq2 = le16_to_cpu(qch->center_freq2);
        chdef->width = qlink_chanwidth_to_nl(qch->width);
+       chdef->edmg.bw_config = 0;
+       chdef->edmg.channels = 0;
 }
 
 void qlink_chandef_cfg2q(const struct cfg80211_chan_def *chdef,