|
|
@@ -2299,6 +2299,8 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
|
|
|
|
|
|
control_freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
|
|
|
|
|
|
+ memset(chandef, 0, sizeof(*chandef));
|
|
|
+
|
|
|
chandef->chan = ieee80211_get_channel(&rdev->wiphy, control_freq);
|
|
|
chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
|
|
|
chandef->center_freq1 = control_freq;
|
|
|
@@ -2819,7 +2821,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
|
|
|
|
|
if (rdev->ops->get_channel) {
|
|
|
int ret;
|
|
|
- struct cfg80211_chan_def chandef;
|
|
|
+ struct cfg80211_chan_def chandef = {};
|
|
|
|
|
|
ret = rdev_get_channel(rdev, wdev, &chandef);
|
|
|
if (ret == 0) {
|