static void iwm_sdio_isr_worker(struct work_struct *work) { struct iwm_sdio_priv *hw; struct iwm_priv *iwm; struct iwm_rx_info *rx_info; struct sk_buff *skb; u8 *rx_buf; unsigned long rx_size; hw = container_of(work, struct iwm_sdio_priv, isr_worker); iwm = hw_to_iwm(hw); while (!skb_queue_empty(&iwm->rx_list)) { skb = skb_dequeue(&iwm->rx_list); rx_info = skb_to_rx_info(skb); rx_size = rx_info->rx_size; rx_buf = skb->data; IWM_HEXDUMP(iwm, DBG, SDIO, "RX: ", rx_buf, rx_size); if (iwm_rx_handle(iwm, rx_buf, rx_size) < 0) IWM_WARN(iwm, "RX error\n"); kfree_skb(skb); } }
int iwm_send_prio_table(struct iwm_priv *iwm) { struct iwm_coex_prio_table_cmd coex_table_cmd; u32 coex_enabled, mode_enabled; memset(&coex_table_cmd, 0, sizeof(struct iwm_coex_prio_table_cmd)); coex_table_cmd.flags = COEX_FLAGS_STA_TABLE_VALID_MSK; switch (iwm->conf.coexist_mode) { case COEX_MODE_XOR: case COEX_MODE_CM: coex_enabled = 1; break; default: coex_enabled = 0; break; } switch (iwm->conf.mode) { case UMAC_MODE_BSS: case UMAC_MODE_IBSS: mode_enabled = 1; break; default: mode_enabled = 0; break; } if (coex_enabled && mode_enabled) { coex_table_cmd.flags |= COEX_FLAGS_COEX_ENABLE_MSK | COEX_FLAGS_ASSOC_WAKEUP_UMASK_MSK | COEX_FLAGS_UNASSOC_WAKEUP_UMASK_MSK; switch (iwm->conf.coexist_mode) { case COEX_MODE_XOR: memcpy(coex_table_cmd.sta_prio, iwm_sta_xor_prio_tbl, sizeof(iwm_sta_xor_prio_tbl)); break; case COEX_MODE_CM: memcpy(coex_table_cmd.sta_prio, iwm_sta_cm_prio_tbl, sizeof(iwm_sta_cm_prio_tbl)); break; default: IWM_ERR(iwm, "Invalid coex_mode 0x%x\n", iwm->conf.coexist_mode); break; } } else IWM_WARN(iwm, "coexistense disabled\n"); return iwm_send_lmac_ptrough_cmd(iwm, COEX_PRIORITY_TABLE_CMD, &coex_table_cmd, sizeof(struct iwm_coex_prio_table_cmd), 1); }
static int if_sdio_disable(struct iwm_priv *iwm) { struct iwm_sdio_priv *hw = iwm_to_if_sdio(iwm); int ret; sdio_claim_host(hw->func); sdio_writeb(hw->func, 0, IWM_SDIO_INTR_ENABLE_ADDR, &ret); if (ret < 0) IWM_WARN(iwm, "Couldn't disable INTR: %d\n", ret); sdio_release_irq(hw->func); sdio_disable_func(hw->func); sdio_release_host(hw->func); iwm_sdio_rx_free(hw); iwm_reset(iwm); IWM_DBG_SDIO(iwm, INFO, "IWM SDIO disable\n"); return 0; }