|
Bugzilla – Full Text Bug Listing |
| Summary: | segmentation fault when Rrpaa wifi manager is used | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | sebastien.deronne |
| Component: | wifi | Assignee: | Matías Richart <matis18> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | ns-3.27 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Correct power levels bug
Correct power levels bug |
||
|
Description
sebastien.deronne
2017-11-13 15:38:53 UTC
Matias, since you wrote this class, could you please have a look? (In reply to sebastien.deronne from comment #1) > Matias, since you wrote this class, could you please have a look? Ok, I'll have a look as soon as possible. There was an issue when the node only has 1 power available. I attach a patch. Created attachment 2960 [details]
Correct power levels bug
Matias, thanks I will give a try. Any reason you need to use - 1 everwhere? (In reply to sebastien.deronne from comment #5) > Matias, thanks I will give a try. Any reason you need to use - 1 everwhere? Sorry I didn't explain the problem better. The problem was that the code considered GetTxPowerStart() and GetTxPowerEnd() as the maximum and minimum power levels but this functions return the max and min powers in dbm. The power levels are the steps between the the max and min powers and are always between 0 and the number of power levels -1. The problem appears when the max and min powers do not match the power levels. For example when max and min powers are the same. I attach a new patch with a clearer code. Created attachment 2962 [details]
Correct power levels bug
Thanks, it is clearer now. I still have a question about initialization: station->m_prevPowerLevel = m_maxPowerLevel; station->m_powerLevel = m_maxPowerLevel; Why is it initialized to max and not to min? (In reply to sebastien.deronne from comment #8) > Thanks, it is clearer now. > I still have a question about initialization: > > station->m_prevPowerLevel = m_maxPowerLevel; > station->m_powerLevel = m_maxPowerLevel; > > Why is it initialized to max and not to min? It is a design decision. Initializing at max power guarantees better reception when the algorithm starts. The algorithm starts at max power and min rate so as to start at the most robust configuration and then, if it is, possible it decrease power and increase rate. Matias, thanks, I will push this patch. Fixed in changeset 13233:d1ed8ca3b295 |