On Mon, 2010-05-03 at 10:25 -0700, John W. Linville wrote: > From: Adel Gadllah <adel.gadllah@xxxxxxxxx> > > Currently it is a BUG_ON() which will hang the machine once triggered. > > (Changed from WARN_ON to WARN_ON_ONCE. -- JWL) > > Signed-off-by: Adel Gadllah <adel.gadllah@xxxxxxxxx> > Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx> I can see a potential race condition here in the calculation of the average throughput so a BUG_ON seems extreme. I looked at the history of this code and it seems as though the BUG_ON was added as a sidenote to a patch implementing something else. The patch adding this BUG_ON is: commit 3110bef78cb4282c58245bc8fd6d95d9ccb19749 Author: Guy Cohen <guy.cohen@xxxxxxxxx> Date: Tue Sep 9 10:54:54 2008 +0800 iwlwifi: Added support for 3 antennas ... and it thus seems as though this BUG_ON was added along the way while doing something else ... especially considering that the comments describing the original code has not been removed yet. Since the current code still contains: /* Else we have enough samples; calculate estimate of * actual average throughput */ .. .which is obviously not done right now. I looked at the original code and think we can revert the portion of this patch adding the BUG_ON. Since users have not encountered the error I assume the author considered that a BUG_ON was warranted, but now we know that users do indeed encounter the error and we should return the original code. I'll send the revert as a separate patch. Reinette -- 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