* il3945_rx_reply_tx - Handle Tx response
*/
static void il3945_rx_reply_tx(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
#endif
void il3945_hw_rx_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
}
void il3945_reply_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
__le32 *flag = (__le32 *)&pkt->u.raw;
}
static void il3945_pass_packet_to_mac80211(struct il_priv *il,
- struct il_rx_mem_buffer *rxb,
+ struct il_rx_buf *rxb,
struct ieee80211_rx_status *stats)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
#define IL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
static void il3945_rx_reply_rx(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct ieee80211_hdr *header;
struct ieee80211_rx_status rx_status;
extern int il3945_hw_reg_send_txpower(struct il_priv *il);
extern int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power);
extern void il3945_hw_rx_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il3945_reply_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
extern void il3945_disable_events(struct il_priv *il);
extern int il4965_get_temperature(const struct il_priv *il);
extern void il3945_post_associate(struct il_priv *il);
{
struct il_rx_queue *rxq = &il->rxq;
struct list_head *element;
- struct il_rx_mem_buffer *rxb;
+ struct il_rx_buf *rxb;
unsigned long flags;
spin_lock_irqsave(&rxq->lock, flags);
/* Get next free Rx buffer, remove from free list */
element = rxq->rx_free.next;
- rxb = list_entry(element, struct il_rx_mem_buffer, list);
+ rxb = list_entry(element, struct il_rx_buf, list);
list_del(element);
/* Point to Rx buffer via next RBD in circular buffer */
{
struct il_rx_queue *rxq = &il->rxq;
struct list_head *element;
- struct il_rx_mem_buffer *rxb;
+ struct il_rx_buf *rxb;
struct page *page;
unsigned long flags;
gfp_t gfp_mask = priority;
return;
}
element = rxq->rx_used.next;
- rxb = list_entry(element, struct il_rx_mem_buffer, list);
+ rxb = list_entry(element, struct il_rx_buf, list);
list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags);
struct ieee80211_hdr *hdr,
u16 len,
u32 ampdu_status,
- struct il_rx_mem_buffer *rxb,
+ struct il_rx_buf *rxb,
struct ieee80211_rx_status *stats)
{
struct sk_buff *skb;
/* Called for REPLY_RX (legacy ABG frames), or
* REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
void il4965_rx_reply_rx(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct ieee80211_hdr *header;
struct ieee80211_rx_status rx_status;
/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD).
* This will be used later in il_rx_reply_rx() for REPLY_RX_MPDU_CMD. */
void il4965_rx_reply_rx_phy(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
il->_4965.last_phy_res_valid = true;
#include "iwl-4965.h"
void il4965_rx_missed_beacon_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
#define REG_RECALIB_PERIOD (60)
void il4965_rx_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
int change;
struct il_rx_pkt *pkt = rxb_addr(rxb);
}
void il4965_reply_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
* of frames sent via aggregation.
*/
void il4965_rx_reply_compressed_ba(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_compressed_ba_resp *ba_resp = &pkt->u.compressed_ba;
* il4965_rx_reply_tx - Handle standard (non-aggregation) Tx response
*/
static void il4965_rx_reply_tx(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
}
static void il4965_rx_beacon_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il4965_beacon_notif *beacon = (void *)pkt->u.raw;
int il4965_rxq_stop(struct il_priv *il);
int il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band);
void il4965_rx_reply_rx(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il4965_rx_reply_rx_phy(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il4965_rx_handle(struct il_priv *il);
/* tx */
int il4965_txq_check_empty(struct il_priv *il,
int sta_id, u8 tid, int txq_id);
void il4965_rx_reply_compressed_ba(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
int il4965_tx_queue_reclaim(struct il_priv *il, int txq_id, int index);
void il4965_hw_txq_ctx_free(struct il_priv *il);
int il4965_txq_ctx_alloc(struct il_priv *il);
/* rx */
void il4965_rx_missed_beacon_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
bool il4965_good_plcp_health(struct il_priv *il,
struct il_rx_pkt *pkt);
void il4965_rx_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il4965_reply_statistics(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
/* scan */
int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif);
}
EXPORT_SYMBOL(il_chswitch_done);
-void il_rx_csa(struct il_priv *il, struct il_rx_mem_buffer *rxb)
+void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_csa_notification *csa = &(pkt->u.csa_notif);
EXPORT_SYMBOL(il_send_statistics_request);
void il_rx_pm_sleep_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
struct il_rx_pkt *pkt = rxb_addr(rxb);
EXPORT_SYMBOL(il_rx_pm_sleep_notif);
void il_rx_pm_debug_statistics_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
EXPORT_SYMBOL(il_rx_pm_debug_statistics_notif);
void il_rx_reply_error(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
* RX handlers.
* **************************************************/
void il_rx_pm_sleep_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il_rx_pm_debug_statistics_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il_rx_reply_error(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
/*****************************************************
* RX
struct il_rx_queue *q);
int il_rx_queue_space(const struct il_rx_queue *q);
void il_tx_cmd_complete(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
/* Handlers */
void il_rx_spectrum_measure_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
void il_recover_from_statistics(struct il_priv *il,
struct il_rx_pkt *pkt);
void il_chswitch_done(struct il_priv *il, bool is_success);
-void il_rx_csa(struct il_priv *il, struct il_rx_mem_buffer *rxb);
+void il_rx_csa(struct il_priv *il, struct il_rx_buf *rxb);
/* TX helpers */
#define DEFAULT_SHORT_RETRY_LIMIT 7U
#define DEFAULT_LONG_RETRY_LIMIT 4U
-struct il_rx_mem_buffer {
+struct il_rx_buf {
dma_addr_t page_dma;
struct page *page;
struct list_head list;
* @rb_stts: driver's pointer to receive buffer status
* @rb_stts_dma: bus address of receive buffer status
*
- * NOTE: rx_free and rx_used are used as a FIFO for il_rx_mem_buffers
+ * NOTE: rx_free and rx_used are used as a FIFO for il_rx_bufs
*/
struct il_rx_queue {
__le32 *bd;
dma_addr_t bd_dma;
- struct il_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS];
- struct il_rx_mem_buffer *queue[RX_QUEUE_SIZE];
+ struct il_rx_buf pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS];
+ struct il_rx_buf *queue[RX_QUEUE_SIZE];
u32 read;
u32 write;
u32 free_count;
int alloc_rxb_page;
void (*rx_handlers[REPLY_MAX])(struct il_priv *il,
- struct il_rx_mem_buffer *rxb);
+ struct il_rx_buf *rxb);
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
* are available, schedules il_rx_replenish
*
* -- enable interrupts --
- * ISR - il_rx() Detach il_rx_mem_buffers from pool up to the
+ * ISR - il_rx() Detach il_rx_bufs from pool up to the
* READ INDEX, detaching the SKB from the pool.
* Moves the packet buffer from queue to rx_used.
* Calls il_rx_queue_restock to refill any empty
void il_rx_spectrum_measure_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_spectrum_notification *report = &(pkt->u.spectrum_notif);
/* Service response to REPLY_SCAN_CMD (0x80) */
static void il_rx_reply_scan(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
struct il_rx_pkt *pkt = rxb_addr(rxb);
/* Service SCAN_START_NOTIFICATION (0x82) */
static void il_rx_scan_start_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_scanstart_notification *notif =
/* Service SCAN_RESULTS_NOTIFICATION (0x83) */
static void il_rx_scan_results_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
struct il_rx_pkt *pkt = rxb_addr(rxb);
/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
static void il_rx_scan_complete_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
* if the callback returns 1
*/
void
-il_tx_cmd_complete(struct il_priv *il, struct il_rx_mem_buffer *rxb)
+il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
}
static void il3945_rx_reply_alive(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_alive_resp *palive;
}
static void il3945_rx_reply_add_sta(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
struct il_rx_pkt *pkt = rxb_addr(rxb);
}
static void il3945_rx_beacon_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il3945_beacon_notif *beacon = &(pkt->u.beacon_status);
/* Handle notification from uCode that card's power state is changing
* due to software, hardware, or critical temperature RFKILL */
static void il3945_rx_card_state_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags);
* are available, schedules il3945_rx_replenish
*
* -- enable interrupts --
- * ISR - il3945_rx() Detach il_rx_mem_buffers from pool up to the
+ * ISR - il3945_rx() Detach il_rx_bufs from pool up to the
* READ INDEX, detaching the SKB from the pool.
* Moves the packet buffer from queue to rx_used.
* Calls il3945_rx_queue_restock to refill any empty
{
struct il_rx_queue *rxq = &il->rxq;
struct list_head *element;
- struct il_rx_mem_buffer *rxb;
+ struct il_rx_buf *rxb;
unsigned long flags;
int write;
while (il_rx_queue_space(rxq) > 0 && rxq->free_count) {
/* Get next free Rx buffer, remove from free list */
element = rxq->rx_free.next;
- rxb = list_entry(element, struct il_rx_mem_buffer, list);
+ rxb = list_entry(element, struct il_rx_buf, list);
list_del(element);
/* Point to Rx buffer via next RBD in circular buffer */
{
struct il_rx_queue *rxq = &il->rxq;
struct list_head *element;
- struct il_rx_mem_buffer *rxb;
+ struct il_rx_buf *rxb;
struct page *page;
unsigned long flags;
gfp_t gfp_mask = priority;
return;
}
element = rxq->rx_used.next;
- rxb = list_entry(element, struct il_rx_mem_buffer, list);
+ rxb = list_entry(element, struct il_rx_buf, list);
list_del(element);
spin_unlock_irqrestore(&rxq->lock, flags);
*/
static void il3945_rx_handle(struct il_priv *il)
{
- struct il_rx_mem_buffer *rxb;
+ struct il_rx_buf *rxb;
struct il_rx_pkt *pkt;
struct il_rx_queue *rxq = &il->rxq;
u32 r, i;
*
******************************************************************************/
static void il4965_rx_reply_alive(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_alive_resp *palive;
}
static void il4965_rx_beacon_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il4965_beacon_notif *beacon =
/* Handle notification from uCode that card's power state is changing
* due to software, hardware, or critical temperature RFKILL */
static void il4965_rx_card_state_notif(struct il_priv *il,
- struct il_rx_mem_buffer *rxb)
+ struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags);
*/
void il4965_rx_handle(struct il_priv *il)
{
- struct il_rx_mem_buffer *rxb;
+ struct il_rx_buf *rxb;
struct il_rx_pkt *pkt;
struct il_rx_queue *rxq = &il->rxq;
u32 r, i;