Added code to turn off promiscous mode if group address count becomes MAX allowed for the case of going from MAX+1 (hence, promiscous mode on) to MAX where promiscuous mode shoudln't be on. Also, changed mibset_mibget to return 0 (success).

This commit is contained in:
joellen 2000-01-27 15:06:41 +00:00
parent 3d9d570e91
commit 7fcd9fd510
1 changed files with 23 additions and 11 deletions

View File

@ -563,6 +563,17 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
HFA384x_RID_GROUPADDR,
bytebuf,
((priv->grpcnt) * WLAN_ADDR_LEN));
/* turn off promiscuous mode if count is
equal to MAX; we may have been at a higher
count in promiscuous mode and need to turn
it off. */
if ( (priv->grpcnt) == MAX_PRISM2_GRP_ADDR ) {
*wordbuf = 0;
result = hfa384x_drvr_setconfig16( hw,
HFA384x_RID_PROMISCMODE,
wordbuf);
}
} else {
/* clear group addresses in card
and set to promiscuous mode */
@ -843,7 +854,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
}
DBFEXIT;
return result;
return 0;
}
@ -1691,17 +1702,18 @@ int prism2mgmt_SetGroupAddress(UINT32 did, UINT8 *prism2buf,
if ( memcmp(priv->GroupAddresses[index],
no_addr,
WLAN_ADDR_LEN) != 0) {
priv->grpcnt -= 1;
/* shift all the addresses following
priv->grpcnt -= 1;
/* shift all the addresses following
the one to delete */
memcpy( priv->GroupAddresses[index],
priv->GroupAddresses[index + 1],
((priv->grpcnt)-index) * WLAN_ADDR_LEN);
/* erase the last address that now appears
twice */
memcpy( priv->GroupAddresses[priv->grpcnt],
no_addr,
WLAN_ADDR_LEN);
memcpy( priv->GroupAddresses[index],
priv->GroupAddresses[index + 1],
((priv->grpcnt)-index) * WLAN_ADDR_LEN);
/* erase the last address that now appears
twice */
memcpy( priv->GroupAddresses[priv->grpcnt],
no_addr,
WLAN_ADDR_LEN);
}
}
} else {