|
@@ -2541,7 +2541,9 @@ static int mac80211_hwsim_get_radio(struct sk_buff *skb,
|
|
|
if (cb)
|
|
|
genl_dump_check_consistent(cb, hdr, &hwsim_genl_family);
|
|
|
|
|
|
- param.reg_alpha2 = data->alpha2;
|
|
|
+ if (data->alpha2[0] && data->alpha2[1])
|
|
|
+ param.reg_alpha2 = data->alpha2;
|
|
|
+
|
|
|
param.reg_strict = !!(data->hw->wiphy->regulatory_flags &
|
|
|
REGULATORY_STRICT_REG);
|
|
|
param.p2p_device = !!(data->hw->wiphy->interface_modes &
|