diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-04-11 07:28:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-12 14:27:56 -0400 |
commit | f97a7f06b8a3a887875475b4caee4e2cce259a61 (patch) | |
tree | 7592a103e03ec38c68c844d76af770f0f7dbf764 | |
parent | a7965fbb9108aef004829caf7a80129e452f76de (diff) |
brcmfmac: pass ifp pointer in brcmf_fws_find_mac_desc()
Instead of passing the ifidx and lookup the ifp inside the
function brcmf_fws_find_mac_desc() simply pass the ifp as
parameter.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c index 19d6952e5f4a..d9572fb74356 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | |||
@@ -681,19 +681,16 @@ brcmf_fws_mac_descriptor_lookup(struct brcmf_fws_info *fws, u8 *ea) | |||
681 | } | 681 | } |
682 | 682 | ||
683 | static struct brcmf_fws_mac_descriptor* | 683 | static struct brcmf_fws_mac_descriptor* |
684 | brcmf_fws_find_mac_desc(struct brcmf_fws_info *fws, int ifidx, u8 *da) | 684 | brcmf_fws_find_mac_desc(struct brcmf_fws_info *fws, struct brcmf_if *ifp, |
685 | u8 *da) | ||
685 | { | 686 | { |
686 | struct brcmf_fws_mac_descriptor *entry = &fws->desc.other; | 687 | struct brcmf_fws_mac_descriptor *entry = &fws->desc.other; |
687 | struct brcmf_if *ifp; | ||
688 | bool multicast; | 688 | bool multicast; |
689 | enum nl80211_iftype iftype; | 689 | enum nl80211_iftype iftype; |
690 | brcmf_dbg(TRACE, "enter: ifidx=%d\n", ifidx); | ||
691 | 690 | ||
692 | multicast = is_multicast_ether_addr(da); | 691 | brcmf_dbg(TRACE, "enter: idx=%d\n", ifp->bssidx); |
693 | ifp = fws->drvr->iflist[ifidx ? ifidx + 1 : 0]; | ||
694 | if (WARN_ON(!ifp)) | ||
695 | goto done; | ||
696 | 692 | ||
693 | multicast = is_multicast_ether_addr(da); | ||
697 | iftype = brcmf_cfg80211_get_iftype(ifp); | 694 | iftype = brcmf_cfg80211_get_iftype(ifp); |
698 | 695 | ||
699 | /* Multicast destination and P2P clients get the interface entry. | 696 | /* Multicast destination and P2P clients get the interface entry. |
@@ -1750,7 +1747,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb) | |||
1750 | 1747 | ||
1751 | /* set control buffer information */ | 1748 | /* set control buffer information */ |
1752 | skcb->if_flags = 0; | 1749 | skcb->if_flags = 0; |
1753 | skcb->mac = brcmf_fws_find_mac_desc(drvr->fws, ifidx, eh->h_dest); | 1750 | skcb->mac = brcmf_fws_find_mac_desc(drvr->fws, ifp, eh->h_dest); |
1754 | skcb->state = BRCMF_FWS_SKBSTATE_NEW; | 1751 | skcb->state = BRCMF_FWS_SKBSTATE_NEW; |
1755 | brcmf_skb_if_flags_set_field(skb, INDEX, ifidx); | 1752 | brcmf_skb_if_flags_set_field(skb, INDEX, ifidx); |
1756 | if (!multicast) | 1753 | if (!multicast) |