From patchwork Sun Oct 30 10:20:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Heenan X-Patchwork-Id: 688867 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3t6D6n0pT6z9sR9 for ; Sun, 30 Oct 2016 21:21:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=zgus-com.20150623.gappssmtp.com header.i=@zgus-com.20150623.gappssmtp.com header.b=N0SCwM7h; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbcJ3KVQ (ORCPT ); Sun, 30 Oct 2016 06:21:16 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34634 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754724AbcJ3KU6 (ORCPT ); Sun, 30 Oct 2016 06:20:58 -0400 Received: by mail-pf0-f196.google.com with SMTP id y68so35861pfb.1 for ; Sun, 30 Oct 2016 03:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zgus-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5v4hEGtswopEA6dRMEVKG3wQG8Ach38Ap1922IduZ4c=; b=N0SCwM7h18HFm9GclvrnQAsfbQhOlZjT5h3ukHdbMhAKseYd/ov38esrXjriUzACUV lOTddbdUABEbxZlsJ+EsABt8ldNr0T13NxjI56kYxLzuZ/dyNbxkEx6pI7zJtd5EWAVV A/AYn/yf1nOJ+GXfJ3bNR8F4nauvpccsDUnnNoCK2Dhp2rdsPlA4/08LlIY2rAXQgs3z sSuBkuUqNvt5INAumC6bP4PnCvr1Us33SVoqxIkhzqXEiiU6mPe5gQflEVFShGDzeZ7N 4K29UCXPxoKaCBwn/hj6eEqH8QXYIltFlrJu6H6c6ii/3NOnjcBrM2yklgElqfnXaUtc QkrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5v4hEGtswopEA6dRMEVKG3wQG8Ach38Ap1922IduZ4c=; b=k8gU83Ktu19xjoTFolPl15Z8D2w+RJLg6JRfLzy1Kpvs39TJeTfRNcdHIi3iTL3Gtr zlnDzTEu5nvDU5v+i9SMkO0grWkk5g5f7n93O3CxPu4BjbDi2yTuub3yg2QIIkTgUgBm K40T1X+hPs9JH8tZRynUBs+jkrefkAkVvZzNFX+yHyuihcBFpnIhWtZ+6pux4d1FU/sv TAFn3i4vchAMHN0jUeUxwcIYM8gLBb4t3OjDO/+xk5/NUqbgLgJpltMFVcv0QaVOlSwV AI/rhE6OW5ouZSJTT1ujq/dtL8TVu48K6aQEPotOWLoNxb376qS1xexrodp/clEpgd9C SIRQ== X-Gm-Message-State: ABUngvdof56Soa1KK9yLINjF0XvEv/+7jGwLppclb2qR6hvN6wiKPQXj2201Uuzufu1sWQ== X-Received: by 10.98.91.198 with SMTP id p189mr40203122pfb.22.1477822852809; Sun, 30 Oct 2016 03:20:52 -0700 (PDT) Received: from cube ([101.177.23.14]) by smtp.gmail.com with ESMTPSA id p3sm29515957pfg.48.2016.10.30.03.20.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 30 Oct 2016 03:20:51 -0700 (PDT) Date: Sun, 30 Oct 2016 20:20:46 +1000 From: John Heenan To: Jes Sorensen , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] rtl8xxxu: Fix for authentication failure Message-ID: <20161030102046.GA5784@cube> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This fix enables the same sequence of init behaviour as the alternative working driver for the wireless rtl8723bu IC at https://github.com/lwfinger/rtl8723bu For exampe rtl8xxxu_init_device is now called each time userspace wpa_supplicant is executed instead of just once when modprobe is executed. Along with 'Fix for bogus data used to determine macpower', wpa_supplicant now reliably and successfully authenticates. For rtl8xxxu-devel branch of git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git Signed-off-by: John Heenan --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 04141e5..f25b4df 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -5779,6 +5779,11 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw) ret = 0; + ret = rtl8xxxu_init_device(hw); + if (ret) + goto error_out; + + init_usb_anchor(&priv->rx_anchor); init_usb_anchor(&priv->tx_anchor); init_usb_anchor(&priv->int_anchor); @@ -6080,10 +6085,6 @@ static int rtl8xxxu_probe(struct usb_interface *interface, goto exit; } - ret = rtl8xxxu_init_device(hw); - if (ret) - goto exit; - hw->wiphy->max_scan_ssids = 1; hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);