diff options
author | Franky Lin <frankyl@broadcom.com> | 2011-10-21 10:16:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-08 15:54:25 -0500 |
commit | d1a5b6fbecc52323acf05fa7881267071933c92e (patch) | |
tree | 321da86b935afb91ce523a4e5cfc3fcf11327544 /drivers/net/wireless/brcm80211 | |
parent | e1b835865c58e44ad16e5c85d1dc727991e2b0b3 (diff) |
brcm80211: fmac: remove state from brcmf_if in fullmac
The usage of state decrease readability. Optimize the code flow to
get rid of it
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 10 |
2 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h index a96a91f85bb0..6da519e7578f 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h | |||
@@ -122,7 +122,6 @@ | |||
122 | 122 | ||
123 | /* For supporting multiple interfaces */ | 123 | /* For supporting multiple interfaces */ |
124 | #define BRCMF_MAX_IFS 16 | 124 | #define BRCMF_MAX_IFS 16 |
125 | #define BRCMF_DEL_IF -0xe | ||
126 | 125 | ||
127 | #define DOT11_BSSTYPE_ANY 2 | 126 | #define DOT11_BSSTYPE_ANY 2 |
128 | #define DOT11_MAX_DEFAULT_KEYS 4 | 127 | #define DOT11_MAX_DEFAULT_KEYS 4 |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index 394577a9caca..719fd9397eb6 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -58,7 +58,6 @@ struct brcmf_if { | |||
58 | struct net_device *ndev; | 58 | struct net_device *ndev; |
59 | struct net_device_stats stats; | 59 | struct net_device_stats stats; |
60 | int idx; /* iface idx in dongle */ | 60 | int idx; /* iface idx in dongle */ |
61 | int state; /* interface state */ | ||
62 | u8 mac_addr[ETH_ALEN]; /* assigned MAC address */ | 61 | u8 mac_addr[ETH_ALEN]; /* assigned MAC address */ |
63 | }; | 62 | }; |
64 | 63 | ||
@@ -456,12 +455,10 @@ void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx, struct sk_buff *skb, | |||
456 | skb_mac_header(skb), | 455 | skb_mac_header(skb), |
457 | &event, &data); | 456 | &event, &data); |
458 | 457 | ||
459 | if (drvr_priv->iflist[ifidx] && | 458 | if (drvr_priv->iflist[ifidx]) { |
460 | !drvr_priv->iflist[ifidx]->state) | ||
461 | ifp = drvr_priv->iflist[ifidx]; | 459 | ifp = drvr_priv->iflist[ifidx]; |
462 | |||
463 | if (ifp->ndev) | ||
464 | ifp->ndev->last_rx = jiffies; | 460 | ifp->ndev->last_rx = jiffies; |
461 | } | ||
465 | 462 | ||
466 | drvr->dstats.rx_bytes += skb->len; | 463 | drvr->dstats.rx_bytes += skb->len; |
467 | drvr->rx_packets++; /* Local count */ | 464 | drvr->rx_packets++; /* Local count */ |
@@ -896,7 +893,6 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, char *name, u8 *mac_addr) | |||
896 | ifp->ndev = ndev; | 893 | ifp->ndev = ndev; |
897 | ifp->info = drvr_priv; | 894 | ifp->info = drvr_priv; |
898 | drvr_priv->iflist[ifidx] = ifp; | 895 | drvr_priv->iflist[ifidx] = ifp; |
899 | ifp->state = BRCMF_E_IF_ADD; | ||
900 | ifp->idx = ifidx; | 896 | ifp->idx = ifidx; |
901 | if (mac_addr != NULL) | 897 | if (mac_addr != NULL) |
902 | memcpy(&ifp->mac_addr, mac_addr, ETH_ALEN); | 898 | memcpy(&ifp->mac_addr, mac_addr, ETH_ALEN); |
@@ -910,7 +906,6 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, char *name, u8 *mac_addr) | |||
910 | 906 | ||
911 | brcmf_dbg(TRACE, " ==== pid:%x, net_device for if:%s created ===\n", | 907 | brcmf_dbg(TRACE, " ==== pid:%x, net_device for if:%s created ===\n", |
912 | current->pid, ifp->ndev->name); | 908 | current->pid, ifp->ndev->name); |
913 | ifp->state = 0; | ||
914 | 909 | ||
915 | return 0; | 910 | return 0; |
916 | } | 911 | } |
@@ -926,7 +921,6 @@ void brcmf_del_if(struct brcmf_info *drvr_priv, int ifidx) | |||
926 | brcmf_dbg(ERROR, "Null interface\n"); | 921 | brcmf_dbg(ERROR, "Null interface\n"); |
927 | return; | 922 | return; |
928 | } | 923 | } |
929 | ifp->state = BRCMF_E_IF_DEL; | ||
930 | if (ifp->ndev) { | 924 | if (ifp->ndev) { |
931 | if (ifidx == 0) { | 925 | if (ifidx == 0) { |
932 | if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) { | 926 | if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) { |