Messages in this thread | | | Date | Sun, 1 Mar 2009 09:36:59 -0500 | Subject | Re: [ath5k-devel] [PATCH 1/1] ath5k: fix hw rate index condition | From | Bob Copeland <> |
| |
On Sun, Mar 1, 2009 at 12:07 AM, Pavel Roskin <proski@gnu.org> wrote: > On Thu, 2009-02-26 at 21:27 -0500, Bob Copeland wrote: > >> Actually, I remembered in the dark recesses of my moldering brain >> that someone had a lost patch for this a while ago, so I searched >> the archives. Pavel, ok to add your s-o-b? > > Since my patch was dropped and the new patch was implemented without my > participation, it makes no sense to put my s-o-b on the code I didn't > write (even though I wrote something similar before).
Ok, I just wanted to be sure to maintain proper credit, the "From" should suffice. I did rewrite the patch but it actually had an identical diff. FWIW, the thread didn't give a clue why it didn't make it upstream, just missed I guess (http://marc.info/?l=linux-wireless&m=122480002519627&w=2, ultimately that problem was fixed by correctly setting the rs_more flag).
Anyway, the patch, while IMO correct, will still result in mac80211 warning in ieee80211_rx with -1 just as 255 will; it just fixes the subsequent out of bound read. If we want to tell mac80211 a real rate, I think we should change it to s8 then hw_to_driver_rix should do something like:
idx = array[x][y]; if (WARN_ON(idx < 0)) idx = 0;
return idx;
Then we get the warning in the driver and we also return a real rate up the stack. I'll prep a patch for this unless there are any objections.
-- Bob Copeland %% www.bobcopeland.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |