• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/wireless/iwmc3200wifi/

Lines Matching defs:iwm

50 #include "iwm.h"
98 static int iwm_ntf_error(struct iwm_priv *iwm, u8 *buf,
107 memcpy(iwm->last_fw_err, fw_err, sizeof(struct iwm_fw_error_hdr));
109 IWM_ERR(iwm, "%cMAC FW ERROR:\n",
111 IWM_ERR(iwm, "\tCategory: %d\n", le32_to_cpu(fw_err->category));
112 IWM_ERR(iwm, "\tStatus: 0x%x\n", le32_to_cpu(fw_err->status));
113 IWM_ERR(iwm, "\tPC: 0x%x\n", le32_to_cpu(fw_err->pc));
114 IWM_ERR(iwm, "\tblink1: %d\n", le32_to_cpu(fw_err->blink1));
115 IWM_ERR(iwm, "\tblink2: %d\n", le32_to_cpu(fw_err->blink2));
116 IWM_ERR(iwm, "\tilink1: %d\n", le32_to_cpu(fw_err->ilink1));
117 IWM_ERR(iwm, "\tilink2: %d\n", le32_to_cpu(fw_err->ilink2));
118 IWM_ERR(iwm, "\tData1: 0x%x\n", le32_to_cpu(fw_err->data1));
119 IWM_ERR(iwm, "\tData2: 0x%x\n", le32_to_cpu(fw_err->data2));
120 IWM_ERR(iwm, "\tLine number: %d\n", le32_to_cpu(fw_err->line_num));
121 IWM_ERR(iwm, "\tUMAC status: 0x%x\n", le32_to_cpu(fw_err->umac_status));
122 IWM_ERR(iwm, "\tLMAC status: 0x%x\n", le32_to_cpu(fw_err->lmac_status));
123 IWM_ERR(iwm, "\tSDIO status: 0x%x\n", le32_to_cpu(fw_err->sdio_status));
125 iwm_resetting(iwm);
130 static int iwm_ntf_umac_alive(struct iwm_priv *iwm, u8 *buf,
138 IWM_ERR(iwm, "Receive error UMAC_ALIVE\n");
142 iwm_tx_credit_init_pools(iwm, alive_resp);
147 static int iwm_ntf_init_complete(struct iwm_priv *iwm, u8 *buf,
151 struct wiphy *wiphy = iwm_to_wiphy(iwm);
158 IWM_DBG_NTF(iwm, DBG, "Hardware rf kill is on (radio off)\n");
160 IWM_DBG_NTF(iwm, DBG, "Hardware rf kill is off (radio on)\n");
167 static int iwm_ntf_tx_credit_update(struct iwm_priv *iwm, u8 *buf,
180 IWM_DBG_TX(iwm, DBG, "UMAC dealloc notification: pool nr %d, "
183 spin_lock(&iwm->tx_credit.lock);
191 iwm_tx_credit_inc(iwm, id, total_freed_pages);
195 spin_unlock(&iwm->tx_credit.lock);
200 static int iwm_ntf_umac_reset(struct iwm_priv *iwm, u8 *buf,
203 IWM_DBG_NTF(iwm, DBG, "UMAC RESET done\n");
208 static int iwm_ntf_lmac_version(struct iwm_priv *iwm, u8 *buf,
212 IWM_DBG_NTF(iwm, INFO, "LMAC Version: %x.%x\n", buf[9], buf[8]);
217 static int iwm_ntf_tx(struct iwm_priv *iwm, u8 *buf,
227 IWM_DBG_TX(iwm, DBG, "REPLY_TX, buf size: %lu\n", buf_size);
229 IWM_DBG_TX(iwm, DBG, "Seqnum: %d\n",
231 IWM_DBG_TX(iwm, DBG, "\tFrame cnt: %d\n", tx_resp->frame_cnt);
232 IWM_DBG_TX(iwm, DBG, "\tRetry cnt: %d\n",
234 IWM_DBG_TX(iwm, DBG, "\tSeq ctl: %d\n", le16_to_cpu(tx_resp->seq_ctl));
235 IWM_DBG_TX(iwm, DBG, "\tByte cnt: %d\n",
237 IWM_DBG_TX(iwm, DBG, "\tStatus: 0x%x\n", le32_to_cpu(tx_resp->status));
243 static int iwm_ntf_calib_res(struct iwm_priv *iwm, u8 *buf,
256 IWM_DBG_NTF(iwm, DBG, "Store calibration result for opcode: %d\n",
260 calib_buf = iwm->calib_res[opcode].buf;
262 if (!calib_buf || (iwm->calib_res[opcode].size < buf_size)) {
266 IWM_ERR(iwm, "Memory allocation failed: calib_res\n");
269 iwm->calib_res[opcode].buf = calib_buf;
270 iwm->calib_res[opcode].size = buf_size;
274 set_bit(opcode - PHY_CALIBRATE_OPCODES_NUM, &iwm->calib_done_map);
279 static int iwm_ntf_calib_complete(struct iwm_priv *iwm, u8 *buf,
283 IWM_DBG_NTF(iwm, DBG, "Calibration completed\n");
288 static int iwm_ntf_calib_cfg(struct iwm_priv *iwm, u8 *buf,
296 IWM_DBG_NTF(iwm, DBG, "Calibration CFG command status: %d\n",
302 static int iwm_ntf_wifi_status(struct iwm_priv *iwm, u8 *buf,
308 iwm->core_enabled |= le16_to_cpu(status->status);
314 iwm_rx_ticket_node_alloc(struct iwm_priv *iwm, struct iwm_rx_ticket *ticket)
320 IWM_ERR(iwm, "Couldn't allocate ticket node\n");
327 IWM_ERR(iwm, "Couldn't allocate RX ticket\n");
343 static struct iwm_rx_packet *iwm_rx_packet_get(struct iwm_priv *iwm, u16 id)
348 spin_lock(&iwm->packet_lock[id_hash]);
349 list_for_each_entry(packet, &iwm->rx_packets[id_hash], node)
352 spin_unlock(&iwm->packet_lock[id_hash]);
356 spin_unlock(&iwm->packet_lock[id_hash]);
360 static struct iwm_rx_packet *iwm_rx_packet_alloc(struct iwm_priv *iwm, u8 *buf,
367 IWM_ERR(iwm, "Couldn't allocate packet\n");
373 IWM_ERR(iwm, "Couldn't allocate packet SKB\n");
388 void iwm_rx_free(struct iwm_priv *iwm)
394 spin_lock(&iwm->ticket_lock);
395 list_for_each_entry_safe(ticket, nt, &iwm->rx_tickets, node) {
399 spin_unlock(&iwm->ticket_lock);
402 spin_lock(&iwm->packet_lock[i]);
403 list_for_each_entry_safe(packet, np, &iwm->rx_packets[i],
409 spin_unlock(&iwm->packet_lock[i]);
413 static int iwm_ntf_rx_ticket(struct iwm_priv *iwm, u8 *buf,
429 ticket_node = iwm_rx_ticket_node_alloc(iwm, ticket);
433 IWM_DBG_RX(iwm, DBG, "TICKET %s(%d)\n",
438 spin_lock(&iwm->ticket_lock);
439 list_add_tail(&ticket_node->node, &iwm->rx_tickets);
440 spin_unlock(&iwm->ticket_lock);
453 IWM_ERR(iwm, "Invalid RX ticket action: 0x%x\n",
461 queue_work(iwm->rx_wq, &iwm->rx_worker);
466 static int iwm_ntf_rx_packet(struct iwm_priv *iwm, u8 *buf,
475 IWM_DBG_RX(iwm, DBG, "\n");
482 IWM_DBG_RX(iwm, DBG, "CMD:0x%x, seqnum: %d, packet size: %d\n",
484 IWM_DBG_RX(iwm, DBG, "Packet id: %d\n", id);
485 IWM_HEXDUMP(iwm, DBG, RX, "PACKET: ", buf + buf_offset, packet_size);
487 packet = iwm_rx_packet_alloc(iwm, buf + buf_offset, packet_size, id);
492 spin_lock(&iwm->packet_lock[id_hash]);
493 list_add_tail(&packet->node, &iwm->rx_packets[id_hash]);
494 spin_unlock(&iwm->packet_lock[id_hash]);
497 queue_work(iwm->rx_wq, &iwm->rx_worker);
503 static int iwm_mlme_assoc_start(struct iwm_priv *iwm, u8 *buf,
511 IWM_DBG_MLME(iwm, INFO, "Association with %pM Started, reason: %d\n",
514 wake_up_interruptible(&iwm->mlme_queue);
519 static u8 iwm_is_open_wep_profile(struct iwm_priv *iwm)
521 if ((iwm->umac_profile->sec.ucast_cipher == UMAC_CIPHER_TYPE_WEP_40 ||
522 iwm->umac_profile->sec.ucast_cipher == UMAC_CIPHER_TYPE_WEP_104) &&
523 (iwm->umac_profile->sec.ucast_cipher ==
524 iwm->umac_profile->sec.mcast_cipher) &&
525 (iwm->umac_profile->sec.auth_type == UMAC_AUTH_TYPE_OPEN))
531 static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
535 struct wiphy *wiphy = iwm_to_wiphy(iwm);
540 IWM_DBG_MLME(iwm, INFO, "Association with %pM completed, status: %d\n",
549 __iwm_invalidate_mlme_profile(iwm);
550 IWM_WARN(iwm, "Couldn't associate with %pM due to "
557 set_bit(IWM_STATUS_ASSOCIATED, &iwm->status);
558 memcpy(iwm->bssid, complete->bssid, ETH_ALEN);
559 iwm->channel = complete->channel;
562 if (!test_and_clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status)
563 && iwm->conf.mode == UMAC_MODE_BSS) {
564 cancel_delayed_work(&iwm->disconnect);
565 cfg80211_roamed(iwm_to_ndev(iwm),
567 iwm->req_ie, iwm->req_ie_len,
568 iwm->resp_ie, iwm->resp_ie_len,
573 iwm_link_on(iwm);
575 if (iwm->conf.mode == UMAC_MODE_IBSS)
578 if (!test_bit(IWM_STATUS_RESETTING, &iwm->status))
579 cfg80211_connect_result(iwm_to_ndev(iwm),
581 iwm->req_ie, iwm->req_ie_len,
582 iwm->resp_ie, iwm->resp_ie_len,
586 cfg80211_roamed(iwm_to_ndev(iwm),
588 iwm->req_ie, iwm->req_ie_len,
589 iwm->resp_ie, iwm->resp_ie_len,
594 clear_bit(IWM_STATUS_ASSOCIATED, &iwm->status);
595 memset(iwm->bssid, 0, ETH_ALEN);
596 iwm->channel = 0;
599 if (!test_and_clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status)
600 && iwm->conf.mode == UMAC_MODE_BSS) {
601 cancel_delayed_work(&iwm->disconnect);
605 iwm_link_off(iwm);
607 if (iwm->conf.mode == UMAC_MODE_IBSS)
610 if (!test_bit(IWM_STATUS_RESETTING, &iwm->status))
611 if (!iwm_is_open_wep_profile(iwm)) {
612 cfg80211_connect_result(iwm_to_ndev(iwm),
619 IWM_ERR(iwm, "Trying WEP shared auth\n");
620 schedule_work(&iwm->auth_retry_worker);
623 cfg80211_disconnected(iwm_to_ndev(iwm), 0, NULL, 0,
630 clear_bit(IWM_STATUS_RESETTING, &iwm->status);
634 cfg80211_ibss_joined(iwm_to_ndev(iwm), iwm->bssid, GFP_KERNEL);
635 clear_bit(IWM_STATUS_RESETTING, &iwm->status);
639 static int iwm_mlme_profile_invalidate(struct iwm_priv *iwm, u8 *buf,
649 IWM_DBG_MLME(iwm, INFO, "Profile Invalidated. Reason: %d\n", reason);
652 test_bit(IWM_STATUS_SME_CONNECTING, &iwm->status))
653 cfg80211_connect_result(iwm_to_ndev(iwm), NULL, NULL, 0, NULL,
657 clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status);
658 clear_bit(IWM_STATUS_ASSOCIATED, &iwm->status);
660 iwm->umac_profile_active = 0;
661 memset(iwm->bssid, 0, ETH_ALEN);
662 iwm->channel = 0;
664 iwm_link_off(iwm);
666 wake_up_interruptible(&iwm->mlme_queue);
673 static int iwm_mlme_connection_terminated(struct iwm_priv *iwm, u8 *buf,
677 IWM_DBG_MLME(iwm, DBG, "Connection terminated\n");
679 schedule_delayed_work(&iwm->disconnect, IWM_DISCONNECT_INTERVAL);
684 static int iwm_mlme_scan_complete(struct iwm_priv *iwm, u8 *buf,
693 IWM_DBG_MLME(iwm, INFO, "type:0x%x result:0x%x seq:%d\n",
698 if (!test_and_clear_bit(IWM_STATUS_SCANNING, &iwm->status)) {
699 IWM_ERR(iwm, "Scan complete while device not scanning\n");
702 if (!iwm->scan_request)
705 ret = iwm_cfg80211_inform_bss(iwm);
707 cfg80211_scan_done(iwm->scan_request,
709 iwm->scan_request = NULL;
714 static int iwm_mlme_update_sta_table(struct iwm_priv *iwm, u8 *buf,
725 sta = &iwm->sta_table[GET_VAL8(umac_sta->sta_id, LMAC_STA_ID)];
727 IWM_DBG_MLME(iwm, INFO, "%s STA: ID = %d, Color = %d, "
741 IWM_DBG_MLME(iwm, INFO, "Remove STA: ID = %d, Color = %d, "
747 sta = &iwm->sta_table[GET_VAL8(umac_sta->sta_id, LMAC_STA_ID)];
755 iwm->sta_table[i].valid = 0;
765 static int iwm_mlme_medium_lost(struct iwm_priv *iwm, u8 *buf,
769 struct wiphy *wiphy = iwm_to_wiphy(iwm);
771 IWM_DBG_NTF(iwm, DBG, "WiFi/WiMax coexistence radio is OFF\n");
778 static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
782 struct wiphy *wiphy = iwm_to_wiphy(iwm);
796 IWM_DBG_MLME(iwm, DBG, "New BSS info entry: %pM\n", mgmt->bssid);
797 IWM_DBG_MLME(iwm, DBG, "\tType: 0x%x\n", le32_to_cpu(umac_bss->type));
798 IWM_DBG_MLME(iwm, DBG, "\tTimestamp: %d\n",
800 IWM_DBG_MLME(iwm, DBG, "\tTable Index: %d\n",
802 IWM_DBG_MLME(iwm, DBG, "\tBand: %d\n", umac_bss->band);
803 IWM_DBG_MLME(iwm, DBG, "\tChannel: %d\n", umac_bss->channel);
804 IWM_DBG_MLME(iwm, DBG, "\tRSSI: %d\n", umac_bss->rssi);
805 IWM_DBG_MLME(iwm, DBG, "\tFrame Length: %d\n", frame_len);
807 list_for_each_entry(bss, &iwm->bss_list, node)
811 if (&bss->node != &iwm->bss_list) {
820 IWM_ERR(iwm, "Couldn't allocate bss_info\n");
828 IWM_ERR(iwm, "Couldn't allocate bss\n");
840 IWM_ERR(iwm, "Invalid band: %d\n", umac_bss->band);
854 list_add_tail(&bss->node, &iwm->bss_list);
864 static int iwm_mlme_remove_bss(struct iwm_priv *iwm, u8 *buf,
876 list_for_each_entry_safe(bss, next, &iwm->bss_list, node)
882 IWM_DBG_MLME(iwm, ERR, "BSS removed: %pM\n",
893 static int iwm_mlme_mgt_frame(struct iwm_priv *iwm, u8 *buf,
900 IWM_HEXDUMP(iwm, DBG, MLME, "MGT: ", mgt_frame->frame,
904 iwm->req_ie_len = le16_to_cpu(mgt_frame->len)
907 kfree(iwm->req_ie);
908 iwm->req_ie = kmemdup(mgt->u.assoc_req.variable,
909 iwm->req_ie_len, GFP_KERNEL);
911 iwm->req_ie_len = le16_to_cpu(mgt_frame->len)
914 kfree(iwm->req_ie);
915 iwm->req_ie = kmemdup(mgt->u.reassoc_req.variable,
916 iwm->req_ie_len, GFP_KERNEL);
918 iwm->resp_ie_len = le16_to_cpu(mgt_frame->len)
921 kfree(iwm->resp_ie);
922 iwm->resp_ie = kmemdup(mgt->u.assoc_resp.variable,
923 iwm->resp_ie_len, GFP_KERNEL);
925 iwm->resp_ie_len = le16_to_cpu(mgt_frame->len)
928 kfree(iwm->resp_ie);
929 iwm->resp_ie = kmemdup(mgt->u.reassoc_resp.variable,
930 iwm->resp_ie_len, GFP_KERNEL);
932 IWM_ERR(iwm, "Unsupported management frame: 0x%x",
940 static int iwm_ntf_mlme(struct iwm_priv *iwm, u8 *buf,
948 return iwm_mlme_assoc_start(iwm, buf, buf_size, cmd);
950 return iwm_mlme_assoc_complete(iwm, buf, buf_size, cmd);
952 return iwm_mlme_profile_invalidate(iwm, buf, buf_size, cmd);
954 return iwm_mlme_connection_terminated(iwm, buf, buf_size, cmd);
956 return iwm_mlme_scan_complete(iwm, buf, buf_size, cmd);
958 return iwm_mlme_update_sta_table(iwm, buf, buf_size, cmd);
960 IWM_DBG_MLME(iwm, DBG, "Extended IE required\n");
963 return iwm_mlme_medium_lost(iwm, buf, buf_size, cmd);
965 return iwm_mlme_update_bss_table(iwm, buf, buf_size, cmd);
967 return iwm_mlme_remove_bss(iwm, buf, buf_size, cmd);
970 return iwm_mlme_mgt_frame(iwm, buf, buf_size, cmd);
981 IWM_DBG_MLME(iwm, DBG, "MLME debug notification: 0x%x\n",
985 IWM_ERR(iwm, "Unhandled notification: 0x%x\n", notif->status);
994 static int iwm_ntf_statistics(struct iwm_priv *iwm, u8 *buf,
998 struct iw_statistics *wstats = &iwm->wstats;
1002 IWM_DBG_MLME(iwm, DBG, "Statistics notification received\n");
1004 if (test_bit(IWM_STATUS_ASSOCIATED, &iwm->status)) {
1011 iwm->rate = max_rate >> 1;
1013 iwm->txpower = le32_to_cpu(stats->tx_power);
1036 schedule_delayed_work(&iwm->stats_request, IWM_STATS_UPDATE_INTERVAL);
1038 mod_timer(&iwm->watchdog, round_jiffies(jiffies + IWM_WATCHDOG_PERIOD));
1043 static int iwm_ntf_eeprom_proxy(struct iwm_priv *iwm, u8 *buf,
1055 IWM_DBG_NTF(iwm, DBG, "type: 0x%x, len: %d, offset: 0x%x\n",
1063 memcpy(iwm->eeprom + hdr_offset, eeprom_proxy->buf, hdr_len);
1073 static int iwm_ntf_channel_info_list(struct iwm_priv *iwm, u8 *buf,
1080 struct wiphy *wiphy = iwm_to_wiphy(iwm);
1117 static int iwm_ntf_stop_resume_tx(struct iwm_priv *iwm, u8 *buf,
1130 IWM_DBG_NTF(iwm, DBG, "stop/resume notification:\n"
1140 sta_info = &iwm->sta_table[sta_id];
1142 IWM_ERR(iwm, "Stoping an invalid STA: %d %d\n",
1161 txq = &iwm->txq[queue];
1177 ret = iwm_send_umac_stop_resume_tx(iwm, stp_res_tx);
1182 static int iwm_ntf_wifi_if_wrapper(struct iwm_priv *iwm, u8 *buf,
1189 IWM_ERR(iwm, "Couldn't find expected wifi command\n");
1195 IWM_DBG_NTF(iwm, DBG, "WIFI_IF_WRAPPER cmd is delivered to UMAC: "
1199 set_bit(hdr->oid, &iwm->wifi_ntfy[0]);
1200 wake_up_interruptible(&iwm->wifi_ntfy_queue);
1206 iwm->umac_profile_active = 1;
1216 static int iwm_ntf_card_state(struct iwm_priv *iwm, u8 *buf,
1219 struct wiphy *wiphy = iwm_to_wiphy(iwm);
1224 IWM_INFO(iwm, "HW RF Kill %s, CT Kill %s\n",
1235 cancel_delayed_work_sync(&iwm->ct_kill_delay);
1236 schedule_delayed_work(&iwm->ct_kill_delay, CT_KILL_DELAY);
1246 static int iwm_rx_handle_wifi(struct iwm_priv *iwm, u8 *buf,
1259 IWM_CRIT(iwm, "invalid source %d\n", source);
1264 trace_iwm_rx_packet(iwm, buf, buf_size);
1267 trace_iwm_rx_ticket(iwm, buf, buf_size);
1269 trace_iwm_rx_wifi_cmd(iwm, wifi_hdr);
1275 IWM_CRIT(iwm, "count %d, buf size:%ld\n", count, buf_size);
1281 IWM_DBG_RX(iwm, DBG, "CMD:0x%x, source: 0x%x, seqnum: %d\n",
1288 cmd = iwm_get_pending_wifi_cmd(iwm, seq_num);
1293 if (iwm->lmac_handlers[cmd_id] &&
1294 test_bit(cmd_id, &iwm->lmac_handler_map[0]))
1295 return iwm_notif_send(iwm, cmd, cmd_id, source,
1299 if (iwm->umac_handlers[cmd_id] &&
1300 test_bit(cmd_id, &iwm->umac_handler_map[0]))
1301 return iwm_notif_send(iwm, cmd, cmd_id, source,
1308 return iwm_rx_handle_resp(iwm, buf, count, cmd);
1311 int iwm_rx_handle_resp(struct iwm_priv *iwm, u8 *buf, unsigned long buf_size,
1323 IWM_DBG_RX(iwm, DBG, "CMD:0x%x, source: 0x%x\n", cmd_id, source);
1327 if (iwm->lmac_handlers[cmd_id])
1328 ret = iwm->lmac_handlers[cmd_id]
1329 (iwm, buf, buf_size, cmd);
1332 if (iwm->umac_handlers[cmd_id])
1333 ret = iwm->umac_handlers[cmd_id]
1334 (iwm, buf, buf_size, cmd);
1346 static int iwm_rx_handle_nonwifi(struct iwm_priv *iwm, u8 *buf,
1353 trace_iwm_rx_nonwifi_cmd(iwm, buf, buf_size);
1364 list_for_each_entry(cmd, &iwm->nonwifi_pending_cmd, pending)
1369 wake_up_interruptible(&iwm->nonwifi_queue);
1375 static int iwm_rx_handle_umac(struct iwm_priv *iwm, u8 *buf,
1398 IWM_DBG_RX(iwm, DBG, "End of frame\n");
1404 IWM_DBG_RX(iwm, DBG, "Op code: 0x%x\n", op_code);
1407 ret |= iwm_rx_handle_wifi(iwm, buf + buf_offset,
1413 IWM_ERR(iwm, "Incorrect hw signature\n");
1416 ret |= iwm_rx_handle_nonwifi(iwm, buf + buf_offset,
1419 IWM_ERR(iwm, "Invalid RX opcode: 0x%x\n", op_code);
1429 int iwm_rx_handle(struct iwm_priv *iwm, u8 *buf, unsigned long buf_size)
1437 if (test_bit(IWM_STATUS_READY, &iwm->status)) {
1438 IWM_ERR(iwm, "Unexpected BARKER\n");
1440 schedule_work(&iwm->reset_worker);
1445 return iwm_notif_send(iwm, NULL, IWM_BARKER_REBOOT_NOTIFICATION,
1448 return iwm_notif_send(iwm, NULL, IWM_ACK_BARKER_NOTIFICATION,
1451 IWM_DBG_RX(iwm, DBG, "Received cmd: 0x%x\n", hdr->cmd);
1452 return iwm_rx_handle_umac(iwm, buf, buf_size);
1487 void iwm_rx_setup_handlers(struct iwm_priv *iwm)
1489 iwm->umac_handlers = (iwm_handler *) iwm_umac_handlers;
1490 iwm->lmac_handlers = (iwm_handler *) iwm_lmac_handlers;
1511 static void iwm_rx_adjust_packet(struct iwm_priv *iwm,
1527 IWM_DBG_RX(iwm, DBG, "Packet adjusted, len:%d, offset:%d, "
1532 IWM_HEXDUMP(iwm, DBG, RX, "RAW: ", packet->skb->data, packet->skb->len);
1552 IWM_HEXDUMP(iwm, DBG, RX, "ADJUSTED: ",
1569 static void iwm_rx_process_amsdu(struct iwm_priv *iwm, struct sk_buff *skb)
1571 struct wireless_dev *wdev = iwm_to_wdev(iwm);
1572 struct net_device *ndev = iwm_to_ndev(iwm);
1576 IWM_HEXDUMP(iwm, DBG, RX, "A-MSDU: ", skb->data, skb->len);
1590 IWM_ERR(iwm, "Packet dropped\n");
1596 static void iwm_rx_process_packet(struct iwm_priv *iwm,
1602 struct wireless_dev *wdev = iwm_to_wdev(iwm);
1603 struct net_device *ndev = iwm_to_ndev(iwm);
1605 IWM_DBG_RX(iwm, DBG, "Processing packet ID %d\n", packet->id);
1609 IWM_DBG_RX(iwm, DBG, "RELEASE packet\n");
1611 iwm_rx_adjust_packet(iwm, packet, ticket_node);
1612 skb->dev = iwm_to_ndev(iwm);
1617 iwm_rx_process_amsdu(iwm, skb);
1623 IWM_DBG_RX(iwm, DBG, "Couldn't convert 802.11 header - "
1629 IWM_HEXDUMP(iwm, DBG, RX, "802.3: ", skb->data, skb->len);
1639 IWM_ERR(iwm, "Packet dropped\n");
1644 IWM_DBG_RX(iwm, DBG, "DROP packet: 0x%x\n",
1649 IWM_ERR(iwm, "Unknown ticket action: %d\n",
1672 struct iwm_priv *iwm;
1675 iwm = container_of(work, struct iwm_priv, rx_worker);
1683 spin_lock(&iwm->ticket_lock);
1684 list_for_each_entry_safe(ticket, next, &iwm->rx_tickets, node) {
1686 iwm_rx_packet_get(iwm, le16_to_cpu(ticket->ticket->id));
1689 IWM_DBG_RX(iwm, DBG, "Skip rx_work: Wait for ticket %d "
1696 iwm_rx_process_packet(iwm, packet, ticket);
1698 spin_unlock(&iwm->ticket_lock);