oops. some code accidentally slipped into the wrong patch file :)
[lede.git] / package / madwifi / patches / 106-minstrel_crash.patch
1 diff -urN madwifi-ng-refcount-r2313-20070505.old/ath_rate/minstrel/minstrel.c madwifi-ng-refcount-r2313-20070505.dev/ath_rate/minstrel/minstrel.c
2 --- madwifi-ng-refcount-r2313-20070505.old/ath_rate/minstrel/minstrel.c 2007-04-25 22:29:55.000000000 +0200
3 +++ madwifi-ng-refcount-r2313-20070505.dev/ath_rate/minstrel/minstrel.c 2007-05-13 18:17:55.533126720 +0200
4 @@ -543,6 +543,9 @@
5          unsigned int i, column_index;
6          int newIndex;
7          u_int8_t random_bytes[12];
8 +               
9 +               if (num_sample_rates < 0)
10 +                       return;
11  
12          for(column_index = 0; column_index < MINSTREL_COLUMNS; column_index++) {
13                  for (i = 0; i <= IEEE80211_RATE_MAXSIZE; i++)