static void il3945_rx_reply_tx(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
int txq_id = SEQ_TO_QUEUE(sequence);
int index = SEQ_TO_INDEX(sequence);
void il3945_hw_rx_statistics(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
D_RX("Statistics notification received (%d vs %d).\n",
(int)sizeof(struct il3945_notif_statistics),
void il3945_reply_statistics(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
__le32 *flag = (__le32 *)&pkt->u.raw;
if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) {
struct il_rx_mem_buffer *rxb,
struct ieee80211_rx_status *stats)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IL_RX_DATA(pkt);
struct il3945_rx_frame_hdr *rx_hdr = IL_RX_HDR(pkt);
struct il3945_rx_frame_end *rx_end = IL_RX_END(pkt);
{
struct ieee80211_hdr *header;
struct ieee80211_rx_status rx_status;
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il3945_rx_frame_stats *rx_stats = IL_RX_STATS(pkt);
struct il3945_rx_frame_hdr *rx_hdr = IL_RX_HDR(pkt);
struct il3945_rx_frame_end *rx_end = IL_RX_END(pkt);
struct il_rxon_context *ctx)
{
int rc = 0;
- struct il_rx_packet *pkt;
+ struct il_rx_pkt *pkt;
struct il3945_rxon_assoc_cmd rxon_assoc;
struct il_host_cmd cmd = {
.id = REPLY_RXON_ASSOC,
if (rc)
return rc;
- pkt = (struct il_rx_packet *)cmd.reply_page;
+ pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
IL_ERR("Bad return from REPLY_RXON_ASSOC command\n");
rc = -EIO;
{
struct ieee80211_hdr *header;
struct ieee80211_rx_status rx_status;
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_rx_phy_res *phy_res;
__le32 rx_pkt_status;
struct il_rx_mpdu_res_start *amsdu;
void il4965_rx_reply_rx_phy(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
il->_4965.last_phy_res_valid = true;
memcpy(&il->_4965.last_phy_res, pkt->u.raw,
sizeof(struct il_rx_phy_res));
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_missed_beacon_notif *missed_beacon;
missed_beacon = &pkt->u.missed_beacon;
struct il_rx_mem_buffer *rxb)
{
int change;
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
D_RX(
"Statistics notification received (%d vs %d).\n",
void il4965_reply_statistics(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) {
#ifdef CONFIG_IWLEGACY_DEBUGFS
void il4965_rx_reply_compressed_ba(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_compressed_ba_resp *ba_resp = &pkt->u.compressed_ba;
struct il_tx_queue *txq = NULL;
struct il_ht_agg *agg;
static void il4965_rx_reply_tx(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
int txq_id = SEQ_TO_QUEUE(sequence);
int index = SEQ_TO_INDEX(sequence);
static void il4965_rx_beacon_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il4965_beacon_notif *beacon = (void *)pkt->u.raw;
u8 rate __maybe_unused =
il4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags);
void il4965_rx_missed_beacon_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb);
bool il4965_good_plcp_health(struct il_priv *il,
- struct il_rx_packet *pkt);
+ struct il_rx_pkt *pkt);
void il4965_rx_statistics(struct il_priv *il,
struct il_rx_mem_buffer *rxb);
void il4965_reply_statistics(struct il_priv *il,
*
*****************************************************************************/
-struct il_rx_packet {
+struct il_rx_pkt {
/*
* The first 4 bytes of the RX frame header contain both the RX frame
* size and some flags.
void il_rx_csa(struct il_priv *il, struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_csa_notification *csa = &(pkt->u.csa_notif);
struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS];
struct il_rx_mem_buffer *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_sleep_notification *sleep = &(pkt->u.sleep_notif);
D_RX("sleep mode: %d, src: %d\n",
sleep->pm_sleep_mode, sleep->pm_wakeup_src);
void il_rx_pm_debug_statistics_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
D_RADIO("Dumping %d bytes of unhandled "
"notification for %s:\n", len,
void il_rx_reply_error(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
IL_ERR("Error Reply type 0x%08X cmd %s (0x%02X) "
"seq 0x%04X ser 0x%08X\n",
void il_rx_spectrum_measure_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb);
void il_recover_from_statistics(struct il_priv *il,
- struct il_rx_packet *pkt);
+ 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);
const void *data,
void (*callback)(struct il_priv *il,
struct il_device_cmd *cmd,
- struct il_rx_packet *pkt));
+ struct il_rx_pkt *pkt));
int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd);
*/
void (*callback)(struct il_priv *il,
struct il_device_cmd *cmd,
- struct il_rx_packet *pkt);
+ struct il_rx_pkt *pkt);
/* The CMD_SIZE_HUGE flag bit indicates that the command
* structure is stored at the end of the shared queue memory. */
unsigned long reply_page;
void (*callback)(struct il_priv *il,
struct il_device_cmd *cmd,
- struct il_rx_packet *pkt);
+ struct il_rx_pkt *pkt);
u32 flags;
u16 len;
u8 id;
static void il_generic_cmd_callback(struct il_priv *il,
struct il_device_cmd *cmd,
- struct il_rx_packet *pkt)
+ struct il_rx_pkt *pkt)
{
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
IL_ERR("Bad return from %s (0x%08X)\n",
u8 id, u16 len, const void *data,
void (*callback)(struct il_priv *il,
struct il_device_cmd *cmd,
- struct il_rx_packet *pkt))
+ struct il_rx_pkt *pkt))
{
struct il_host_cmd cmd = {
.id = id,
void il_rx_spectrum_measure_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_spectrum_notification *report = &(pkt->u.spectrum_notif);
if (!report->state) {
static int il_send_scan_abort(struct il_priv *il)
{
int ret;
- struct il_rx_packet *pkt;
+ struct il_rx_pkt *pkt;
struct il_host_cmd cmd = {
.id = REPLY_SCAN_ABORT_CMD,
.flags = CMD_WANT_SKB,
if (ret)
return ret;
- pkt = (struct il_rx_packet *)cmd.reply_page;
+ pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->u.status != CAN_ABORT_STATUS) {
/* The scan abort will return 1 for success or
* 2 for "failure". A failure condition can be
struct il_rx_mem_buffer *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_scanreq_notification *notif =
(struct il_scanreq_notification *)pkt->u.raw;
static void il_rx_scan_start_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_scanstart_notification *notif =
(struct il_scanstart_notification *)pkt->u.raw;
il->scan_start_tsf = le32_to_cpu(notif->tsf_low);
struct il_rx_mem_buffer *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_scanresults_notification *notif =
(struct il_scanresults_notification *)pkt->u.raw;
{
#ifdef CONFIG_IWLEGACY_DEBUG
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_scancomplete_notification *scan_notif = (void *)pkt->u.raw;
#endif
static int il_process_add_sta_resp(struct il_priv *il,
struct il_addsta_cmd *addsta,
- struct il_rx_packet *pkt,
+ struct il_rx_pkt *pkt,
bool sync)
{
u8 sta_id = addsta->sta.sta_id;
static void il_add_sta_callback(struct il_priv *il,
struct il_device_cmd *cmd,
- struct il_rx_packet *pkt)
+ struct il_rx_pkt *pkt)
{
struct il_addsta_cmd *addsta =
(struct il_addsta_cmd *)cmd->cmd.payload;
int il_send_add_sta(struct il_priv *il,
struct il_addsta_cmd *sta, u8 flags)
{
- struct il_rx_packet *pkt = NULL;
+ struct il_rx_pkt *pkt = NULL;
int ret = 0;
u8 data[sizeof(*sta)];
struct il_host_cmd cmd = {
return ret;
if (ret == 0) {
- pkt = (struct il_rx_packet *)cmd.reply_page;
+ pkt = (struct il_rx_pkt *)cmd.reply_page;
ret = il_process_add_sta_resp(il, sta, pkt, true);
}
il_free_pages(il, cmd.reply_page);
const u8 *addr, int sta_id,
bool temporary)
{
- struct il_rx_packet *pkt;
+ struct il_rx_pkt *pkt;
int ret;
unsigned long flags_spin;
if (ret)
return ret;
- pkt = (struct il_rx_packet *)cmd.reply_page;
+ pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
IL_ERR("Bad return from REPLY_REMOVE_STA (0x%08X)\n",
pkt->hdr.flags);
void
il_tx_cmd_complete(struct il_priv *il, struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
int txq_id = SEQ_TO_QUEUE(sequence);
int index = SEQ_TO_INDEX(sequence);
u8 type)
{
struct il_spectrum_cmd spectrum;
- struct il_rx_packet *pkt;
+ struct il_rx_pkt *pkt;
struct il_host_cmd cmd = {
.id = REPLY_SPECTRUM_MEASUREMENT_CMD,
.data = (void *)&spectrum,
if (rc)
return rc;
- pkt = (struct il_rx_packet *)cmd.reply_page;
+ pkt = (struct il_rx_pkt *)cmd.reply_page;
if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
IL_ERR("Bad return from REPLY_RX_ON_ASSOC command\n");
rc = -EIO;
static void il3945_rx_reply_alive(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_alive_resp *palive;
struct delayed_work *pwork;
struct il_rx_mem_buffer *rxb)
{
#ifdef CONFIG_IWLEGACY_DEBUG
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
#endif
D_RX("Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status);
static void il3945_rx_beacon_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il3945_beacon_notif *beacon = &(pkt->u.beacon_status);
#ifdef CONFIG_IWLEGACY_DEBUG
u8 rate = beacon->beacon_notify_hdr.rate;
static void il3945_rx_card_state_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags);
unsigned long status = il->status;
static void il3945_rx_handle(struct il_priv *il)
{
struct il_rx_mem_buffer *rxb;
- struct il_rx_packet *pkt;
+ struct il_rx_pkt *pkt;
struct il_rx_queue *rxq = &il->rxq;
u32 r, i;
int reclaim;
static void il4965_rx_reply_alive(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_alive_resp *palive;
struct delayed_work *pwork;
static void il4965_rx_beacon_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il4965_beacon_notif *beacon =
(struct il4965_beacon_notif *)pkt->u.raw;
#ifdef CONFIG_IWLEGACY_DEBUG
static void il4965_rx_card_state_notif(struct il_priv *il,
struct il_rx_mem_buffer *rxb)
{
- struct il_rx_packet *pkt = rxb_addr(rxb);
+ struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags);
unsigned long status = il->status;
void il4965_rx_handle(struct il_priv *il)
{
struct il_rx_mem_buffer *rxb;
- struct il_rx_packet *pkt;
+ struct il_rx_pkt *pkt;
struct il_rx_queue *rxq = &il->rxq;
u32 r, i;
int reclaim;