Commit d0f63b20 authored by Luciano Coelho's avatar Luciano Coelho Committed by John W. Linville
Browse files

wl1271: fix endianess issues



We were not handling endianess correctly.  The wl1271 chip runs on
little-endian values.  This patch makes sure that all the communication with
the wl1271 firmware is done in little-endian by using cpu_to_le* and
le*_to_cpu where appropriate.

Also, all the struct definitions for data exchanged with the firmware has
been changed to use __le16/32 types instead of u16/32.

This fixes a few sparse warnings, such as these:

drivers/net/wireless/wl12xx/wl1271_cmd.c:554:42: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:555:42: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:577:58: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:579:58: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:676:18: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:787:22: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:789:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_tx.c:98:47: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_acx.c:932:32: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_boot.c:191:32: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_boot.c:197:38: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_boot.c:199:37: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_init.c:255:40: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_init.c:275:53: warning: incorrect type in assignment (different base types)
Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0b5b72da
......@@ -283,15 +283,15 @@ struct wl1271_debugfs {
/* FW status registers */
struct wl1271_fw_status {
u32 intr;
__le32 intr;
u8 fw_rx_counter;
u8 drv_rx_counter;
u8 reserved;
u8 tx_results_counter;
u32 rx_pkt_descs[NUM_RX_PKT_DESC];
u32 tx_released_blks[NUM_TX_QUEUES];
u32 fw_localtime;
u32 padding[2];
__le32 rx_pkt_descs[NUM_RX_PKT_DESC];
__le32 tx_released_blks[NUM_TX_QUEUES];
__le32 fw_localtime;
__le32 padding[2];
} __attribute__ ((packed));
struct wl1271_rx_mem_pool_addr {
......
......@@ -210,7 +210,7 @@ int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl)
goto out;
}
acx->lifetime = wl->conf.rx.rx_msdu_life_time;
acx->lifetime = cpu_to_le32(wl->conf.rx.rx_msdu_life_time);
ret = wl1271_cmd_configure(wl, DOT11_RX_MSDU_LIFE_TIME,
acx, sizeof(*acx));
if (ret < 0) {
......@@ -236,8 +236,8 @@ int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter)
goto out;
}
rx_config->config_options = config;
rx_config->filter_options = filter;
rx_config->config_options = cpu_to_le32(config);
rx_config->filter_options = cpu_to_le32(filter);
ret = wl1271_cmd_configure(wl, ACX_RX_CFG,
rx_config, sizeof(*rx_config));
......@@ -264,7 +264,7 @@ int wl1271_acx_pd_threshold(struct wl1271 *wl)
goto out;
}
pd->threshold = wl->conf.rx.packet_detection_threshold;
pd->threshold = cpu_to_le32(wl->conf.rx.packet_detection_threshold);
ret = wl1271_cmd_configure(wl, ACX_PD_THRESHOLD, pd, sizeof(*pd));
if (ret < 0) {
......@@ -348,8 +348,8 @@ int wl1271_acx_service_period_timeout(struct wl1271 *wl)
wl1271_debug(DEBUG_ACX, "acx service period timeout");
rx_timeout->ps_poll_timeout = wl->conf.rx.ps_poll_timeout;
rx_timeout->upsd_timeout = wl->conf.rx.upsd_timeout;
rx_timeout->ps_poll_timeout = cpu_to_le16(wl->conf.rx.ps_poll_timeout);
rx_timeout->upsd_timeout = cpu_to_le16(wl->conf.rx.upsd_timeout);
ret = wl1271_cmd_configure(wl, ACX_SERVICE_PERIOD_TIMEOUT,
rx_timeout, sizeof(*rx_timeout));
......@@ -377,7 +377,7 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold)
goto out;
}
rts->threshold = rts_threshold;
rts->threshold = cpu_to_le16(rts_threshold);
ret = wl1271_cmd_configure(wl, DOT11_RTS_THRESHOLD, rts, sizeof(*rts));
if (ret < 0) {
......@@ -494,8 +494,8 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl)
goto out;
}
acx->synch_fail_thold = wl->conf.conn.synch_fail_thold;
acx->bss_lose_timeout = wl->conf.conn.bss_lose_timeout;
acx->synch_fail_thold = cpu_to_le32(wl->conf.conn.synch_fail_thold);
acx->bss_lose_timeout = cpu_to_le32(wl->conf.conn.bss_lose_timeout);
ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
acx, sizeof(*acx));
......@@ -552,16 +552,18 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl)
}
/* BT-WLAN coext parameters */
param->per_threshold = c->per_threshold;
param->max_scan_compensation_time = c->max_scan_compensation_time;
param->nfs_sample_interval = c->nfs_sample_interval;
param->per_threshold = cpu_to_le32(c->per_threshold);
param->max_scan_compensation_time =
cpu_to_le32(c->max_scan_compensation_time);
param->nfs_sample_interval = cpu_to_le16(c->nfs_sample_interval);
param->load_ratio = c->load_ratio;
param->auto_ps_mode = c->auto_ps_mode;
param->probe_req_compensation = c->probe_req_compensation;
param->scan_window_compensation = c->scan_window_compensation;
param->antenna_config = c->antenna_config;
param->beacon_miss_threshold = c->beacon_miss_threshold;
param->rate_adaptation_threshold = c->rate_adaptation_threshold;
param->rate_adaptation_threshold =
cpu_to_le32(c->rate_adaptation_threshold);
param->rate_adaptation_snr = c->rate_adaptation_snr;
ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
......@@ -588,7 +590,7 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)
goto out;
}
detection->rx_cca_threshold = wl->conf.rx.rx_cca_threshold;
detection->rx_cca_threshold = cpu_to_le16(wl->conf.rx.rx_cca_threshold);
detection->tx_energy_detection = wl->conf.tx.tx_energy_detection;
ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD,
......@@ -616,8 +618,8 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl)
goto out;
}
bb->beacon_rx_timeout = wl->conf.conn.beacon_rx_timeout;
bb->broadcast_timeout = wl->conf.conn.broadcast_timeout;
bb->beacon_rx_timeout = cpu_to_le16(wl->conf.conn.beacon_rx_timeout);
bb->broadcast_timeout = cpu_to_le16(wl->conf.conn.broadcast_timeout);
bb->rx_broadcast_in_ps = wl->conf.conn.rx_broadcast_in_ps;
bb->ps_poll_threshold = wl->conf.conn.ps_poll_threshold;
......@@ -645,7 +647,7 @@ int wl1271_acx_aid(struct wl1271 *wl, u16 aid)
goto out;
}
acx_aid->aid = aid;
acx_aid->aid = cpu_to_le16(aid);
ret = wl1271_cmd_configure(wl, ACX_AID, acx_aid, sizeof(*acx_aid));
if (ret < 0) {
......@@ -672,9 +674,8 @@ int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask)
}
/* high event mask is unused */
mask->high_event_mask = 0xffffffff;
mask->event_mask = event_mask;
mask->high_event_mask = cpu_to_le32(0xffffffff);
mask->event_mask = cpu_to_le32(event_mask);
ret = wl1271_cmd_configure(wl, ACX_EVENT_MBOX_MASK,
mask, sizeof(*mask));
......@@ -773,8 +774,8 @@ int wl1271_acx_rate_policies(struct wl1271 *wl, u32 enabled_rates)
}
/* configure one default (one-size-fits-all) rate class */
acx->rate_class_cnt = 1;
acx->rate_class[0].enabled_rates = enabled_rates;
acx->rate_class_cnt = cpu_to_le32(1);
acx->rate_class[0].enabled_rates = cpu_to_le32(enabled_rates);
acx->rate_class[0].short_retry_limit = c->short_retry_limit;
acx->rate_class[0].long_retry_limit = c->long_retry_limit;
acx->rate_class[0].aflags = c->aflags;
......@@ -808,10 +809,10 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl)
struct conf_tx_ac_category *c = &(wl->conf.tx.ac_conf[i]);
acx->ac = c->ac;
acx->cw_min = c->cw_min;
acx->cw_max = c->cw_max;
acx->cw_max = cpu_to_le16(c->cw_max);
acx->aifsn = c->aifsn;
acx->reserved = 0;
acx->tx_op_limit = c->tx_op_limit;
acx->tx_op_limit = cpu_to_le16(c->tx_op_limit);
ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
if (ret < 0) {
......@@ -847,8 +848,8 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl)
acx->tsid = c->tsid;
acx->ps_scheme = c->ps_scheme;
acx->ack_policy = c->ack_policy;
acx->apsd_conf[0] = c->apsd_conf[0];
acx->apsd_conf[1] = c->apsd_conf[1];
acx->apsd_conf[0] = cpu_to_le32(c->apsd_conf[0]);
acx->apsd_conf[1] = cpu_to_le32(c->apsd_conf[1]);
ret = wl1271_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx));
if (ret < 0) {
......@@ -876,7 +877,7 @@ int wl1271_acx_frag_threshold(struct wl1271 *wl)
goto out;
}
acx->frag_threshold = wl->conf.tx.frag_threshold;
acx->frag_threshold = cpu_to_le16(wl->conf.tx.frag_threshold);
ret = wl1271_cmd_configure(wl, ACX_FRAG_CFG, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("Setting of frag threshold failed: %d", ret);
......@@ -902,8 +903,8 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl)
goto out;
}
acx->tx_compl_timeout = wl->conf.tx.tx_compl_timeout;
acx->tx_compl_threshold = wl->conf.tx.tx_compl_threshold;
acx->tx_compl_timeout = cpu_to_le16(wl->conf.tx.tx_compl_timeout);
acx->tx_compl_threshold = cpu_to_le16(wl->conf.tx.tx_compl_threshold);
ret = wl1271_cmd_configure(wl, ACX_TX_CONFIG_OPT, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("Setting of tx options failed: %d", ret);
......@@ -929,11 +930,11 @@ int wl1271_acx_mem_cfg(struct wl1271 *wl)
}
/* memory config */
mem_conf->num_stations = cpu_to_le16(DEFAULT_NUM_STATIONS);
mem_conf->num_stations = DEFAULT_NUM_STATIONS;
mem_conf->rx_mem_block_num = ACX_RX_MEM_BLOCKS;
mem_conf->tx_min_mem_block_num = ACX_TX_MIN_MEM_BLOCKS;
mem_conf->num_ssid_profiles = ACX_NUM_SSID_PROFILES;
mem_conf->total_tx_descriptors = ACX_TX_DESCRIPTORS;
mem_conf->total_tx_descriptors = cpu_to_le32(ACX_TX_DESCRIPTORS);
ret = wl1271_cmd_configure(wl, ACX_MEM_CFG, mem_conf,
sizeof(*mem_conf));
......@@ -973,7 +974,8 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl)
}
/* initialize TX block book keeping */
wl->tx_blocks_available = wl->target_mem_map->num_tx_mem_blocks;
wl->tx_blocks_available =
le32_to_cpu(wl->target_mem_map->num_tx_mem_blocks);
wl1271_debug(DEBUG_TX, "available tx blocks: %d",
wl->tx_blocks_available);
......@@ -993,9 +995,9 @@ int wl1271_acx_init_rx_interrupt(struct wl1271 *wl)
goto out;
}
rx_conf->threshold = wl->conf.rx.irq_pkt_threshold;
rx_conf->timeout = wl->conf.rx.irq_timeout;
rx_conf->mblk_threshold = wl->conf.rx.irq_blk_threshold;
rx_conf->threshold = cpu_to_le16(wl->conf.rx.irq_pkt_threshold);
rx_conf->timeout = cpu_to_le16(wl->conf.rx.irq_timeout);
rx_conf->mblk_threshold = cpu_to_le16(wl->conf.rx.irq_blk_threshold);
rx_conf->queue_type = wl->conf.rx.queue_type;
ret = wl1271_cmd_configure(wl, ACX_RX_CONFIG_OPT, rx_conf,
......
......@@ -71,10 +71,10 @@ struct acx_header {
struct wl1271_cmd_header cmd;
/* acx (or information element) header */
u16 id;
__le16 id;
/* payload length (not including headers */
u16 len;
__le16 len;
} __attribute__ ((packed));
struct acx_error_counter {
......@@ -83,21 +83,21 @@ struct acx_error_counter {
/* The number of PLCP errors since the last time this */
/* information element was interrogated. This field is */
/* automatically cleared when it is interrogated.*/
u32 PLCP_error;
__le32 PLCP_error;
/* The number of FCS errors since the last time this */
/* information element was interrogated. This field is */
/* automatically cleared when it is interrogated.*/
u32 FCS_error;
__le32 FCS_error;
/* The number of MPDUs without PLCP header errors received*/
/* since the last time this information element was interrogated. */
/* This field is automatically cleared when it is interrogated.*/
u32 valid_frame;
__le32 valid_frame;
/* the number of missed sequence numbers in the squentially */
/* values of frames seq numbers */
u32 seq_num_miss;
__le32 seq_num_miss;
} __attribute__ ((packed));
struct acx_revision {
......@@ -126,7 +126,7 @@ struct acx_revision {
* (1 = first spin, 2 = second spin, and so on).
* bits 24 - 31: Chip ID - The WiLink chip ID.
*/
u32 hw_version;
__le32 hw_version;
} __attribute__ ((packed));
enum wl1271_psm_mode {
......@@ -186,7 +186,7 @@ struct acx_rx_msdu_lifetime {
* The maximum amount of time, in TU, before the
* firmware discards the MSDU.
*/
u32 lifetime;
__le32 lifetime;
} __attribute__ ((packed));
/*
......@@ -273,14 +273,14 @@ struct acx_rx_msdu_lifetime {
struct acx_rx_config {
struct acx_header header;
u32 config_options;
u32 filter_options;
__le32 config_options;
__le32 filter_options;
} __attribute__ ((packed));
struct acx_packet_detection {
struct acx_header header;
u32 threshold;
__le32 threshold;
} __attribute__ ((packed));
......@@ -317,14 +317,14 @@ struct acx_dot11_grp_addr_tbl {
struct acx_rx_timeout {
struct acx_header header;
u16 ps_poll_timeout;
u16 upsd_timeout;
__le16 ps_poll_timeout;
__le16 upsd_timeout;
} __attribute__ ((packed));
struct acx_rts_threshold {
struct acx_header header;
u16 threshold;
__le16 threshold;
u8 pad[2];
} __attribute__ ((packed));
......@@ -388,8 +388,8 @@ struct acx_beacon_filter_ie_table {
struct acx_conn_monit_params {
struct acx_header header;
u32 synch_fail_thold; /* number of beacons missed */
u32 bss_lose_timeout; /* number of TU's from synch fail */
__le32 synch_fail_thold; /* number of beacons missed */
__le32 bss_lose_timeout; /* number of TU's from synch fail */
} __attribute__ ((packed));
enum {
......@@ -466,16 +466,16 @@ struct acx_smart_reflex_config_params {
struct acx_bt_wlan_coex_param {
struct acx_header header;
u32 per_threshold;
u32 max_scan_compensation_time;
u16 nfs_sample_interval;
__le32 per_threshold;
__le32 max_scan_compensation_time;
__le16 nfs_sample_interval;
u8 load_ratio;
u8 auto_ps_mode;
u8 probe_req_compensation;
u8 scan_window_compensation;
u8 antenna_config;
u8 beacon_miss_threshold;
u32 rate_adaptation_threshold;
__le32 rate_adaptation_threshold;
s8 rate_adaptation_snr;
u8 padding[3];
} __attribute__ ((packed));
......@@ -484,7 +484,7 @@ struct acx_energy_detection {
struct acx_header header;
/* The RX Clear Channel Assessment threshold in the PHY */
u16 rx_cca_threshold;
__le16 rx_cca_threshold;
u8 tx_energy_detection;
u8 pad;
} __attribute__ ((packed));
......@@ -492,8 +492,8 @@ struct acx_energy_detection {
struct acx_beacon_broadcast {
struct acx_header header;
u16 beacon_rx_timeout;
u16 broadcast_timeout;
__le16 beacon_rx_timeout;
__le16 broadcast_timeout;
/* Enables receiving of broadcast packets in PS mode */
u8 rx_broadcast_in_ps;
......@@ -506,8 +506,8 @@ struct acx_beacon_broadcast {
struct acx_event_mask {
struct acx_header header;
u32 event_mask;
u32 high_event_mask; /* Unused */
__le32 event_mask;
__le32 high_event_mask; /* Unused */
} __attribute__ ((packed));
#define CFG_RX_FCS BIT(2)
......@@ -551,8 +551,8 @@ struct acx_event_mask {
struct acx_feature_config {
struct acx_header header;
u32 options;
u32 data_flow_options;
__le32 options;
__le32 data_flow_options;
} __attribute__ ((packed));
struct acx_current_tx_power {
......@@ -576,7 +576,7 @@ struct acx_aid {
/*
* To be set when associated with an AP.
*/
u16 aid;
__le16 aid;
u8 pad[2];
} __attribute__ ((packed));
......@@ -608,152 +608,152 @@ struct acx_ctsprotect {
} __attribute__ ((packed));
struct acx_tx_statistics {
u32 internal_desc_overflow;
__le32 internal_desc_overflow;
} __attribute__ ((packed));
struct acx_rx_statistics {
u32 out_of_mem;
u32 hdr_overflow;
u32 hw_stuck;
u32 dropped;
u32 fcs_err;
u32 xfr_hint_trig;
u32 path_reset;
u32 reset_counter;
__le32 out_of_mem;
__le32 hdr_overflow;
__le32 hw_stuck;
__le32 dropped;
__le32 fcs_err;
__le32 xfr_hint_trig;
__le32 path_reset;
__le32 reset_counter;
} __attribute__ ((packed));
struct acx_dma_statistics {
u32 rx_requested;
u32 rx_errors;
u32 tx_requested;
u32 tx_errors;
__le32 rx_requested;
__le32 rx_errors;
__le32 tx_requested;
__le32 tx_errors;
} __attribute__ ((packed));
struct acx_isr_statistics {
/* host command complete */
u32 cmd_cmplt;
__le32 cmd_cmplt;
/* fiqisr() */
u32 fiqs;
__le32 fiqs;
/* (INT_STS_ND & INT_TRIG_RX_HEADER) */
u32 rx_headers;
__le32 rx_headers;
/* (INT_STS_ND & INT_TRIG_RX_CMPLT) */
u32 rx_completes;
__le32 rx_completes;
/* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */
u32 rx_mem_overflow;
__le32 rx_mem_overflow;
/* (INT_STS_ND & INT_TRIG_S_RX_RDY) */
u32 rx_rdys;
__le32 rx_rdys;
/* irqisr() */
u32 irqs;
__le32 irqs;
/* (INT_STS_ND & INT_TRIG_TX_PROC) */
u32 tx_procs;
__le32 tx_procs;
/* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */
u32 decrypt_done;
__le32 decrypt_done;
/* (INT_STS_ND & INT_TRIG_DMA0) */
u32 dma0_done;
__le32 dma0_done;
/* (INT_STS_ND & INT_TRIG_DMA1) */
u32 dma1_done;
__le32 dma1_done;
/* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */
u32 tx_exch_complete;
__le32 tx_exch_complete;
/* (INT_STS_ND & INT_TRIG_COMMAND) */
u32 commands;
__le32 commands;
/* (INT_STS_ND & INT_TRIG_RX_PROC) */
u32 rx_procs;
__le32 rx_procs;
/* (INT_STS_ND & INT_TRIG_PM_802) */
u32 hw_pm_mode_changes;
__le32 hw_pm_mode_changes;
/* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */
u32 host_acknowledges;
__le32 host_acknowledges;
/* (INT_STS_ND & INT_TRIG_PM_PCI) */
u32 pci_pm;
__le32 pci_pm;
/* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */
u32 wakeups;
__le32 wakeups;
/* (INT_STS_ND & INT_TRIG_LOW_RSSI) */
u32 low_rssi;
__le32 low_rssi;
} __attribute__ ((packed));
struct acx_wep_statistics {
/* WEP address keys configured */
u32 addr_key_count;
__le32 addr_key_count;
/* default keys configured */
u32 default_key_count;
__le32 default_key_count;
u32 reserved;
__le32 reserved;
/* number of times that WEP key not found on lookup */
u32 key_not_found;
__le32 key_not_found;
/* number of times that WEP key decryption failed */
u32 decrypt_fail;
__le32 decrypt_fail;
/* WEP packets decrypted */
u32 packets;
__le32 packets;
/* WEP decrypt interrupts */
u32 interrupt;
__le32 interrupt;
} __attribute__ ((packed));
#define ACX_MISSED_BEACONS_SPREAD 10
struct acx_pwr_statistics {
/* the amount of enters into power save mode (both PD & ELP) */
u32 ps_enter;
__le32 ps_enter;
/* the amount of enters into ELP mode */
u32 elp_enter;
__le32 elp_enter;
/* the amount of missing beacon interrupts to the host */
u32 missing_bcns;
__le32 missing_bcns;
/* the amount of wake on host-access times */
u32 wake_on_host;
__le32 wake_on_host;
/* the amount of wake on timer-expire */
u32 wake_on_timer_exp;
__le32 wake_on_timer_exp;
/* the number of packets that were transmitted with PS bit set */
u32 tx_with_ps;
__le32 tx_with_ps;
/* the number of packets that were transmitted with PS bit clear */
u32 tx_without_ps;
__le32 tx_without_ps;
/* the number of received beacons */
u32 rcvd_beacons;
__le32 rcvd_beacons;
/* the number of entering into PowerOn (power save off) */
u32 power_save_off;
__le32 power_save_off;
/* the number of entries into power save mode */
u16 enable_ps;
__le16 enable_ps;
/*
* the number of exits from power save, not including failed PS
* transitions
*/
u16 disable_ps;
__le16 disable_ps;
/*
* the number of times the TSF counter was adjusted because
* of drift
*/
u32 fix_tsf_ps;
__le32 fix_tsf_ps;
/* Gives statistics about the spread continuous missed beacons.
* The 16 LSB are dedicated for the PS mode.
......@@ -764,53 +764,53 @@ struct acx_pwr_statistics {
* ...
* cont_miss_bcns_spread[9] - ten and more continuous missed beacons.
*/
u32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD];
__le32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD];
/* the number of beacons in awake mode */
u32 rcvd_awake_beacons;
__le32 rcvd_awake_beacons;
} __attribute__ ((packed));