@@ -573,6 +573,21 @@ static int nl80211_msg_put_channel(struct sk_buff *msg,
573
573
}
574
574
}
575
575
576
+ if (large ) {
577
+ if ((chan -> flags & IEEE80211_CHAN_NO_HT40MINUS ) &&
578
+ nla_put_flag (msg , NL80211_FREQUENCY_ATTR_NO_HT40_MINUS ))
579
+ goto nla_put_failure ;
580
+ if ((chan -> flags & IEEE80211_CHAN_NO_HT40PLUS ) &&
581
+ nla_put_flag (msg , NL80211_FREQUENCY_ATTR_NO_HT40_PLUS ))
582
+ goto nla_put_failure ;
583
+ if ((chan -> flags & IEEE80211_CHAN_NO_80MHZ ) &&
584
+ nla_put_flag (msg , NL80211_FREQUENCY_ATTR_NO_80MHZ ))
585
+ goto nla_put_failure ;
586
+ if ((chan -> flags & IEEE80211_CHAN_NO_160MHZ ) &&
587
+ nla_put_flag (msg , NL80211_FREQUENCY_ATTR_NO_160MHZ ))
588
+ goto nla_put_failure ;
589
+ }
590
+
576
591
if (nla_put_u32 (msg , NL80211_FREQUENCY_ATTR_MAX_TX_POWER ,
577
592
DBM_TO_MBM (chan -> max_power )))
578
593
goto nla_put_failure ;
@@ -1137,6 +1152,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
1137
1152
const struct ieee80211_txrx_stypes * mgmt_stypes =
1138
1153
dev -> wiphy .mgmt_stypes ;
1139
1154
long start = 0 , start_chan = 0 , start_band = 0 ;
1155
+ u32 features ;
1140
1156
1141
1157
hdr = nl80211hdr_put (msg , portid , seq , flags , NL80211_CMD_NEW_WIPHY );
1142
1158
if (!hdr )
@@ -1461,8 +1477,15 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
1461
1477
dev -> wiphy .ap_sme_capa ))
1462
1478
goto nla_put_failure ;
1463
1479
1464
- if (nla_put_u32 (msg , NL80211_ATTR_FEATURE_FLAGS ,
1465
- dev -> wiphy .features ))
1480
+ features = dev -> wiphy .features ;
1481
+ /*
1482
+ * We can only add the per-channel limit information if the
1483
+ * dump is split, otherwise it makes it too big. Therefore
1484
+ * only advertise it in that case.
1485
+ */
1486
+ if (split )
1487
+ features |= NL80211_FEATURE_ADVERTISE_CHAN_LIMITS ;
1488
+ if (nla_put_u32 (msg , NL80211_ATTR_FEATURE_FLAGS , features ))
1466
1489
goto nla_put_failure ;
1467
1490
1468
1491
if (dev -> wiphy .ht_capa_mod_mask &&
@@ -1490,7 +1513,14 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
1490
1513
(* split_start )++ ;
1491
1514
break ;
1492
1515
case 9 :
1493
- /* placeholder */
1516
+ if (dev -> wiphy .extended_capabilities &&
1517
+ (nla_put (msg , NL80211_ATTR_EXT_CAPA ,
1518
+ dev -> wiphy .extended_capabilities_len ,
1519
+ dev -> wiphy .extended_capabilities ) ||
1520
+ nla_put (msg , NL80211_ATTR_EXT_CAPA_MASK ,
1521
+ dev -> wiphy .extended_capabilities_len ,
1522
+ dev -> wiphy .extended_capabilities_mask )))
1523
+ goto nla_put_failure ;
1494
1524
1495
1525
/* done */
1496
1526
* split_start = 0 ;
0 commit comments