From owner-freebsd-wireless@freebsd.org Wed Feb 3 21:00:03 2016 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57191A9A5AF for ; Wed, 3 Feb 2016 21:00:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2332617C8 for ; Wed, 3 Feb 2016 21:00:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x236.google.com with SMTP id ik10so96750250igb.1 for ; Wed, 03 Feb 2016 13:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wYz2zn+oSW/RCx5Tp6SijmOJjsBU1WcLfxeru/nsoIE=; b=GnmQ8S8VCJFnNQyOPsBiOOdjkVGwjHZDsr58ALCx14lkhAMANS9V7NjSVam7zfOKKu nQQZpZojS2bjY+C/rj3twuRBF9GS18x+7jdznX1G/VZRUlr4yH2KjDBOOa0X5jFgTkjo QkiId6UI6qFMHqzCTmJyG+8getx0q82+C5YFTZPUgTykhFo//o4CmRUIL9rzr2dOBixZ XHxM8diKML9onIRkBCI3hUahdV+BWzOA1DT2lyOJZmFC+G4CKbkbVDsTK0vdHD59Slow xgKno6AqSbqTykNldYkE1jQdodbWUkys7Vw2H/YYf+z0q+3VFMJXQYZ2uXKTQIKqmioC cRGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=wYz2zn+oSW/RCx5Tp6SijmOJjsBU1WcLfxeru/nsoIE=; b=eShXwSsBXcJ1o7CMB6/a7/yUsAcT3MX+AAsKCh21ZjO8P/TP/D9F5VpR0D5foV8dkj TNZn51tTXfg6lSHlZUa0LCnRG89uYJIRQPpvlDqypPos2yFY1x+ElVfscAquzgrm+UKv Q0Ruyiuj/UugC9E/MNk+JItUfpibbckGcqqVOX6FnN59gbPpl+ZTIQefxGwrbrIN//Tw /StpnV7t5vM2si1VIVPTBLT918LIawHcoH8y7KP2/lCPUSPss4oOy45fKQv251kVo1jk Bp4pezGbhsorW2ohFp6m9oRKACfHSxrNlBpNU0N0L4SBJ29qUz7hDksWAX1quh+Sa0ZO ZP6w== X-Gm-Message-State: AG10YORK9qjg41Poy0PYCNW0vJ7V6GGq4QGajwvGtmvHm03o7KNPnvHXWV8VFhc4LTIW9COo3FAp0T9Ujcyc7Q== MIME-Version: 1.0 X-Received: by 10.50.93.36 with SMTP id cr4mr5430193igb.22.1454533202548; Wed, 03 Feb 2016 13:00:02 -0800 (PST) Received: by 10.36.14.19 with HTTP; Wed, 3 Feb 2016 13:00:02 -0800 (PST) In-Reply-To: <1454498827.3964610.510611394.3ED30F5C@webmail.messagingengine.com> References: <1454498827.3964610.510611394.3ED30F5C@webmail.messagingengine.com> Date: Wed, 3 Feb 2016 13:00:02 -0800 Message-ID: Subject: Re: [patch] Change ath(4) to report correct chip name for Qualcomm Atheros cards From: Adrian Chadd To: Tobias Kortkamp Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 21:00:03 -0000 Hi! Thanks! I've been meaning to do this for a while but have been .. slack-ish. Can you attach it as a patch? I'll commit it tonight. -a On 3 February 2016 at 03:27, Tobias Kortkamp wrote: > Hi, > > when using ath(4) the driver reports the wrong name for Qualcomm Atheros > chips on attach e.g. a QCA9565 card reports as being an AR9565. > ath_hal(4) however mentions QCA9565 and not AR9565. This is confusing > if you want to find out if your card is supposed to be supported or not. > I also saw some comments in sys/dev/ath/ath_hal/ah.c that is not > supposed to be that way. Fixing this seems simple enough (see inlined > patch). > > Thanks, > Tobias > > diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c > index a0baa69..8333f10 100644 > --- a/sys/dev/ath/ath_hal/ah.c > +++ b/sys/dev/ath/ath_hal/ah.c > @@ -91,63 +91,60 @@ ath_hal_mac_name(struct ath_hal *ah) > switch (ah->ah_macVersion) { > case AR_SREV_VERSION_CRETE: > case AR_SREV_VERSION_MAUI_1: > - return "5210"; > + return "AR5210"; > case AR_SREV_VERSION_MAUI_2: > case AR_SREV_VERSION_OAHU: > - return "5211"; > + return "AR5211"; > case AR_SREV_VERSION_VENICE: > - return "5212"; > + return "AR5212"; > case AR_SREV_VERSION_GRIFFIN: > - return "2413"; > + return "AR2413"; > case AR_SREV_VERSION_CONDOR: > - return "5424"; > + return "AR5424"; > case AR_SREV_VERSION_EAGLE: > - return "5413"; > + return "AR5413"; > case AR_SREV_VERSION_COBRA: > - return "2415"; > + return "AR2415"; > case AR_SREV_2425: /* Swan */ > - return "2425"; > + return "AR2425"; > case AR_SREV_2417: /* Nala */ > - return "2417"; > + return "AR2417"; > case AR_XSREV_VERSION_OWL_PCI: > - return "5416"; > + return "AR5416"; > case AR_XSREV_VERSION_OWL_PCIE: > - return "5418"; > + return "AR5418"; > case AR_XSREV_VERSION_HOWL: > - return "9130"; > + return "AR9130"; > case AR_XSREV_VERSION_SOWL: > - return "9160"; > + return "AR9160"; > case AR_XSREV_VERSION_MERLIN: > if (AH_PRIVATE(ah)->ah_ispcie) > - return "9280"; > - return "9220"; > + return "AR9280"; > + return "AR9220"; > case AR_XSREV_VERSION_KITE: > - return "9285"; > + return "AR9285"; > case AR_XSREV_VERSION_KIWI: > if (AH_PRIVATE(ah)->ah_ispcie) > - return "9287"; > - return "9227"; > + return "AR9287"; > + return "AR9227"; > case AR_SREV_VERSION_AR9380: > if (ah->ah_macRev >= AR_SREV_REVISION_AR9580_10) > - return "9580"; > - return "9380"; > + return "AR9580"; > + return "AR9380"; > case AR_SREV_VERSION_AR9460: > - return "9460"; > + return "AR9460"; > case AR_SREV_VERSION_AR9330: > - return "9330"; > + return "AR9330"; > case AR_SREV_VERSION_AR9340: > - return "9340"; > + return "AR9340"; > case AR_SREV_VERSION_QCA9550: > - /* XXX should say QCA, not AR */ > - return "9550"; > + return "QCA9550"; > case AR_SREV_VERSION_AR9485: > - return "9485"; > + return "AR9485"; > case AR_SREV_VERSION_QCA9565: > - /* XXX should say QCA, not AR */ > - return "9565"; > + return "QCA9565"; > case AR_SREV_VERSION_QCA9530: > - /* XXX should say QCA, not AR */ > - return "9530"; > + return "QCA9530"; > } > return "????"; > } > diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c > index 0dc7d3f..8b1580a 100644 > --- a/sys/dev/ath/if_ath.c > +++ b/sys/dev/ath/if_ath.c > @@ -6160,7 +6160,7 @@ ath_announce(struct ath_softc *sc) > { > struct ath_hal *ah = sc->sc_ah; > > - device_printf(sc->sc_dev, "AR%s mac %d.%d RF%s phy %d.%d\n", > + device_printf(sc->sc_dev, "%s mac %d.%d RF%s phy %d.%d\n", > ath_hal_mac_name(ah), ah->ah_macVersion, ah->ah_macRev, > ath_hal_rf_name(ah), ah->ah_phyRev >> 4, ah->ah_phyRev & > 0xf); > device_printf(sc->sc_dev, "2GHz radio: 0x%.4x; 5GHz radio: > 0x%.4x\n", > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"