@@ -1973,6 +1973,14 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
chantype);
return -EINVAL;
}
+
+ if (info->attrs[NL80211_ATTR_CHANNEL_WIDTH]) {
+ chandef->width =
+ nla_get_u32(info->attrs[NL80211_ATTR_CHANNEL_WIDTH]);
+ }
+ pr_err("parse-chandef, ctype: width: %d addr-cwidth: %p\n",
+ chandef->width, info->attrs[NL80211_ATTR_CHANNEL_WIDTH]);
+ WARN_ON(chandef->width == 0);
} else if (info->attrs[NL80211_ATTR_CHANNEL_WIDTH]) {
chandef->width =
nla_get_u32(info->attrs[NL80211_ATTR_CHANNEL_WIDTH]);
@@ -1986,6 +1994,9 @@ static int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
info->attrs[NL80211_ATTR_CENTER_FREQ2]);
}
+ pr_err("parse-chandef: width: %d addr-cwidth: %p\n",
+ chandef->width, info->attrs[NL80211_ATTR_CHANNEL_WIDTH]);
+
if (!cfg80211_chandef_valid(chandef)) {
pr_err("parse-chandef: chandef is not valid\n");
return -EINVAL;