The following reply was made to PR usb/174963; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/174963: commit references a PR
Date: Fri,  4 Jan 2013 20:44:30 +0000 (UTC)

 Author: hselasky
 Date: Fri Jan  4 20:44:17 2013
 New Revision: 245047
 URL: http://svnweb.freebsd.org/changeset/base/245047
 
 Log:
   Fix for "run0: wcid=xx out of range" error message.
   
   MFC after:   1 week
   PR:          usb/174963
   Submitted by:        PseudoCylon <moonlightak...@yahoo.ca>
 
 Modified:
   head/sys/dev/usb/wlan/if_run.c
 
 Modified: head/sys/dev/usb/wlan/if_run.c
 ==============================================================================
 --- head/sys/dev/usb/wlan/if_run.c     Fri Jan  4 19:29:23 2013        
(r245046)
 +++ head/sys/dev/usb/wlan/if_run.c     Fri Jan  4 20:44:17 2013        
(r245047)
 @@ -2019,7 +2019,8 @@ run_key_set_cb(void *arg)
                wcid = 0;       /* NB: update WCID0 for group keys */
                base = RT2860_SKEY(RUN_VAP(vap)->rvp_id, k->wk_keyix);
        } else {
 -              wcid = RUN_AID2WCID(associd);
 +              wcid = (vap->iv_opmode == IEEE80211_M_STA) ?
 +                  1 : RUN_AID2WCID(associd);
                base = RT2860_PKEY(wcid);
        }
  
 @@ -2374,9 +2375,12 @@ run_newassoc(struct ieee80211_node *ni, 
        struct run_softc *sc = ic->ic_ifp->if_softc;
        uint8_t rate;
        uint8_t ridx;
 -      uint8_t wcid = RUN_AID2WCID(ni->ni_associd);
 +      uint8_t wcid;
        int i, j;
  
 +      wcid = (vap->iv_opmode == IEEE80211_M_STA) ?
 +          1 : RUN_AID2WCID(ni->ni_associd);
 +
        if (wcid > RT2870_WCID_MAX) {
                device_printf(sc->sc_dev, "wcid=%d out of range\n", wcid);
                return;
 @@ -3044,8 +3048,12 @@ run_tx(struct run_softc *sc, struct mbuf
        txd->flags = qflags;
        txwi = (struct rt2860_txwi *)(txd + 1);
        txwi->xflags = xflags;
 -      txwi->wcid = IEEE80211_IS_MULTICAST(wh->i_addr1) ?
 -          0 : RUN_AID2WCID(ni->ni_associd);
 +      if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
 +              txwi->wcid = 0;
 +      } else {
 +              txwi->wcid = (vap->iv_opmode == IEEE80211_M_STA) ?
 +                  1 : RUN_AID2WCID(ni->ni_associd);
 +      }
        /* clear leftover garbage bits */
        txwi->flags = 0;
        txwi->txop = 0;
 _______________________________________________
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
 
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to