Skip to content

Commit

Permalink
net: wireless: bcm4329: Fix packet unicast filter
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
  • Loading branch information
Howard Harte authored and Dmitry Shmidt committed Jul 28, 2010
1 parent 09bfda8 commit 8097ca0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/net/wireless/bcm4329/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
uint32 pattern_size;
char buf[256];
uint filter_mode = 1;
char mac_buf[16];
#ifdef SET_RANDOM_MAC_SOFTAP
uint rand_mac;
#endif
Expand Down Expand Up @@ -758,11 +759,16 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
pkt_filter.u.pattern.offset = htod32(0);

/* Parse pattern filter mask. */
mask_size = htod32(wl_pattern_atoh("0xff",
mask_size = htod32(wl_pattern_atoh("0xffffffffffff",
(char *) pkt_filterp->u.pattern.mask_and_pattern));

/* Parse pattern filter pattern. */
pattern_size = htod32(wl_pattern_atoh("0x00",
sprintf( mac_buf, "0x%02x%02x%02x%02x%02x%02x",
dhd->mac.octet[0], dhd->mac.octet[1], dhd->mac.octet[2],
dhd->mac.octet[3], dhd->mac.octet[4], dhd->mac.octet[5]
);

pattern_size = htod32(wl_pattern_atoh(mac_buf,
(char *) &pkt_filterp->u.pattern.mask_and_pattern[mask_size]));

if (mask_size != pattern_size) {
Expand Down

0 comments on commit 8097ca0

Please sign in to comment.