+static void rpc_iwinfo_call_hw_ht_mode()
+{
+ const char *hwmode_str;
+ const char *htmode_str;
+ int32_t htmode = 0;
+
+ if (iw->htmode(ifname, &htmode))
+ return;
+
+ switch (htmode) {
+ case IWINFO_HTMODE_HT20:
+ htmode_str = "HT20";
+ hwmode_str = "n";
+ break;
+ case IWINFO_HTMODE_HT40:
+ htmode_str = "HT40";
+ hwmode_str = "n";
+ break;
+ case IWINFO_HTMODE_VHT80:
+ htmode_str = "VHT80";
+ hwmode_str = "ac";
+ break;
+ case IWINFO_HTMODE_VHT80_80:
+ htmode_str = "VHT80+80";
+ hwmode_str = "ac";
+ break;
+ case IWINFO_HTMODE_VHT160:
+ htmode_str = "VHT160";
+ hwmode_str = "ac";
+ break;
+ case IWINFO_HTMODE_NOHT:
+ htmode_str = "20";
+ hwmode_str = "a/g";
+ break;
+ default:
+ htmode_str = hwmode_str = "unknown";
+ break;
+ }
+ blobmsg_add_string(&buf, "hwmode", hwmode_str);
+ blobmsg_add_string(&buf, "htmode", htmode_str);
+}
+