On 1 December 2014 at 15:45, Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> wrote: [...] > @@ -562,6 +562,17 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name) > ar->otp_len = ie_len; > > break; > + case ATH10K_FW_IE_WMI_OP_VERSION: > + if (ie_len != sizeof(u32)) > + break; > + > + version = (__le32 *)data; > + > + ar->wmi.op_version = le32_to_cpup(version); > + > + ath10k_dbg(ar, ATH10K_DBG_BOOT, "found fw ie wmi op version %d\n", > + ar->wmi.op_version); Hmm.. wouldn't it make sense to have a ATH10K_FW_WMI_OP_VERSION_MAX (or _LAST) and verify if the IE value doesn't exceed the last known value? This way switch()es won't need default handler by design and thus we'll get the benefit of compiler telling us about unhandled cases when we add new enums. Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html