svn commit: r313315 - head/sys/dev/iwm
Adrian Chadd
adrian at FreeBSD.org
Mon Feb 6 05:07:17 UTC 2017
Author: adrian
Date: Mon Feb 6 05:07:15 2017
New Revision: 313315
URL: https://svnweb.freebsd.org/changeset/base/313315
Log:
[iwm] Get rid of some gratuitous constant renaming wrt. Linux iwlwifi.
* IWM_UCODE_SECT_MAX -> IWM_UCODE_SECTION_MAX
* IWM_UCODE_TYPE_* -> IWM_UCODE_* (except for IWM_UCODE_TYPE_MAX which
stays).
Obtained from: DragonflyBSD commit ff4d1fc3ed002c9fb362423da6c45d711b65658a
Modified:
head/sys/dev/iwm/if_iwm.c
head/sys/dev/iwm/if_iwmvar.h
Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:03:41 2017 (r313314)
+++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:07:15 2017 (r313315)
@@ -490,7 +490,7 @@ iwm_firmware_store_section(struct iwm_so
return EINVAL;
fws = &sc->sc_fw.fw_sects[type];
- if (fws->fw_count >= IWM_UCODE_SECT_MAX)
+ if (fws->fw_count >= IWM_UCODE_SECTION_MAX)
return EINVAL;
fwone = &fws->fw_sect[fws->fw_count];
@@ -558,7 +558,7 @@ iwm_read_firmware(struct iwm_softc *sc,
size_t len;
if (fw->fw_status == IWM_FW_STATUS_DONE &&
- ucode_type != IWM_UCODE_TYPE_INIT)
+ ucode_type != IWM_UCODE_INIT)
return 0;
while (fw->fw_status == IWM_FW_STATUS_INPROGRESS)
@@ -716,9 +716,9 @@ iwm_read_firmware(struct iwm_softc *sc,
}
case IWM_UCODE_TLV_SEC_RT:
if ((error = iwm_firmware_store_section(sc,
- IWM_UCODE_TYPE_REGULAR, tlv_data, tlv_len)) != 0) {
+ IWM_UCODE_REGULAR, tlv_data, tlv_len)) != 0) {
device_printf(sc->sc_dev,
- "%s: IWM_UCODE_TYPE_REGULAR: iwm_firmware_store_section() failed; %d\n",
+ "%s: IWM_UCODE_REGULAR: iwm_firmware_store_section() failed; %d\n",
__func__,
error);
goto parse_out;
@@ -726,9 +726,9 @@ iwm_read_firmware(struct iwm_softc *sc,
break;
case IWM_UCODE_TLV_SEC_INIT:
if ((error = iwm_firmware_store_section(sc,
- IWM_UCODE_TYPE_INIT, tlv_data, tlv_len)) != 0) {
+ IWM_UCODE_INIT, tlv_data, tlv_len)) != 0) {
device_printf(sc->sc_dev,
- "%s: IWM_UCODE_TYPE_INIT: iwm_firmware_store_section() failed; %d\n",
+ "%s: IWM_UCODE_INIT: iwm_firmware_store_section() failed; %d\n",
__func__,
error);
goto parse_out;
@@ -736,9 +736,9 @@ iwm_read_firmware(struct iwm_softc *sc,
break;
case IWM_UCODE_TLV_SEC_WOWLAN:
if ((error = iwm_firmware_store_section(sc,
- IWM_UCODE_TYPE_WOW, tlv_data, tlv_len)) != 0) {
+ IWM_UCODE_WOWLAN, tlv_data, tlv_len)) != 0) {
device_printf(sc->sc_dev,
- "%s: IWM_UCODE_TYPE_WOW: iwm_firmware_store_section() failed; %d\n",
+ "%s: IWM_UCODE_WOWLAN: iwm_firmware_store_section() failed; %d\n",
__func__,
error);
goto parse_out;
@@ -829,7 +829,7 @@ iwm_read_firmware(struct iwm_softc *sc,
case IWM_UCODE_TLV_SEC_RT_USNIFFER:
if ((error = iwm_firmware_store_section(sc,
- IWM_UCODE_TYPE_REGULAR_USNIFFER, tlv_data,
+ IWM_UCODE_REGULAR_USNIFFER, tlv_data,
tlv_len)) != 0)
goto parse_out;
break;
@@ -2492,7 +2492,7 @@ iwm_load_cpu_sections_8000(struct iwm_so
(*first_ucode_section)++;
}
- for (i = *first_ucode_section; i < IWM_UCODE_SECT_MAX; i++) {
+ for (i = *first_ucode_section; i < IWM_UCODE_SECTION_MAX; i++) {
last_read_idx = i;
data = fws->fw_sect[i].fws_data;
dlen = fws->fw_sect[i].fws_len;
@@ -2764,7 +2764,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc
sc->sc_init_complete = 0;
if ((error = iwm_mvm_load_ucode_wait_alive(sc,
- IWM_UCODE_TYPE_INIT)) != 0) {
+ IWM_UCODE_INIT)) != 0) {
device_printf(sc->sc_dev, "failed to load init firmware\n");
return error;
}
@@ -4706,7 +4706,7 @@ iwm_init_hw(struct iwm_softc *sc)
}
/* omstart, this time with the regular firmware */
- error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_REGULAR);
+ error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_REGULAR);
if (error) {
device_printf(sc->sc_dev, "could not load firmware\n");
goto error;
Modified: head/sys/dev/iwm/if_iwmvar.h
==============================================================================
--- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:03:41 2017 (r313314)
+++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:07:15 2017 (r313315)
@@ -137,7 +137,7 @@ struct iwm_tx_radiotap_header {
(1 << IEEE80211_RADIOTAP_CHANNEL))
-#define IWM_UCODE_SECT_MAX 16
+#define IWM_UCODE_SECTION_MAX 16
#define IWM_FWDMASEGSZ (192*1024)
#define IWM_FWDMASEGSZ_8000 (320*1024)
/* sanity check value */
@@ -152,11 +152,21 @@ struct iwm_tx_radiotap_header {
#define IWM_FW_STATUS_INPROGRESS 1
#define IWM_FW_STATUS_DONE 2
+/**
+ * enum iwm_ucode_type
+ *
+ * The type of ucode.
+ *
+ * @IWM_UCODE_REGULAR: Normal runtime ucode
+ * @IWM_UCODE_INIT: Initial ucode
+ * @IWM_UCODE_WOWLAN: Wake on Wireless enabled ucode
+ * @IWM_UCODE_REGULAR_USNIFFER: Normal runtime ucode when using usniffer image
+ */
enum iwm_ucode_type {
- IWM_UCODE_TYPE_REGULAR,
- IWM_UCODE_TYPE_INIT,
- IWM_UCODE_TYPE_WOW,
- IWM_UCODE_TYPE_REGULAR_USNIFFER,
+ IWM_UCODE_REGULAR,
+ IWM_UCODE_INIT,
+ IWM_UCODE_WOWLAN,
+ IWM_UCODE_REGULAR_USNIFFER,
IWM_UCODE_TYPE_MAX
};
@@ -169,7 +179,7 @@ struct iwm_fw_info {
const void *fws_data;
uint32_t fws_len;
uint32_t fws_devoff;
- } fw_sect[IWM_UCODE_SECT_MAX];
+ } fw_sect[IWM_UCODE_SECTION_MAX];
int fw_count;
} fw_sects[IWM_UCODE_TYPE_MAX];
More information about the svn-src-all
mailing list