diff options
author | Arend van Spriel <arend@broadcom.com> | 2011-10-12 14:51:17 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:17 -0400 |
commit | b5036243c122996d524235536542187dd3138aee (patch) | |
tree | c0faa926178f6c4c6e7fefa4a831c885dd13c433 | |
parent | f7264adb9a0ec492c3f6ee2a476a9ad9027317f9 (diff) |
brcm80211: rename variable in _brcmf_set_multicast_list()
The variable allmulti was used to provision IFF_ALLMULTI to the
device as well as IFF_PROMISC. For clarity the variable has been
renamed.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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/dhd_linux.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index aac6141afcde..93eff7294f99 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -136,9 +136,9 @@ static void _brcmf_set_multicast_list(struct work_struct *work) | |||
136 | { | 136 | { |
137 | struct net_device *ndev; | 137 | struct net_device *ndev; |
138 | struct netdev_hw_addr *ha; | 138 | struct netdev_hw_addr *ha; |
139 | u32 allmulti, cnt; | 139 | u32 dcmd_value, cnt; |
140 | __le32 cnt_le; | 140 | __le32 cnt_le; |
141 | __le32 allmulti_le; | 141 | __le32 dcmd_le_value; |
142 | 142 | ||
143 | struct brcmf_dcmd dcmd; | 143 | struct brcmf_dcmd dcmd; |
144 | char *buf, *bufp; | 144 | char *buf, *bufp; |
@@ -152,7 +152,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work) | |||
152 | cnt = netdev_mc_count(ndev); | 152 | cnt = netdev_mc_count(ndev); |
153 | 153 | ||
154 | /* Determine initial value of allmulti flag */ | 154 | /* Determine initial value of allmulti flag */ |
155 | allmulti = (ndev->flags & IFF_ALLMULTI) ? true : false; | 155 | dcmd_value = (ndev->flags & IFF_ALLMULTI) ? true : false; |
156 | 156 | ||
157 | /* Send down the multicast list first. */ | 157 | /* Send down the multicast list first. */ |
158 | 158 | ||
@@ -186,7 +186,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work) | |||
186 | if (ret < 0) { | 186 | if (ret < 0) { |
187 | brcmf_dbg(ERROR, "%s: set mcast_list failed, cnt %d\n", | 187 | brcmf_dbg(ERROR, "%s: set mcast_list failed, cnt %d\n", |
188 | brcmf_ifname(&drvr_priv->pub, 0), cnt); | 188 | brcmf_ifname(&drvr_priv->pub, 0), cnt); |
189 | allmulti = cnt ? true : allmulti; | 189 | dcmd_value = cnt ? true : dcmd_value; |
190 | } | 190 | } |
191 | 191 | ||
192 | kfree(buf); | 192 | kfree(buf); |
@@ -196,19 +196,19 @@ static void _brcmf_set_multicast_list(struct work_struct *work) | |||
196 | * were trying to set some addresses and dongle rejected it... | 196 | * were trying to set some addresses and dongle rejected it... |
197 | */ | 197 | */ |
198 | 198 | ||
199 | buflen = sizeof("allmulti") + sizeof(allmulti); | 199 | buflen = sizeof("allmulti") + sizeof(dcmd_value); |
200 | buf = kmalloc(buflen, GFP_ATOMIC); | 200 | buf = kmalloc(buflen, GFP_ATOMIC); |
201 | if (!buf) | 201 | if (!buf) |
202 | return; | 202 | return; |
203 | 203 | ||
204 | allmulti_le = cpu_to_le32(allmulti); | 204 | dcmd_le_value = cpu_to_le32(dcmd_value); |
205 | 205 | ||
206 | if (!brcmu_mkiovar | 206 | if (!brcmu_mkiovar |
207 | ("allmulti", (void *)&allmulti_le, | 207 | ("allmulti", (void *)&dcmd_le_value, |
208 | sizeof(allmulti_le), buf, buflen)) { | 208 | sizeof(dcmd_le_value), buf, buflen)) { |
209 | brcmf_dbg(ERROR, "%s: mkiovar failed for allmulti, datalen %d buflen %u\n", | 209 | brcmf_dbg(ERROR, "%s: mkiovar failed for allmulti, datalen %d buflen %u\n", |
210 | brcmf_ifname(&drvr_priv->pub, 0), | 210 | brcmf_ifname(&drvr_priv->pub, 0), |
211 | (int)sizeof(allmulti), buflen); | 211 | (int)sizeof(dcmd_value), buflen); |
212 | kfree(buf); | 212 | kfree(buf); |
213 | return; | 213 | return; |
214 | } | 214 | } |
@@ -223,7 +223,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work) | |||
223 | if (ret < 0) { | 223 | if (ret < 0) { |
224 | brcmf_dbg(ERROR, "%s: set allmulti %d failed\n", | 224 | brcmf_dbg(ERROR, "%s: set allmulti %d failed\n", |
225 | brcmf_ifname(&drvr_priv->pub, 0), | 225 | brcmf_ifname(&drvr_priv->pub, 0), |
226 | le32_to_cpu(allmulti_le)); | 226 | le32_to_cpu(dcmd_le_value)); |
227 | } | 227 | } |
228 | 228 | ||
229 | kfree(buf); | 229 | kfree(buf); |
@@ -231,20 +231,20 @@ static void _brcmf_set_multicast_list(struct work_struct *work) | |||
231 | /* Finally, pick up the PROMISC flag as well, like the NIC | 231 | /* Finally, pick up the PROMISC flag as well, like the NIC |
232 | driver does */ | 232 | driver does */ |
233 | 233 | ||
234 | allmulti = (ndev->flags & IFF_PROMISC) ? true : false; | 234 | dcmd_value = (ndev->flags & IFF_PROMISC) ? true : false; |
235 | allmulti_le = cpu_to_le32(allmulti); | 235 | dcmd_le_value = cpu_to_le32(dcmd_value); |
236 | 236 | ||
237 | memset(&dcmd, 0, sizeof(dcmd)); | 237 | memset(&dcmd, 0, sizeof(dcmd)); |
238 | dcmd.cmd = BRCMF_C_SET_PROMISC; | 238 | dcmd.cmd = BRCMF_C_SET_PROMISC; |
239 | dcmd.buf = &allmulti_le; | 239 | dcmd.buf = &dcmd_le_value; |
240 | dcmd.len = sizeof(allmulti_le); | 240 | dcmd.len = sizeof(dcmd_le_value); |
241 | dcmd.set = true; | 241 | dcmd.set = true; |
242 | 242 | ||
243 | ret = brcmf_proto_dcmd(&drvr_priv->pub, 0, &dcmd, dcmd.len); | 243 | ret = brcmf_proto_dcmd(&drvr_priv->pub, 0, &dcmd, dcmd.len); |
244 | if (ret < 0) { | 244 | if (ret < 0) { |
245 | brcmf_dbg(ERROR, "%s: set promisc %d failed\n", | 245 | brcmf_dbg(ERROR, "%s: set promisc %d failed\n", |
246 | brcmf_ifname(&drvr_priv->pub, 0), | 246 | brcmf_ifname(&drvr_priv->pub, 0), |
247 | le32_to_cpu(allmulti_le)); | 247 | le32_to_cpu(dcmd_le_value)); |
248 | } | 248 | } |
249 | } | 249 | } |
250 | 250 | ||