2010/12/26 Jussi Kivilinna <jussi.kivilinna@xxxxxxxx>: > Vendor driver uses CR_BNC_INTERVAL at various places, one is HW_EnableBeacon() > that combinies beacon interval with BSS-type flag and DTIM value in upper > 16bit of u32. The other one is HW_UpdateBcnInterval() that set_aw_pt_bi() > appears to be based on. HW_UpdateBcnInterval() takes interval argument as u16 > and uses that for calculations, set_aw_pt_bi() uses u32 value that has flags > and dtim in upper part. This clearly seems wrong. Also HW_UpdateBcnInterval() > updates only lower 16bit part of CR_BNC_INTERVAL. > > So make set_aw_pt_bi() do calculations on only lower u16 part of > s->beacon_interval. It seems correct, we have for example: #define BCN_MODE_IBSS 0x2000000 which can be set in beacon_interval. AFAICS pre_tbtt should contain only interval, without additional flags. Do I get it right? > Â Â Â Âif (s->pre_tbtt < 4 || s->pre_tbtt >= s->beacon_interval) > - Â Â Â Â Â Â Â s->pre_tbtt = s->beacon_interval - 1; > + Â Â Â Â Â Â Â s->pre_tbtt = (s->beacon_interval & 0xffff) - 1; So if I am right, in condition here you should extract interval from beacon_interval and compare it with pre_tbtt. Extracting from pre_tbtt should not be needed, as it's plain interval. Maybe use some local variable like b_interval = s->beacon_interval & 0xffff ? -- RafaÅ -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html