#include "wmm.h"
#include "cfg80211.h"
#include "11n.h"
+#include "sdio.h"
#define VERSION "1.0"
struct semaphore *sem = adapter->card_sem;
bool init_failed = false;
struct wireless_dev *wdev;
+ struct sdio_mmc_card *card = adapter->card;
if (!firmware) {
mwifiex_dbg(adapter, ERROR,
fw.fw_buf = (u8 *) adapter->firmware->data;
fw.fw_len = adapter->firmware->size;
- if (adapter->if_ops.dnld_fw)
+ if (adapter->if_ops.dnld_fw) {
ret = adapter->if_ops.dnld_fw(adapter, &fw);
- else
+ } else {
+ if (adapter->iface_type == MWIFIEX_SDIO)
+ sdio_claim_host(card->func);
ret = mwifiex_dnld_fw(adapter, &fw);
+ if (adapter->iface_type == MWIFIEX_SDIO)
+ sdio_release_host(card->func);
+ }
+
if (ret == -1)
goto err_dnld_fw;