idualwifi7260: C89 fixes to appease GCC2.
This commit is contained in:
@@ -1437,9 +1437,8 @@ iwm_nic_rx_init(struct iwm_softc *sc)
|
||||
IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG,
|
||||
IWM_FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL |
|
||||
IWM_FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY | /* HW bug */
|
||||
#ifdef __HAIKU__ /* We don't support mbuf refcounts, are required for multiframe */
|
||||
IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK |
|
||||
#endif
|
||||
/* Haiku doesn't support mbuf refcounts, are required for multiframe */
|
||||
/* IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | */
|
||||
IWM_FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
|
||||
IWM_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K |
|
||||
(IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) |
|
||||
@@ -5539,7 +5538,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
ieee80211_runtask(&sc->sc_ic, &sc->sc_es_task);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case IWM_SCAN_COMPLETE_UMAC: {
|
||||
struct iwm_umac_scan_complete *notif;
|
||||
notif = (void *)pkt->data;
|
||||
|
||||
@@ -203,7 +203,7 @@ enum iwm_phy_db_section_type {
|
||||
struct iwm_phy_db_cmd {
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed;
|
||||
|
||||
/* for parsing of tx power channel group data that comes from the firmware*/
|
||||
@@ -218,7 +218,7 @@ struct iwm_phy_db_chg_txp {
|
||||
struct iwm_calib_res_notif_phy_db {
|
||||
uint16_t type;
|
||||
uint16_t length;
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed;
|
||||
|
||||
struct iwm_phy_db *
|
||||
|
||||
@@ -225,11 +225,12 @@ iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
|
||||
}
|
||||
|
||||
if (paylen > datasz) {
|
||||
size_t totlen;
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_CMD,
|
||||
"large command paylen=%u len0=%u\n",
|
||||
paylen, hcmd->len[0]);
|
||||
/* Command is too large */
|
||||
size_t totlen = hdrlen + paylen;
|
||||
totlen = hdrlen + paylen;
|
||||
if (paylen > IWM_MAX_CMD_PAYLOAD_SIZE) {
|
||||
device_printf(sc->sc_dev,
|
||||
"firmware command too long (%zd bytes)\n",
|
||||
|
||||
@@ -844,7 +844,7 @@ struct iwm_fw_cipher_scheme {
|
||||
*/
|
||||
struct iwm_fw_cscheme_list {
|
||||
uint8_t size;
|
||||
struct iwm_fw_cipher_scheme cs[];
|
||||
struct iwm_fw_cipher_scheme cs[0];
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
@@ -2012,7 +2012,7 @@ struct iwm_nvm_access_cmd {
|
||||
uint16_t type;
|
||||
uint16_t offset;
|
||||
uint16_t length;
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed; /* IWM_NVM_ACCESS_CMD_API_S_VER_2 */
|
||||
|
||||
#define IWM_NUM_OF_FW_PAGING_BLOCKS 33 /* 32 for data and 1 block for CSS */
|
||||
@@ -2066,7 +2066,7 @@ struct iwm_nvm_access_resp {
|
||||
uint16_t length;
|
||||
uint16_t type;
|
||||
uint16_t status;
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed; /* IWM_NVM_ACCESS_CMD_RESP_API_S_VER_2 */
|
||||
|
||||
/* IWM_MVM_ALIVE 0x1 */
|
||||
@@ -4932,7 +4932,7 @@ struct iwm_scan_req_lmac {
|
||||
uint32_t delay;
|
||||
struct iwm_scan_schedule_lmac schedule[IWM_MAX_SCHED_SCAN_PLANS];
|
||||
struct iwm_scan_channel_opt channel_opt[2];
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
@@ -5100,7 +5100,7 @@ struct iwm_lmac_scan_complete_notif {
|
||||
uint8_t last_channel;
|
||||
uint32_t tsf_low;
|
||||
uint32_t tsf_high;
|
||||
struct iwm_scan_results_notif results[];
|
||||
struct iwm_scan_results_notif results[0];
|
||||
} __packed;
|
||||
|
||||
|
||||
@@ -5203,7 +5203,7 @@ struct iwm_scan_config {
|
||||
uint8_t mac_addr[IEEE80211_ADDR_LEN];
|
||||
uint8_t bcast_sta_id;
|
||||
uint8_t channel_flags;
|
||||
uint8_t channel_array[];
|
||||
uint8_t channel_array[0];
|
||||
} __packed; /* SCAN_CONFIG_DB_CMD_API_S */
|
||||
|
||||
/**
|
||||
@@ -5322,7 +5322,7 @@ struct iwm_scan_req_umac {
|
||||
uint8_t channel_flags;
|
||||
uint8_t n_channels;
|
||||
uint16_t reserved;
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
@@ -5419,7 +5419,7 @@ struct iwm_umac_scan_iter_complete_notif {
|
||||
uint8_t last_channel;
|
||||
uint32_t tsf_low;
|
||||
uint32_t tsf_high;
|
||||
struct iwm_scan_results_notif results[];
|
||||
struct iwm_scan_results_notif results[0];
|
||||
} __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_1 */
|
||||
|
||||
/* Please keep this enum *SORTED* by hex value.
|
||||
@@ -6086,7 +6086,7 @@ struct iwm_rx_packet {
|
||||
*/
|
||||
uint32_t len_n_flags;
|
||||
struct iwm_cmd_header hdr;
|
||||
uint8_t data[];
|
||||
uint8_t data[0];
|
||||
} __packed;
|
||||
|
||||
#define IWM_FH_RSCSR_FRAME_SIZE_MSK 0x00003fff
|
||||
|
||||
@@ -233,7 +233,7 @@ struct iwm_nvm_data {
|
||||
uint8_t max_tx_pwr_half_dbm;
|
||||
|
||||
boolean_t lar_enabled;
|
||||
uint16_t nvm_ch_flags[];
|
||||
uint16_t nvm_ch_flags[0];
|
||||
};
|
||||
|
||||
/* max bufs per tfd the driver will use */
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \
|
||||
__unused
|
||||
#else
|
||||
#define _Static_assert(x, y) struct __hack
|
||||
#define _Static_assert(x, y)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user