idualwifi7260: C89 fixes.

Change-Id: I8138f4ed4877b3f7e8eb54ad0bc64a60278e8b61
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2734
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Augustin Cavalier 2020-05-17 19:38:01 -04:00 committed by waddlesplash
parent ba5694b017
commit f37d2d10a0
4 changed files with 18 additions and 12 deletions

View File

@ -3570,6 +3570,7 @@ iwm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
if (rate_matched) {
ieee80211_ratectl_tx_complete(ni, txs);
{
int rix = ieee80211_ratectl_rate(vap->iv_bss, NULL, 0);
new_rate = vap->iv_bss->ni_txrate;
if (new_rate != 0 && new_rate != cur_rate) {
@ -3577,6 +3578,7 @@ iwm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
iwm_setrates(sc, in, rix);
iwm_send_lq_cmd(sc, &in->in_lq, FALSE);
}
}
}
return (txs->status != IEEE80211_RATECTL_TX_SUCCESS);
@ -4647,6 +4649,7 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
iwm_enable_beacon_filter(sc, ivp);
iwm_power_update_mac(sc);
iwm_update_quotas(sc, ivp);
{
int rix = ieee80211_ratectl_rate(&in->in_ni, NULL, 0);
iwm_setrates(sc, in, rix);
@ -4657,6 +4660,7 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
iwm_led_enable(sc);
break;
}
default:
break;

View File

@ -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 *

View File

@ -228,6 +228,7 @@ iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
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;
if (paylen > IWM_MAX_CMD_PAYLOAD_SIZE) {
@ -255,6 +256,7 @@ iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
txdata->m = m; /* mbuf will be freed in iwm_cmd_done() */
cmd = mtod(m, struct iwm_device_cmd *);
paddr = seg.ds_addr;
}
} else {
cmd = &ring->cmd[ring->cur];
paddr = txdata->cmd_paddr;

View File

@ -906,7 +906,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;
/*
@ -2161,7 +2161,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 */
@ -2215,7 +2215,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_ALIVE 0x1 */
@ -5163,7 +5163,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;
/**
@ -5301,7 +5301,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;
@ -5404,7 +5404,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 */
/**
@ -5546,7 +5546,7 @@ struct iwm_scan_req_umac {
uint32_t suspend_time;
uint32_t scan_priority;
struct iwm_scan_umac_chan_param channel;
uint8_t data[];
uint8_t data[0];
} v1;
struct {
uint8_t active_dwell;
@ -5560,7 +5560,7 @@ struct iwm_scan_req_umac {
uint32_t suspend_time[2];
uint32_t scan_priority;
struct iwm_scan_umac_chan_param channel;
uint8_t data[];
uint8_t data[0];
} v7;
};
} __packed;
@ -5662,7 +5662,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.
@ -6424,7 +6424,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