libertas: clean up and clarify get_common_rates
Clarify what the heck the function is doing with better variable names
and less indirection and better comments. Also ensure callers use the
proper minimum size, even though all rates arrays should be size
MAX_RATES anyway. Reverts part of Andrey's dynamic alloc patch since we
don't really need it. Also leaves the passed-in rates array alone on
errors.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>