Gmane
From: Pavel Roskin <svn-commits <at> madwifi.org>
Subject: revision 3844 committed
Newsgroups: gmane.linux.drivers.madwifi.cvs
Date: 2008-08-04 12:32:44 GMT (22 weeks, 4 days, 15 hours and 22 minutes ago)
Project     : madwifi
Revision    : 3844
Author      : proski (Pavel Roskin)
Date        : 2008-08-04 14:32:43 +0200 (Mon, 04 Aug 2008)

Log Message :
Check if rates are available in ath_rate_setupxtxdesc()

Reference: trunk <at> 3775

Affected Files:
* madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/minstrel.c  updated             

Modified: madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/minstrel.c
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/minstrel.c	2008-08-04 12:18:51 UTC (rev 3843)
+++ madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/minstrel.c	2008-08-04 12:32:43 UTC (rev 3844)
@@ -394,6 +394,12 @@
 	int rc1, rc2, rc3;         /* Index into the rate table, so for example, it is  0..11 */
 	int rixc1, rixc2, rixc3;   /* The actual bit rate used */

+	if (sn->num_rates <= 0) {
+		DPRINTF(sc, "%s: no rates for %s\n", dev_info,
+			ether_sprintf(an->an_node.ni_macaddr));
+		return;
+	}
+
 	if (sn->is_sampling) {
 		sn->is_sampling = 0;
 		if (sn->rs_sample_rate_slower)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/