diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-08-03 14:11:58 -0700 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-10-28 11:02:14 +0200 |
commit | e98431b01e660ece0fab557d705c66536d0fe66b (patch) | |
tree | 069bd302a2eb6c5aec966fc27082f6cbb4db6d95 /drivers/net/wireless/bcmdhd/dhd_linux.c | |
parent | 2dd4faea959c32531b9b8e76998bac439151487f (diff) |
net: wireless: bcmdhd: Improve arp_hostip_table processing
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Change-Id: I08c164fe11238fb25d1d23db5d9b9e65f04cf10b
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35575
Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/net/wireless/bcmdhd/dhd_linux.c')
-rw-r--r-- | drivers/net/wireless/bcmdhd/dhd_linux.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index c345b1815d0..5d35f78cf2a 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -2804,20 +2804,27 @@ int dhd_change_mtu(dhd_pub_t *dhdp, int new_mtu, int ifidx) /* add or remove AOE host ip(s) (up to 8 IPs on the interface) */ void aoe_update_host_ipv4_table(dhd_pub_t *dhd_pub, u32 ipa, bool add) { - u32 ipv4_buf[8]; /* temp save for AOE host_ip table */ + u32 ipv4_buf[MAX_IPV4_ENTRIES]; /* temp save for AOE host_ip table */ int i; + int ret; bzero(ipv4_buf, sizeof(ipv4_buf)); /* display what we've got */ - dhd_arp_get_arp_hostip_table(dhd_pub, ipv4_buf, sizeof(ipv4_buf)); + ret = dhd_arp_get_arp_hostip_table(dhd_pub, ipv4_buf, sizeof(ipv4_buf)); DHD_ARPOE(("%s: hostip table read from Dongle:\n", __FUNCTION__)); - /* dhd_print_buf(ipv4_buf, 32, 4); */ /* max 8 IPs 4b each */ - +#ifdef AOE_DBG + dhd_print_buf(ipv4_buf, 32, 4); /* max 8 IPs 4b each */ +#endif /* now we saved hoste_ip table, clr it in the dongle AOE */ dhd_aoe_hostip_clr(dhd_pub); - for (i = 0; i < 8; i++) { + if (ret) { + DHD_ERROR(("%s failed\n", __FUNCTION__)); + return; + } + + for (i = 0; i < MAX_IPV4_ENTRIES; i++) { if (add && (ipv4_buf[i] == 0)) { |