blobmsg_add_u32(&buf, "quality", e->quality);
blobmsg_add_u32(&buf, "quality_max", e->quality_max);
- t = blobmsg_open_table(&buf, "ht_operation");
- blobmsg_add_u32(&buf, "primary_channel", e->ht_chan_info.primary_chan);
- blobmsg_add_string(&buf, "secondary_channel_offset", ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
- blobmsg_add_u32(&buf, "channel_width", ht_chan_width[e->ht_chan_info.chan_width]);
- blobmsg_close_table(&buf, t);
+ if (e->ht_chan_info.primary_chan) {
+ t = blobmsg_open_table(&buf, "ht_operation");
+ blobmsg_add_u32(&buf, "primary_channel", e->ht_chan_info.primary_chan);
+ blobmsg_add_string(&buf, "secondary_channel_offset", ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
+ blobmsg_add_u32(&buf, "channel_width", ht_chan_width[e->ht_chan_info.chan_width]);
+ blobmsg_close_table(&buf, t);
+ }
if (e->vht_chan_info.center_chan_1) {
t = blobmsg_open_table(&buf, "vht_operation");