summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2015-06-15 08:06:11 +0000
committerstsp <stsp@openbsd.org>2015-06-15 08:06:11 +0000
commit118d9b4fd67ff8072efb3b27147b154b1335ff2a (patch)
tree1b818b8305d3fdf720861184a9cc5c6c15e0afa2
parentMake the wifi LED work with iwm(4). (diff)
downloadwireguard-openbsd-118d9b4fd67ff8072efb3b27147b154b1335ff2a.tar.xz
wireguard-openbsd-118d9b4fd67ff8072efb3b27147b154b1335ff2a.zip
Remove comments referring to Linux iwlwifi source filenames from iwm(4).
Linux is a moving target so these comments provide little value. Discussed with kettenis and deraadt.
-rw-r--r--sys/dev/pci/if_iwm.c110
-rw-r--r--sys/dev/pci/if_iwmreg.h98
-rw-r--r--sys/dev/pci/if_iwmvar.h11
3 files changed, 4 insertions, 215 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index d223f8be584..205f037e443 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.44 2015/06/15 07:50:44 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.45 2015/06/15 08:06:11 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
@@ -482,7 +482,6 @@ iwm_firmware_store_section(struct iwm_softc *sc,
return 0;
}
-/* iwlwifi: iwl-drv.c */
struct iwm_tlv_calib_data {
uint32_t ucode_type;
struct iwm_tlv_calib_ctrl calib;
@@ -740,7 +739,6 @@ iwm_write_prph(struct iwm_softc *sc, uint32_t addr, uint32_t val)
IWM_WRITE(sc, IWM_HBUS_TARG_PRPH_WDAT, val);
}
-/* iwlwifi: pcie/trans.c */
int
iwm_read_mem(struct iwm_softc *sc, uint32_t addr, void *buf, int dwords)
{
@@ -758,7 +756,6 @@ iwm_read_mem(struct iwm_softc *sc, uint32_t addr, void *buf, int dwords)
return ret;
}
-/* iwlwifi: pcie/trans.c */
int
iwm_write_mem(struct iwm_softc *sc, uint32_t addr, const void *buf, int dwords)
{
@@ -1436,7 +1433,6 @@ iwm_apm_init(struct iwm_softc *sc)
return error;
}
-/* iwlwifi/pcie/trans.c */
void
iwm_apm_stop(struct iwm_softc *sc)
{
@@ -1450,7 +1446,6 @@ iwm_apm_stop(struct iwm_softc *sc)
DPRINTF(("iwm apm stop\n"));
}
-/* iwlwifi pcie/trans.c */
int
iwm_start_hw(struct iwm_softc *sc)
{
@@ -1474,7 +1469,6 @@ iwm_start_hw(struct iwm_softc *sc)
return 0;
}
-/* iwlwifi pcie/trans.c */
void
iwm_stop_device(struct iwm_softc *sc)
@@ -1545,7 +1539,6 @@ iwm_stop_device(struct iwm_softc *sc)
iwm_check_rfkill(sc);
}
-/* iwlwifi pcie/trans.c (always main power) */
void
iwm_set_pwr(struct iwm_softc *sc)
{
@@ -1553,7 +1546,6 @@ iwm_set_pwr(struct iwm_softc *sc)
IWM_APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, ~IWM_APMG_PS_CTRL_MSK_PWR_SRC);
}
-/* iwlwifi: mvm/ops.c */
void
iwm_mvm_nic_config(struct iwm_softc *sc)
{
@@ -1822,11 +1814,6 @@ iwm_post_alive(struct iwm_softc *sc)
/*
* PHY db
- * iwlwifi/iwl-phy-db.c
- */
-
-/*
- * BEGIN iwl-phy-db.c
*/
enum iwm_phy_db_section_type {
@@ -2141,14 +2128,6 @@ iwm_send_phy_db_data(struct iwm_softc *sc)
}
/*
- * END iwl-phy-db.c
- */
-
-/*
- * BEGIN iwlwifi/mvm/time-event.c
- */
-
-/*
* For the high priority TE use a time event type that has similar priority to
* the FW's action scan priority.
*/
@@ -2263,13 +2242,8 @@ iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in,
}
/*
- * END iwlwifi/mvm/time-event.c
- */
-
-/*
* NVM read access and content parsing. We do not support
* external NVM or writing NVM.
- * iwlwifi/mvm/nvm.c
*/
/* list of NVM sections we are allowed/need to read */
@@ -2394,8 +2368,6 @@ iwm_nvm_read_section(struct iwm_softc *sc,
* BEGIN IWM_NVM_PARSE
*/
-/* iwlwifi/iwl-nvm-parse.c */
-
/* NVM offsets (in words) definitions */
enum wkp_nvm_offsets {
/* NVM HW-Section offset (in words) definitions */
@@ -2714,7 +2686,6 @@ iwm_load_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type)
return error;
}
-/* iwlwifi: pcie/trans.c */
int
iwm_start_fw(struct iwm_softc *sc, enum iwm_ucode_type ucode_type)
{
@@ -2762,7 +2733,6 @@ iwm_send_tx_ant_cfg(struct iwm_softc *sc, uint8_t valid_tx_ant)
IWM_CMD_SYNC, sizeof(tx_ant_cmd), &tx_ant_cmd);
}
-/* iwlwifi: mvm/fw.c */
int
iwm_send_phy_cfg_cmd(struct iwm_softc *sc)
{
@@ -2805,9 +2775,6 @@ iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc,
* mvm misc bits
*/
-/*
- * follows iwlwifi/fw.c
- */
int
iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
{
@@ -2921,7 +2888,6 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
return 0;
}
-/* iwlwifi: mvm/rx.c */
#define IWM_RSSI_OFFSET 50
int
iwm_mvm_calc_rssi(struct iwm_softc *sc, struct iwm_rx_phy_info *phy_info)
@@ -2952,7 +2918,6 @@ iwm_mvm_calc_rssi(struct iwm_softc *sc, struct iwm_rx_phy_info *phy_info)
return max_rssi_dbm;
}
-/* iwlwifi: mvm/rx.c */
/*
* iwm_mvm_get_signal_strength - use new rx PHY INFO API
* values are reported by the fw as positive values - need to negate
@@ -3218,10 +3183,6 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc,
}
}
-/*
- * BEGIN iwlwifi/mvm/binding.c
- */
-
int
iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
{
@@ -3272,14 +3233,6 @@ iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in)
}
/*
- * END iwlwifi/mvm/binding.c
- */
-
-/*
- * BEGIN iwlwifi/mvm/phy-ctxt.c
- */
-
-/*
* Construct the generic fields of the PHY context command
*/
void
@@ -3384,10 +3337,6 @@ iwm_mvm_phy_ctxt_changed(struct iwm_softc *sc,
}
/*
- * END iwlwifi/mvm/phy-ctxt.c
- */
-
-/*
* transmit side
*/
@@ -3551,7 +3500,6 @@ iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
return error;
}
-/* iwlwifi: mvm/utils.c */
int
iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id,
uint32_t flags, uint16_t len, const void *data)
@@ -3566,7 +3514,6 @@ iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id,
return iwm_send_cmd(sc, &cmd);
}
-/* iwlwifi: mvm/utils.c */
int
iwm_mvm_send_cmd_status(struct iwm_softc *sc,
struct iwm_host_cmd *cmd, uint32_t *status)
@@ -3608,7 +3555,6 @@ iwm_mvm_send_cmd_status(struct iwm_softc *sc,
return error;
}
-/* iwlwifi/mvm/utils.c */
int
iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id,
uint16_t len, const void *data, uint32_t *status)
@@ -3981,10 +3927,6 @@ iwm_mvm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync)
}
#endif
-/*
- * BEGIN mvm/led.c
- */
-
/* Set led register on */
void
iwm_mvm_led_enable(struct iwm_softc *sc)
@@ -3999,10 +3941,6 @@ iwm_mvm_led_disable(struct iwm_softc *sc)
IWM_WRITE(sc, IWM_CSR_LED_REG, IWM_CSR_LED_REG_TURN_OFF);
}
-/*
- * END mvm/led.c
- */
-
int
iwm_mvm_led_is_enabled(struct iwm_softc *sc)
{
@@ -4035,10 +3973,6 @@ iwm_led_blink_stop(struct iwm_softc *sc)
iwm_mvm_led_disable(sc);
}
-/*
- * BEGIN mvm/power.c
- */
-
#define IWM_POWER_KEEP_ALIVE_PERIOD_SEC 25
int
@@ -4250,14 +4184,6 @@ iwm_mvm_update_beacon_filter(struct iwm_softc *sc, struct iwm_node *in)
}
#endif
-/*
- * END mvm/power.c
- */
-
-/*
- * BEGIN mvm/sta.c
- */
-
void
iwm_mvm_add_sta_cmd_v6_to_v5(struct iwm_mvm_add_sta_cmd_v6 *cmd_v6,
struct iwm_mvm_add_sta_cmd_v5 *cmd_v5)
@@ -4405,14 +4331,6 @@ iwm_mvm_add_aux_sta(struct iwm_softc *sc)
return ret;
}
-/*
- * END mvm/sta.c
- */
-
-/*
- * BEGIN mvm/scan.c
- */
-
#define IWM_PLCP_QUIET_THRESH 1
#define IWM_ACTIVE_QUIET_TIME 10
#define LONG_OUT_TIME_PERIOD 600
@@ -4699,14 +4617,6 @@ iwm_mvm_scan_request(struct iwm_softc *sc, int flags,
return ret;
}
-/*
- * END mvm/scan.c
- */
-
-/*
- * BEGIN mvm/mac-ctxt.c
- */
-
void
iwm_mvm_ack_rates(struct iwm_softc *sc, struct iwm_node *in,
int *cck_rates, int *ofdm_rates)
@@ -4993,14 +4903,6 @@ iwm_mvm_mac_ctxt_remove(struct iwm_softc *sc, struct iwm_node *in)
}
#endif
-/*
- * END mvm/mac-ctxt.c
- */
-
-/*
- * BEGIN mvm/quota.c
- */
-
int
iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
{
@@ -5068,10 +4970,6 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
}
/*
- * END mvm/quota.c
- */
-
-/*
* aieee80211 routines
*/
@@ -5870,10 +5768,6 @@ iwm_ioctl(struct ifnet *ifp, u_long cmd, iwm_caddr_t data)
*/
/*
- * error dumping routines are from iwlwifi/mvm/utils.c
- */
-
-/*
* Note: This structure is read from the device with IO accesses,
* and the reading already does the endian conversion. As it is
* read with uint32_t-sized accesses, any members with a different size
@@ -6176,7 +6070,7 @@ iwm_notif_intr(struct iwm_softc *sc)
break;
/* ignore */
- case 0x6c: /* IWM_PHY_DB_CMD, no idea why it's not in fw-api.h */
+ case 0x6c: /* IWM_PHY_DB_CMD */
break;
case IWM_INIT_COMPLETE_NOTIF:
diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h
index 7fcf981f91b..cfa39b12952 100644
--- a/sys/dev/pci/if_iwmreg.h
+++ b/sys/dev/pci/if_iwmreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwmreg.h,v 1.3 2015/02/23 10:25:20 stsp Exp $ */
+/* $OpenBSD: if_iwmreg.h,v 1.4 2015/06/15 08:06:11 stsp Exp $ */
/******************************************************************************
*
@@ -64,10 +64,6 @@
*****************************************************************************/
/*
- * BEGIN iwl-csr.h
- */
-
-/*
* CSR (control and status registers)
*
* CSR registers are mapped directly into PCI bus space, and are accessible
@@ -524,14 +520,6 @@ enum iwm_dtd_diode_reg {
IWM_DTS_DIODE_REG_FLAGS_PASS_ONCE = 0x00000080, /* bits [7:7] */
};
-/*
- * END iwl-csr.h
- */
-
-/*
- * BEGIN iwl-fw.h
- */
-
/**
* enum iwl_ucode_tlv_flag - ucode API flags
* @IWM_UCODE_TLV_FLAGS_PAN: This is PAN capable microcode; this previously
@@ -684,14 +672,6 @@ struct iwm_fw_cscheme_list {
struct iwm_fw_cipher_scheme cs[];
} __packed;
-/*
- * END iwl-fw.h
- */
-
-/*
- * BEGIN iwl-fw-file.h
- */
-
/* v1/v2 uCode file layout */
struct iwm_ucode_header {
uint32_t ver; /* major/minor/API/serial */
@@ -793,14 +773,6 @@ struct iwm_tlv_ucode_header {
};
/*
- * END iwl-fw-file.h
- */
-
-/*
- * BEGIN iwl-prph.h
- */
-
-/*
* Registers in this file are internal, not PCI bus memory mapped.
* Driver accesses these via IWM_HBUS_TARG_PRPH_* registers.
*/
@@ -1015,14 +987,6 @@ static inline unsigned int IWM_SCD_QUEUE_STATUS_BITS(unsigned int chnl)
#define IWM_OSC_CLK (0xa04068)
#define IWM_OSC_CLK_FORCE_CONTROL (0x8)
-/*
- * END iwl-prph.h
- */
-
-/*
- * BEGIN iwl-fh.h
- */
-
/****************************/
/* Flow Handler Definitions */
/****************************/
@@ -1496,14 +1460,6 @@ struct iwm_agn_scd_bc_tbl {
uint16_t tfd_offset[IWM_TFD_QUEUE_BC_SIZE];
} __packed;
-/*
- * END iwl-fh.h
- */
-
-/*
- * BEGIN mvm/fw-api.h
- */
-
/* maximal number of Tx queues in any platform */
#define IWM_MVM_MAX_QUEUES 20
@@ -2862,14 +2818,6 @@ struct iwm_sf_cfg_cmd {
} __packed; /* IWM_SF_CFG_API_S_VER_2 */
/*
- * END mvm/fw-api.h
- */
-
-/*
- * BEGIN mvm/fw-api-mac.h
- */
-
-/*
* The first MAC indices (starting from 0)
* are available to the driver, AUX follows
*/
@@ -3189,14 +3137,6 @@ struct iwm_nonqos_seq_query_cmd {
uint16_t reserved;
} __packed; /* IWM_NON_QOS_TX_COUNTER_GET_SET_API_S_VER_1 */
-/*
- * END mvm/fw-api-mac.h
- */
-
-/*
- * BEGIN mvm/fw-api-power.h
- */
-
/* Power Management Commands, Responses, Notifications */
/* Radio LP RX Energy Threshold measured in dBm */
@@ -3485,14 +3425,6 @@ struct iwm_beacon_filter_cmd {
.ba_escape_timer = htole32(IWM_BA_ESCAPE_TIMER_DEFAULT)
/*
- * END mvm/fw-api-power.h
- */
-
-/*
- * BEGIN mvm/fw-api-rs.h
- */
-
-/*
* These serve as indexes into
* struct iwm_rate_info fw_rate_idx_to_plcp[IWM_RATE_COUNT];
* TODO: avoid overlap between legacy and HT rates
@@ -3777,14 +3709,6 @@ struct iwm_lq_cmd {
uint32_t bf_params;
}; /* LINK_QUALITY_CMD_API_S_VER_1 */
-/*
- * END mvm/fw-api-rs.h
- */
-
-/*
- * BEGIN mvm/fw-api-tx.h
- */
-
/**
* enum iwm_tx_flags - bitmasks for tx_flags in TX command
* @IWM_TX_CMD_FLG_PROT_REQUIRE: use RTS or CTS-to-self to protect the frame
@@ -4306,14 +4230,6 @@ static inline uint32_t iwm_mvm_get_scd_ssn(struct iwm_mvm_tx_resp *tx_resp)
tx_resp->frame_count) & 0xfff;
}
-/*
- * END mvm/fw-api-tx.h
- */
-
-/*
- * BEGIN mvm/fw-api-scan.h
- */
-
/* Scan Commands, Responses, Notifications */
/* Masks for iwm_scan_channel.type flags */
@@ -4835,14 +4751,6 @@ struct iwm_sched_scan_results {
uint8_t reserved;
};
-/*
- * END mvm/fw-api-scan.h
- */
-
-/*
- * BEGIN mvm/fw-api-sta.h
- */
-
/**
* enum iwm_sta_flags - flags for the ADD_STA host command
* @IWM_STA_FLG_REDUCED_TX_PWR_CTRL:
@@ -5214,10 +5122,6 @@ struct iwm_mvm_wep_key_cmd {
/*
- * END mvm/fw-api-sta.h
- */
-
-/*
* Some cherry-picked definitions
*/
diff --git a/sys/dev/pci/if_iwmvar.h b/sys/dev/pci/if_iwmvar.h
index d1638c9e55a..96f5eec5044 100644
--- a/sys/dev/pci/if_iwmvar.h
+++ b/sys/dev/pci/if_iwmvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwmvar.h,v 1.8 2015/06/15 07:50:44 stsp Exp $ */
+/* $OpenBSD: if_iwmvar.h,v 1.9 2015/06/15 08:06:12 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
@@ -308,11 +308,6 @@ struct iwm_ucode_status {
#define IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 500
#define IWM_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS 400
-/*
- * Command headers are in iwl-trans.h, which is full of all
- * kinds of other junk, so we just replicate the structures here.
- * First the software bits:
- */
enum IWM_CMD_MODE {
IWM_CMD_SYNC = 0,
IWM_CMD_ASYNC = (1 << 0),
@@ -324,10 +319,6 @@ enum iwm_hcmd_dataflag {
IWM_HCMD_DFL_DUP = (1 << 1),
};
-/*
- * iwlwifi/iwl-phy-db
- */
-
#define IWM_NUM_PAPD_CH_GROUPS 4
#define IWM_NUM_TXP_CH_GROUPS 9