diff options
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/aiutils.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c index 8d3829a73190..a54cf32d1eb5 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | |||
@@ -884,7 +884,7 @@ uint ai_coreidx(struct si_pub *sih) | |||
884 | } | 884 | } |
885 | 885 | ||
886 | /* return index of coreid or BADIDX if not found */ | 886 | /* return index of coreid or BADIDX if not found */ |
887 | uint ai_findcoreidx(struct si_pub *sih, uint coreid, uint coreunit) | 887 | struct bcma_device *ai_findcore(struct si_pub *sih, u16 coreid, u16 coreunit) |
888 | { | 888 | { |
889 | struct bcma_device *core; | 889 | struct bcma_device *core; |
890 | struct si_info *sii; | 890 | struct si_info *sii; |
@@ -897,11 +897,11 @@ uint ai_findcoreidx(struct si_pub *sih, uint coreid, uint coreunit) | |||
897 | list_for_each_entry(core, &sii->icbus->cores, list) | 897 | list_for_each_entry(core, &sii->icbus->cores, list) |
898 | if (core->id.id == coreid) { | 898 | if (core->id.id == coreid) { |
899 | if (found == coreunit) | 899 | if (found == coreunit) |
900 | return core->core_index; | 900 | return core; |
901 | found++; | 901 | found++; |
902 | } | 902 | } |
903 | 903 | ||
904 | return BADIDX; | 904 | return NULL; |
905 | } | 905 | } |
906 | 906 | ||
907 | /* | 907 | /* |
@@ -912,13 +912,13 @@ uint ai_findcoreidx(struct si_pub *sih, uint coreid, uint coreunit) | |||
912 | */ | 912 | */ |
913 | void __iomem *ai_setcore(struct si_pub *sih, uint coreid, uint coreunit) | 913 | void __iomem *ai_setcore(struct si_pub *sih, uint coreid, uint coreunit) |
914 | { | 914 | { |
915 | uint idx; | 915 | struct bcma_device *core; |
916 | 916 | ||
917 | idx = ai_findcoreidx(sih, coreid, coreunit); | 917 | core = ai_findcore(sih, coreid, coreunit); |
918 | if (idx >= SI_MAXCORES) | 918 | if (core == NULL) |
919 | return NULL; | 919 | return NULL; |
920 | 920 | ||
921 | return ai_setcoreidx(sih, idx); | 921 | return ai_setcoreidx(sih, core->core_index); |
922 | } | 922 | } |
923 | 923 | ||
924 | /* Turn off interrupt as required by ai_setcore, before switch core */ | 924 | /* Turn off interrupt as required by ai_setcore, before switch core */ |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h index 67b378f2f57e..b0b0bfffe162 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h | |||
@@ -219,6 +219,8 @@ struct si_info { | |||
219 | 219 | ||
220 | 220 | ||
221 | /* AMBA Interconnect exported externs */ | 221 | /* AMBA Interconnect exported externs */ |
222 | extern struct bcma_device *ai_findcore(struct si_pub *sih, | ||
223 | u16 coreid, u16 coreunit); | ||
222 | extern uint ai_coreidx(struct si_pub *sih); | 224 | extern uint ai_coreidx(struct si_pub *sih); |
223 | extern uint ai_corerev(struct si_pub *sih); | 225 | extern uint ai_corerev(struct si_pub *sih); |
224 | extern u32 ai_core_cflags(struct bcma_device *core, u32 mask, u32 val); | 226 | extern u32 ai_core_cflags(struct bcma_device *core, u32 mask, u32 val); |