Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314366
b: refs/heads/master
c: 3c7992e
h: refs/heads/master
v: v3
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Jun 13, 2012
1 parent e4a9c7d commit ceac81a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dfd0587a7d99d42cc2d608324991169494d2dbba
refs/heads/master: 3c7992e33ab8d0c625a45ded11cc10d5b622bcd4
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ struct ath_softc {
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
struct ath_btcoex btcoex;
struct ath_mci_coex mci_coex;
struct work_struct mci_work;
#endif

struct ath_descdma txsdma;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ static void __ath_cancel_work(struct ath_softc *sc)
cancel_work_sync(&sc->hw_check_work);
cancel_delayed_work_sync(&sc->tx_complete_work);
cancel_delayed_work_sync(&sc->hw_pll_work);
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
cancel_work_sync(&sc->mci_work);
#endif
}

static void ath_cancel_work(struct ath_softc *sc)
Expand Down
14 changes: 11 additions & 3 deletions trunk/drivers/net/wireless/ath/ath9k/mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static bool ath_mci_add_profile(struct ath_common *common,
(info->type != MCI_GPM_COEX_PROFILE_VOICE))
return false;

entry = kzalloc(sizeof(*entry), GFP_KERNEL);
entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
if (!entry)
return false;

Expand Down Expand Up @@ -219,6 +219,13 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
}
}

static void ath9k_mci_work(struct work_struct *work)
{
struct ath_softc *sc = container_of(work, struct ath_softc, mci_work);

ath_mci_update_scheme(sc);
}

static void ath_mci_process_profile(struct ath_softc *sc,
struct ath_mci_profile_info *info)
{
Expand Down Expand Up @@ -249,7 +256,7 @@ static void ath_mci_process_profile(struct ath_softc *sc,
btcoex->duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE;
}

ath_mci_update_scheme(sc);
ieee80211_queue_work(sc->hw, &sc->mci_work);
}

static void ath_mci_process_status(struct ath_softc *sc,
Expand Down Expand Up @@ -283,7 +290,7 @@ static void ath_mci_process_status(struct ath_softc *sc,
} while (++i < ATH_MCI_MAX_PROFILE);

if (old_num_mgmt != mci->num_mgmt)
ath_mci_update_scheme(sc);
ieee80211_queue_work(sc->hw, &sc->mci_work);
}

static void ath_mci_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
Expand Down Expand Up @@ -377,6 +384,7 @@ int ath_mci_setup(struct ath_softc *sc)
mci->gpm_buf.bf_addr, (mci->gpm_buf.bf_len >> 4),
mci->sched_buf.bf_paddr);

INIT_WORK(&sc->mci_work, ath9k_mci_work);
ath_dbg(common, MCI, "MCI Initialized\n");

return 0;
Expand Down

0 comments on commit ceac81a

Please sign in to comment.