From: Karl Beldan Date: Wed, 13 Nov 2013 09:54:19 +0000 (+0100) Subject: mac80211: minstrels: spare numerous useless calls to get_random_bytes X-Git-Tag: v3.14-rc1~94^2~334^2^2~110 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d8ad81ca8c447124821e58f876d1aff996c85f;p=pandora-kernel.git mac80211: minstrels: spare numerous useless calls to get_random_bytes ATM, only the first array value returned by get_random_bytes is used. This change moves the call to get_random_bytes from the nested loop it is in to its parent. While at it, replace get_random_bytes with prandom_bytes since PRNs are way enough for the selection process. After this, minstrel_ht reclaims 80 PR-bytes instead of 640 R-bytes. minstrels use sample tables to probe different rates in a randomized manner. minstrel_ht inits one single sample table upon registration (during subsys_initcalls) and minstrel uses one per STA addition in minstrel. Signed-off-by: Karl Beldan Signed-off-by: Johannes Berg --- Reading git-diff-tree failed