}
/**
- * il3945_setup_rx_handlers - Initialize Rx handler callbacks
+ * il3945_setup_handlers - Initialize Rx handler callbacks
*
* Setup the RX handlers for each of the reply types sent from the uCode
* to the host.
* This function chains into the hardware specific files for them to setup
* any hardware specific handlers as well.
*/
-static void il3945_setup_rx_handlers(struct il_priv *il)
+static void il3945_setup_handlers(struct il_priv *il)
{
- il->rx_handlers[N_ALIVE] = il3945_rx_reply_alive;
- il->rx_handlers[C_ADD_STA] = il3945_rx_reply_add_sta;
- il->rx_handlers[N_ERROR] = il_rx_reply_error;
- il->rx_handlers[N_CHANNEL_SWITCH] = il_rx_csa;
- il->rx_handlers[N_SPECTRUM_MEASUREMENT] =
+ il->handlers[N_ALIVE] = il3945_rx_reply_alive;
+ il->handlers[C_ADD_STA] = il3945_rx_reply_add_sta;
+ il->handlers[N_ERROR] = il_rx_reply_error;
+ il->handlers[N_CHANNEL_SWITCH] = il_rx_csa;
+ il->handlers[N_SPECTRUM_MEASUREMENT] =
il_rx_spectrum_measure_notif;
- il->rx_handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
- il->rx_handlers[N_PM_DEBUG_STATS] =
+ il->handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
+ il->handlers[N_PM_DEBUG_STATS] =
il_rx_pm_debug_stats_notif;
- il->rx_handlers[N_BEACON] = il3945_rx_beacon_notif;
+ il->handlers[N_BEACON] = il3945_rx_beacon_notif;
/*
* The same handler is used for both the REPLY to a discrete
* stats request from the host as well as for the periodic
* stats notifications (after received beacons) from the uCode.
*/
- il->rx_handlers[C_STATS] = il3945_reply_stats;
- il->rx_handlers[N_STATS] = il3945_hw_rx_stats;
+ il->handlers[C_STATS] = il3945_reply_stats;
+ il->handlers[N_STATS] = il3945_hw_rx_stats;
il_setup_rx_scan_handlers(il);
- il->rx_handlers[N_CARD_STATE] = il3945_rx_card_state_notif;
+ il->handlers[N_CARD_STATE] = il3945_rx_card_state_notif;
/* Set up hardware specific Rx handlers */
- il3945_hw_rx_handler_setup(il);
+ il3945_hw_handler_setup(il);
}
/************************** RX-FUNCTIONS ****************************/
/**
* il3945_rx_handle - Main entry function for receiving responses from uCode
*
- * Uses the il->rx_handlers callback function array to invoke
+ * Uses the il->handlers callback function array to invoke
* the appropriate handlers, including command responses,
* frame-received notifications, and other notifications.
*/
/* Based on type of command response or notification,
* handle those that need handling via function in
- * rx_handlers table. See il3945_setup_rx_handlers() */
- if (il->rx_handlers[pkt->hdr.cmd]) {
+ * handlers table. See il3945_setup_handlers() */
+ if (il->handlers[pkt->hdr.cmd]) {
D_RX("r = %d, i = %d, %s, 0x%02x\n", r, i,
il_get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd);
- il->isr_stats.rx_handlers[pkt->hdr.cmd]++;
- il->rx_handlers[pkt->hdr.cmd] (il, rxb);
+ il->isr_stats.handlers[pkt->hdr.cmd]++;
+ il->handlers[pkt->hdr.cmd] (il, rxb);
} else {
/* No handling needed */
D_RX(
/*
* XXX: After here, we should always check rxb->page
* against NULL before touching it or its virtual
- * memory (pkt). Because some rx_handler might have
+ * memory (pkt). Because some handler might have
* already taken or freed the pages.
*/
&il->bands[IEEE80211_BAND_2GHZ].channels[5],
&il->ctx);
il3945_setup_deferred_work(il);
- il3945_setup_rx_handlers(il);
+ il3945_setup_handlers(il);
il_power_initialize(il);
/*********************************
return sizeof(struct il3945_tx_beacon_cmd) + frame_size;
}
-void il3945_hw_rx_handler_setup(struct il_priv *il)
+void il3945_hw_handler_setup(struct il_priv *il)
{
- il->rx_handlers[C_TX] = il3945_rx_reply_tx;
- il->rx_handlers[N_3945_RX] = il3945_rx_reply_rx;
+ il->handlers[C_TX] = il3945_rx_reply_tx;
+ il->handlers[N_3945_RX] = il3945_rx_reply_rx;
}
void il3945_hw_setup_deferred_work(struct il_priv *il)
* il3945_mac_ <-- mac80211 callback
*
****************************************************************************/
-extern void il3945_hw_rx_handler_setup(struct il_priv *il);
+extern void il3945_hw_handler_setup(struct il_priv *il);
extern void il3945_hw_setup_deferred_work(struct il_priv *il);
extern void il3945_hw_cancel_deferred_work(struct il_priv *il);
extern int il3945_hw_rxq_stop(struct il_priv *il);
}
/**
- * il4965_setup_rx_handlers - Initialize Rx handler callbacks
+ * il4965_setup_handlers - Initialize Rx handler callbacks
*
* Setup the RX handlers for each of the reply types sent from the uCode
* to the host.
* This function chains into the hardware specific files for them to setup
* any hardware specific handlers as well.
*/
-static void il4965_setup_rx_handlers(struct il_priv *il)
+static void il4965_setup_handlers(struct il_priv *il)
{
- il->rx_handlers[N_ALIVE] = il4965_rx_reply_alive;
- il->rx_handlers[N_ERROR] = il_rx_reply_error;
- il->rx_handlers[N_CHANNEL_SWITCH] = il_rx_csa;
- il->rx_handlers[N_SPECTRUM_MEASUREMENT] =
+ il->handlers[N_ALIVE] = il4965_rx_reply_alive;
+ il->handlers[N_ERROR] = il_rx_reply_error;
+ il->handlers[N_CHANNEL_SWITCH] = il_rx_csa;
+ il->handlers[N_SPECTRUM_MEASUREMENT] =
il_rx_spectrum_measure_notif;
- il->rx_handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
- il->rx_handlers[N_PM_DEBUG_STATS] =
+ il->handlers[N_PM_SLEEP] = il_rx_pm_sleep_notif;
+ il->handlers[N_PM_DEBUG_STATS] =
il_rx_pm_debug_stats_notif;
- il->rx_handlers[N_BEACON] = il4965_rx_beacon_notif;
+ il->handlers[N_BEACON] = il4965_rx_beacon_notif;
/*
* The same handler is used for both the REPLY to a discrete
* stats request from the host as well as for the periodic
* stats notifications (after received beacons) from the uCode.
*/
- il->rx_handlers[C_STATS] = il4965_reply_stats;
- il->rx_handlers[N_STATS] = il4965_rx_stats;
+ il->handlers[C_STATS] = il4965_reply_stats;
+ il->handlers[N_STATS] = il4965_rx_stats;
il_setup_rx_scan_handlers(il);
/* status change handler */
- il->rx_handlers[N_CARD_STATE] =
+ il->handlers[N_CARD_STATE] =
il4965_rx_card_state_notif;
- il->rx_handlers[N_MISSED_BEACONS] =
+ il->handlers[N_MISSED_BEACONS] =
il4965_rx_missed_beacon_notif;
/* Rx handlers */
- il->rx_handlers[N_RX_PHY] = il4965_rx_reply_rx_phy;
- il->rx_handlers[N_RX_MPDU] = il4965_rx_reply_rx;
+ il->handlers[N_RX_PHY] = il4965_rx_reply_rx_phy;
+ il->handlers[N_RX_MPDU] = il4965_rx_reply_rx;
/* block ack */
- il->rx_handlers[N_COMPRESSED_BA] = il4965_rx_reply_compressed_ba;
+ il->handlers[N_COMPRESSED_BA] = il4965_rx_reply_compressed_ba;
/* Set up hardware specific Rx handlers */
- il->cfg->ops->lib->rx_handler_setup(il);
+ il->cfg->ops->lib->handler_setup(il);
}
/**
* il4965_rx_handle - Main entry function for receiving responses from uCode
*
- * Uses the il->rx_handlers callback function array to invoke
+ * Uses the il->handlers callback function array to invoke
* the appropriate handlers, including command responses,
* frame-received notifications, and other notifications.
*/
/* Based on type of command response or notification,
* handle those that need handling via function in
- * rx_handlers table. See il4965_setup_rx_handlers() */
- if (il->rx_handlers[pkt->hdr.cmd]) {
+ * handlers table. See il4965_setup_handlers() */
+ if (il->handlers[pkt->hdr.cmd]) {
D_RX("r = %d, i = %d, %s, 0x%02x\n", r,
i, il_get_cmd_string(pkt->hdr.cmd),
pkt->hdr.cmd);
- il->isr_stats.rx_handlers[pkt->hdr.cmd]++;
- il->rx_handlers[pkt->hdr.cmd] (il, rxb);
+ il->isr_stats.handlers[pkt->hdr.cmd]++;
+ il->handlers[pkt->hdr.cmd] (il, rxb);
} else {
/* No handling needed */
D_RX(
/*
* XXX: After here, we should always check rxb->page
* against NULL before touching it or its virtual
- * memory (pkt). Because some rx_handler might have
+ * memory (pkt). Because some handler might have
* already taken or freed the pages.
*/
}
il4965_setup_deferred_work(il);
- il4965_setup_rx_handlers(il);
+ il4965_setup_handlers(il);
/*********************************************
* 8. Enable interrupts and read RFKILL state
}
/* Set up 4965-specific Rx frame reply handlers */
-static void il4965_rx_handler_setup(struct il_priv *il)
+static void il4965_handler_setup(struct il_priv *il)
{
/* Legacy Rx frames */
- il->rx_handlers[N_RX] = il4965_rx_reply_rx;
+ il->handlers[N_RX] = il4965_rx_reply_rx;
/* Tx response */
- il->rx_handlers[C_TX] = il4965_rx_reply_tx;
- il->rx_handlers[N_BEACON] = il4965_rx_beacon_notif;
+ il->handlers[C_TX] = il4965_rx_reply_tx;
+ il->handlers[N_BEACON] = il4965_rx_beacon_notif;
}
static struct il_hcmd_ops il4965_hcmd = {
.txq_attach_buf_to_tfd = il4965_hw_txq_attach_buf_to_tfd,
.txq_free_tfd = il4965_hw_txq_free_tfd,
.txq_init = il4965_hw_tx_queue_init,
- .rx_handler_setup = il4965_rx_handler_setup,
+ .handler_setup = il4965_handler_setup,
.is_valid_rtc_data_addr = il4965_hw_valid_rtc_data_addr,
.init_alive_start = il4965_init_alive_start,
.load_ucode = il4965_load_bsm,
int (*txq_init)(struct il_priv *il,
struct il_tx_queue *txq);
/* setup Rx handler */
- void (*rx_handler_setup)(struct il_priv *il);
+ void (*handler_setup)(struct il_priv *il);
/* alive notification after init uCode load */
void (*init_alive_start)(struct il_priv *il);
/* check validity of rtc data address */
"Rx command responses:\t\t %u\n",
il->isr_stats.rx);
for (cnt = 0; cnt < IL_CN_MAX; cnt++) {
- if (il->isr_stats.rx_handlers[cnt] > 0)
+ if (il->isr_stats.handlers[cnt] > 0)
pos += scnprintf(buf + pos, bufsz - pos,
"\tRx handler[%36s]:\t\t %u\n",
il_get_cmd_string(cnt),
- il->isr_stats.rx_handlers[cnt]);
+ il->isr_stats.handlers[cnt]);
}
pos += scnprintf(buf + pos, bufsz - pos, "Tx/FH interrupt:\t\t %u\n",
u32 ctkill;
u32 wakeup;
u32 rx;
- u32 rx_handlers[IL_CN_MAX];
+ u32 handlers[IL_CN_MAX];
u32 tx;
u32 unhandled;
};
enum ieee80211_band band;
int alloc_rxb_page;
- void (*rx_handlers[IL_CN_MAX])(struct il_priv *il,
+ void (*handlers[IL_CN_MAX])(struct il_priv *il,
struct il_rx_buf *rxb);
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
void il_setup_rx_scan_handlers(struct il_priv *il)
{
/* scan handlers */
- il->rx_handlers[C_SCAN] = il_rx_reply_scan;
- il->rx_handlers[N_SCAN_START] =
+ il->handlers[C_SCAN] = il_rx_reply_scan;
+ il->handlers[N_SCAN_START] =
il_rx_scan_start_notif;
- il->rx_handlers[N_SCAN_RESULTS] =
+ il->handlers[N_SCAN_RESULTS] =
il_rx_scan_results_notif;
- il->rx_handlers[N_SCAN_COMPLETE] =
+ il->handlers[N_SCAN_COMPLETE] =
il_rx_scan_complete_notif;
}
EXPORT_SYMBOL(il_setup_rx_scan_handlers);