amd64/153937: ralink (if_ral) panics the sistem (amd64 freeBSDd 8.X) when in hostap or adhoc.

sergio lenzi lenzi.sergio at gmail.com
Wed Jan 12 19:40:08 UTC 2011


>Number:         153937
>Category:       amd64
>Synopsis:       ralink (if_ral) panics the sistem (amd64 freeBSDd 8.X) when in hostap or adhoc.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 12 19:40:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     sergio lenzi
>Release:        8.1, 8.2, 9.0
>Organization:
k1 sistemas
>Environment:
FreeBSD dist.lenzicasa 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Wed Jan 12 14:20:09 BRST 2011     lzt at dist.lenzicasa:/usr/src/sys/amd64/compile/server  amd64

>Description:
trying to put if_ral (and so wlan) to work in ap mode, 
when the interface goes up and with an IP number, the sistem panics.
due to the ral driver does not initialize 
the ratectl struture neede by wlan_amrr
when in mode not client.

A fix follows (must be auditted)
by the gurus...
>How-To-Repeat:
kldload if_ral

ifconfig wlan create wlandev ral0 \
	wlanmode hostap \
	mode 11g
ifconfig wlan0 192.168.1.1
============================
the system panics  
>Fix:
--- sys/dev/ral/rt2560.c.orig	2011-01-12 17:05:23.000000000 -0200
+++ sys/dev/ral/rt2560.c	2011-01-12 17:05:36.000000000 -0200
@@ -786,6 +786,7 @@
 		struct ieee80211_node *ni = vap->iv_bss;
 		struct mbuf *m;
 
+		ieee80211_ratectl_node_init(ni);
 		if (vap->iv_opmode != IEEE80211_M_MONITOR) {
 			rt2560_update_plcp(sc);
 			rt2560_set_basicrates(sc);
--- sys/dev/ral/rt2661.c.orig	2011-01-12 17:06:11.000000000 -0200
+++ sys/dev/ral/rt2661.c	2011-01-12 17:06:17.000000000 -0200
@@ -792,6 +792,7 @@
 	if (error == 0 && nstate == IEEE80211_S_RUN) {
 		struct ieee80211_node *ni = vap->iv_bss;
 
+		ieee80211_ratectl_node_init(ni);
 		if (vap->iv_opmode != IEEE80211_M_MONITOR) {
 			rt2661_enable_mrr(sc);
 			rt2661_set_txpreamble(sc);


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-amd64 mailing list