Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Make some functions and variables static.
details: https://anonhg.NetBSD.org/src/rev/e807c88e2cb5
branches: trunk
changeset: 336120:e807c88e2cb5
user: nonaka <nonaka%NetBSD.org@localhost>
date: Fri Feb 13 18:02:32 2015 +0000
description:
Make some functions and variables static.
diffstat:
sys/dev/pci/if_iwm.c | 806 ++++++++++++++++++++++++++------------------------
1 files changed, 416 insertions(+), 390 deletions(-)
diffs (truncated from 1989 to 300 lines):
diff -r cada1da8bfc6 -r e807c88e2cb5 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Fri Feb 13 17:55:24 2015 +0000
+++ b/sys/dev/pci/if_iwm.c Fri Feb 13 18:02:32 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwm.c,v 1.3 2015/02/13 17:40:13 nonaka Exp $ */
+/* $NetBSD: if_iwm.c,v 1.4 2015/02/13 18:02:32 nonaka Exp $ */
/* OpenBSD: if_iwm.c,v 1.18 2015/02/11 01:12:42 brad Exp */
/*
@@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.3 2015/02/13 17:40:13 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.4 2015/02/13 18:02:32 nonaka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -163,7 +163,7 @@
#include <dev/pci/if_iwmreg.h>
#include <dev/pci/if_iwmvar.h>
-const uint8_t iwm_nvm_channels[] = {
+static const uint8_t iwm_nvm_channels[] = {
/* 2.4 GHz */
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
/* 5 GHz */
@@ -176,7 +176,7 @@
/* It looks like 11a TX is broken, unfortunately. */
#define IWM_NO_5GHZ 1
-const struct iwm_rate {
+static const struct iwm_rate {
uint8_t rate;
uint8_t plcp;
} iwm_rates[] = {
@@ -207,210 +207,238 @@
int ns_generation;
};
-int iwm_store_cscheme(struct iwm_softc *, uint8_t *, size_t);
-int iwm_firmware_store_section(struct iwm_softc *, enum iwm_ucode_type,
- uint8_t *, size_t);
-int iwm_set_default_calib(struct iwm_softc *, const void *);
-int iwm_read_firmware(struct iwm_softc *);
-uint32_t iwm_read_prph(struct iwm_softc *, uint32_t);
-void iwm_write_prph(struct iwm_softc *, uint32_t, uint32_t);
-int iwm_read_mem(struct iwm_softc *, uint32_t, void *, int);
-int iwm_write_mem(struct iwm_softc *, uint32_t, const void *, int);
-int iwm_write_mem32(struct iwm_softc *, uint32_t, uint32_t);
-int iwm_poll_bit(struct iwm_softc *, int, uint32_t, uint32_t, int);
-int iwm_nic_lock(struct iwm_softc *);
-void iwm_nic_unlock(struct iwm_softc *);
-void iwm_set_bits_mask_prph(struct iwm_softc *, uint32_t, uint32_t,
- uint32_t);
-void iwm_set_bits_prph(struct iwm_softc *, uint32_t, uint32_t);
-void iwm_clear_bits_prph(struct iwm_softc *, uint32_t, uint32_t);
-int iwm_dma_contig_alloc(bus_dma_tag_t, struct iwm_dma_info *,
- bus_size_t, bus_size_t);
-void iwm_dma_contig_free(struct iwm_dma_info *);
-int iwm_alloc_fwmem(struct iwm_softc *);
-void iwm_free_fwmem(struct iwm_softc *);
-int iwm_alloc_sched(struct iwm_softc *);
-void iwm_free_sched(struct iwm_softc *);
-int iwm_alloc_kw(struct iwm_softc *);
-void iwm_free_kw(struct iwm_softc *);
-int iwm_alloc_ict(struct iwm_softc *);
-void iwm_free_ict(struct iwm_softc *);
-int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *);
-void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *);
-void iwm_free_rx_ring(struct iwm_softc *, struct iwm_rx_ring *);
-int iwm_alloc_tx_ring(struct iwm_softc *, struct iwm_tx_ring *, int);
-void iwm_reset_tx_ring(struct iwm_softc *, struct iwm_tx_ring *);
-void iwm_free_tx_ring(struct iwm_softc *, struct iwm_tx_ring *);
-void iwm_enable_rfkill_int(struct iwm_softc *);
-int iwm_check_rfkill(struct iwm_softc *);
-void iwm_enable_interrupts(struct iwm_softc *);
-void iwm_restore_interrupts(struct iwm_softc *);
-void iwm_disable_interrupts(struct iwm_softc *);
-void iwm_ict_reset(struct iwm_softc *);
-int iwm_set_hw_ready(struct iwm_softc *);
-int iwm_prepare_card_hw(struct iwm_softc *);
-void iwm_apm_config(struct iwm_softc *);
-int iwm_apm_init(struct iwm_softc *);
-void iwm_apm_stop(struct iwm_softc *);
-int iwm_start_hw(struct iwm_softc *);
-void iwm_stop_device(struct iwm_softc *);
-void iwm_set_pwr(struct iwm_softc *);
-void iwm_mvm_nic_config(struct iwm_softc *);
-int iwm_nic_rx_init(struct iwm_softc *);
-int iwm_nic_tx_init(struct iwm_softc *);
-int iwm_nic_init(struct iwm_softc *);
-void iwm_enable_txq(struct iwm_softc *, int, int);
-int iwm_post_alive(struct iwm_softc *);
-int iwm_is_valid_channel(uint16_t);
-uint8_t iwm_ch_id_to_ch_index(uint16_t);
-uint16_t iwm_channel_id_to_papd(uint16_t);
-uint16_t iwm_channel_id_to_txp(struct iwm_softc *, uint16_t);
-int iwm_phy_db_get_section_data(struct iwm_softc *, uint32_t, uint8_t **,
- uint16_t *, uint16_t);
-int iwm_send_phy_db_cmd(struct iwm_softc *, uint16_t, uint16_t, void *);
-int iwm_send_phy_db_data(struct iwm_softc *);
-int iwm_send_phy_db_data(struct iwm_softc *);
-void iwm_mvm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *,
- struct iwm_time_event_cmd_v1 *);
-int iwm_mvm_send_time_event_cmd(struct iwm_softc *,
- const struct iwm_time_event_cmd_v2 *);
-int iwm_mvm_time_event_send_add(struct iwm_softc *, struct iwm_node *,
- void *, struct iwm_time_event_cmd_v2 *);
-void iwm_mvm_protect_session(struct iwm_softc *, struct iwm_node *,
- uint32_t, uint32_t, uint32_t);
-int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t,
- uint8_t *, uint16_t *);
-int iwm_nvm_read_section(struct iwm_softc *, uint16_t, uint8_t *,
- uint16_t *);
-void iwm_init_channel_map(struct iwm_softc *, const uint16_t * const);
-int iwm_parse_nvm_data(struct iwm_softc *, const uint16_t *,
- const uint16_t *, const uint16_t *, uint8_t,
- uint8_t);
-int iwm_nvm_init(struct iwm_softc *);
-int iwm_firmware_load_chunk(struct iwm_softc *, uint32_t, const uint8_t *,
- uint32_t);
-int iwm_load_firmware(struct iwm_softc *, enum iwm_ucode_type);
-int iwm_start_fw(struct iwm_softc *, enum iwm_ucode_type);
-int iwm_fw_alive(struct iwm_softc *, uint32_t);
-int iwm_send_tx_ant_cfg(struct iwm_softc *, uint8_t);
-int iwm_send_phy_cfg_cmd(struct iwm_softc *);
-int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *, enum iwm_ucode_type);
-int iwm_run_init_mvm_ucode(struct iwm_softc *, int);
-int iwm_rx_addbuf(struct iwm_softc *, int, int);
-int iwm_mvm_calc_rssi(struct iwm_softc *, struct iwm_rx_phy_info *);
-int iwm_mvm_get_signal_strength(struct iwm_softc *,
- struct iwm_rx_phy_info *);
-void iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *, struct iwm_rx_packet *,
- struct iwm_rx_data *);
-int iwm_get_noise(const struct iwm_mvm_statistics_rx_non_phy *);
-void iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct iwm_rx_packet *,
- struct iwm_rx_data *);
-void iwm_mvm_rx_tx_cmd_single(struct iwm_softc *, struct iwm_rx_packet *,
- struct iwm_node *);
-void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *,
- struct iwm_rx_data *);
-int iwm_mvm_binding_cmd(struct iwm_softc *, struct iwm_node *, uint32_t);
-int iwm_mvm_binding_update(struct iwm_softc *, struct iwm_node *, int);
-int iwm_mvm_binding_add_vif(struct iwm_softc *, struct iwm_node *);
-void iwm_mvm_phy_ctxt_cmd_hdr(struct iwm_softc *, struct iwm_mvm_phy_ctxt *,
- struct iwm_phy_context_cmd *, uint32_t, uint32_t);
-void iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *,
- struct iwm_phy_context_cmd *, struct ieee80211_channel *,
- uint8_t, uint8_t);
-int iwm_mvm_phy_ctxt_apply(struct iwm_softc *, struct iwm_mvm_phy_ctxt *,
- uint8_t, uint8_t, uint32_t, uint32_t);
-int iwm_mvm_phy_ctxt_add(struct iwm_softc *, struct iwm_mvm_phy_ctxt *,
- struct ieee80211_channel *, uint8_t, uint8_t);
-int iwm_mvm_phy_ctxt_changed(struct iwm_softc *, struct iwm_mvm_phy_ctxt *,
- struct ieee80211_channel *, uint8_t, uint8_t);
-int iwm_send_cmd(struct iwm_softc *, struct iwm_host_cmd *);
-int iwm_mvm_send_cmd_pdu(struct iwm_softc *, uint8_t, uint32_t, uint16_t,
- const void *);
-int iwm_mvm_send_cmd_status(struct iwm_softc *, struct iwm_host_cmd *,
- uint32_t *);
-int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *, uint8_t,
- uint16_t, const void *, uint32_t *);
-void iwm_free_resp(struct iwm_softc *, struct iwm_host_cmd *);
-void iwm_cmd_done(struct iwm_softc *, struct iwm_rx_packet *);
-void iwm_update_sched(struct iwm_softc *, int, int, uint8_t, uint16_t);
-const struct iwm_rate *iwm_tx_fill_cmd(struct iwm_softc *, struct iwm_node *,
- struct ieee80211_frame *, struct iwm_tx_cmd *);
-int iwm_tx(struct iwm_softc *, struct mbuf *, struct ieee80211_node *, int);
-int iwm_mvm_beacon_filter_send_cmd(struct iwm_softc *,
- struct iwm_beacon_filter_cmd *);
-void iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *,
- struct iwm_node *, struct iwm_beacon_filter_cmd *);
-int iwm_mvm_update_beacon_abort(struct iwm_softc *, struct iwm_node *, int);
-void iwm_mvm_power_log(struct iwm_softc *, struct iwm_mac_power_cmd *);
-void iwm_mvm_power_build_cmd(struct iwm_softc *, struct iwm_node *,
- struct iwm_mac_power_cmd *);
-int iwm_mvm_power_mac_update_mode(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_power_update_device(struct iwm_softc *);
-int iwm_mvm_enable_beacon_filter(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_disable_beacon_filter(struct iwm_softc *, struct iwm_node *);
-void iwm_mvm_add_sta_cmd_v6_to_v5(struct iwm_mvm_add_sta_cmd_v6 *,
- struct iwm_mvm_add_sta_cmd_v5 *);
-int iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *,
- struct iwm_mvm_add_sta_cmd_v6 *, int *);
-int iwm_mvm_sta_send_to_fw(struct iwm_softc *, struct iwm_node *, int);
-int iwm_mvm_add_sta(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_update_sta(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_add_int_sta_common(struct iwm_softc *, struct iwm_int_sta *,
- const uint8_t *, uint16_t, uint16_t);
-int iwm_mvm_add_aux_sta(struct iwm_softc *);
-uint16_t iwm_mvm_scan_rx_chain(struct iwm_softc *);
-uint32_t iwm_mvm_scan_max_out_time(struct iwm_softc *, uint32_t, int);
-uint32_t iwm_mvm_scan_suspend_time(struct iwm_softc *, int);
-uint32_t iwm_mvm_scan_rxon_flags(struct iwm_softc *, int);
-uint32_t iwm_mvm_scan_rate_n_flags(struct iwm_softc *, int, int);
-uint16_t iwm_mvm_get_active_dwell(struct iwm_softc *, int, int);
-uint16_t iwm_mvm_get_passive_dwell(struct iwm_softc *, int);
-int iwm_mvm_scan_fill_channels(struct iwm_softc *, struct iwm_scan_cmd *,
- int, int, int);
-uint16_t iwm_mvm_fill_probe_req(struct iwm_softc *, struct ieee80211_frame *,
- const uint8_t *, int, const uint8_t *, int, const uint8_t *, int, int);
-int iwm_mvm_scan_request(struct iwm_softc *, int, int, uint8_t *, int);
-void iwm_mvm_ack_rates(struct iwm_softc *, struct iwm_node *, int *, int *);
-void iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *, struct iwm_node *,
- struct iwm_mac_ctx_cmd *, uint32_t);
-int iwm_mvm_mac_ctxt_send_cmd(struct iwm_softc *, struct iwm_mac_ctx_cmd *);
-void iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *, struct iwm_node *,
- struct iwm_mac_data_sta *, int);
-int iwm_mvm_mac_ctxt_cmd_station(struct iwm_softc *, struct iwm_node *,
- uint32_t);
-int iwm_mvm_mac_ctx_send(struct iwm_softc *, struct iwm_node *, uint32_t);
-int iwm_mvm_mac_ctxt_add(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_mac_ctxt_changed(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_node *);
-int iwm_auth(struct iwm_softc *);
-int iwm_assoc(struct iwm_softc *);
-int iwm_release(struct iwm_softc *, struct iwm_node *);
-void iwm_calib_timeout(void *);
-void iwm_setrates(struct iwm_node *);
-int iwm_media_change(struct ifnet *);
-void iwm_newstate_cb(void *);
-int iwm_newstate(struct ieee80211com *, enum ieee80211_state, int);
-void iwm_endscan_cb(void *);
-int iwm_init_hw(struct iwm_softc *);
-int iwm_init(struct ifnet *);
-void iwm_start(struct ifnet *);
-void iwm_stop(struct ifnet *, int);
-void iwm_watchdog(struct ifnet *);
-int iwm_ioctl(struct ifnet *, u_long, void *);
-const char *iwm_desc_lookup(uint32_t);
+static int iwm_store_cscheme(struct iwm_softc *, uint8_t *, size_t);
+static int iwm_firmware_store_section(struct iwm_softc *,
+ enum iwm_ucode_type, uint8_t *, size_t);
+static int iwm_set_default_calib(struct iwm_softc *, const void *);
+static int iwm_read_firmware(struct iwm_softc *);
+static uint32_t iwm_read_prph(struct iwm_softc *, uint32_t);
+static void iwm_write_prph(struct iwm_softc *, uint32_t, uint32_t);
#ifdef IWM_DEBUG
-void iwm_nic_error(struct iwm_softc *);
+static int iwm_read_mem(struct iwm_softc *, uint32_t, void *, int);
#endif
-void iwm_notif_intr(struct iwm_softc *);
-int iwm_intr(void *);
-int iwm_preinit(struct iwm_softc *);
-void iwm_attach_hook(struct device *);
-void iwm_attach(struct device *, struct device *, void *);
-void iwm_init_task(void *);
-int iwm_activate(struct device *, int);
-void iwm_wakeup(struct iwm_softc *);
-
-void iwm_radiotap_attach(struct iwm_softc *);
+static int iwm_write_mem(struct iwm_softc *, uint32_t, const void *, int);
+static int iwm_write_mem32(struct iwm_softc *, uint32_t, uint32_t);
+static int iwm_poll_bit(struct iwm_softc *, int, uint32_t, uint32_t, int);
+static int iwm_nic_lock(struct iwm_softc *);
+static void iwm_nic_unlock(struct iwm_softc *);
+static void iwm_set_bits_mask_prph(struct iwm_softc *, uint32_t, uint32_t,
+ uint32_t);
+static void iwm_set_bits_prph(struct iwm_softc *, uint32_t, uint32_t);
+static void iwm_clear_bits_prph(struct iwm_softc *, uint32_t, uint32_t);
+static int iwm_dma_contig_alloc(bus_dma_tag_t, struct iwm_dma_info *,
+ bus_size_t, bus_size_t);
+static void iwm_dma_contig_free(struct iwm_dma_info *);
+static int iwm_alloc_fwmem(struct iwm_softc *);
+static void iwm_free_fwmem(struct iwm_softc *);
+static int iwm_alloc_sched(struct iwm_softc *);
+static void iwm_free_sched(struct iwm_softc *);
+static int iwm_alloc_kw(struct iwm_softc *);
+static void iwm_free_kw(struct iwm_softc *);
+static int iwm_alloc_ict(struct iwm_softc *);
+static void iwm_free_ict(struct iwm_softc *);
+static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *);
+static void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *);
+static void iwm_free_rx_ring(struct iwm_softc *, struct iwm_rx_ring *);
+static int iwm_alloc_tx_ring(struct iwm_softc *, struct iwm_tx_ring *,
+ int);
+static void iwm_reset_tx_ring(struct iwm_softc *, struct iwm_tx_ring *);
+static void iwm_free_tx_ring(struct iwm_softc *, struct iwm_tx_ring *);
+static void iwm_enable_rfkill_int(struct iwm_softc *);
+static int iwm_check_rfkill(struct iwm_softc *);
+static void iwm_enable_interrupts(struct iwm_softc *);
+static void iwm_restore_interrupts(struct iwm_softc *);
+static void iwm_disable_interrupts(struct iwm_softc *);
+static void iwm_ict_reset(struct iwm_softc *);
+static int iwm_set_hw_ready(struct iwm_softc *);
+static int iwm_prepare_card_hw(struct iwm_softc *);
+static void iwm_apm_config(struct iwm_softc *);
+static int iwm_apm_init(struct iwm_softc *);
+static void iwm_apm_stop(struct iwm_softc *);
+static int iwm_start_hw(struct iwm_softc *);
+static void iwm_stop_device(struct iwm_softc *);
+static void iwm_set_pwr(struct iwm_softc *);
+static void iwm_mvm_nic_config(struct iwm_softc *);
+static int iwm_nic_rx_init(struct iwm_softc *);
+static int iwm_nic_tx_init(struct iwm_softc *);
+static int iwm_nic_init(struct iwm_softc *);
+static void iwm_enable_txq(struct iwm_softc *, int, int);
+static int iwm_post_alive(struct iwm_softc *);
+static int iwm_is_valid_channel(uint16_t);
Home |
Main Index |
Thread Index |
Old Index