From patchwork Wed Nov 21 05:38:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 1001757 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B6FDFyhC"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43107m04Npz9sCw; Fri, 23 Nov 2018 00:06:28 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gPogU-0001lZ-03; Thu, 22 Nov 2018 13:06:17 +0000 Received: from mail-pl1-f193.google.com ([209.85.214.193]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1gPL9T-00071x-Gg for kernel-team@lists.ubuntu.com; Wed, 21 Nov 2018 05:34:15 +0000 Received: by mail-pl1-f193.google.com with SMTP id b5so3777116plr.4 for ; Tue, 20 Nov 2018 21:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MbZXMlwu9GClSGzOwqfaU2nR73601pigXqt5LczwV9E=; b=B6FDFyhC2jkbzfe+NMd1jUjYu24EHw5w27EO8xg8gRSHTXMvgtO5T6ZLUYH4T8Djcg F7/pH16Yg9UqA8A68eci0WWSceVJ6gwPiQM/UHlEnJGRcFYA7P5rbh27RLo7DZWIud0O L+ZDJqDrLqwj+bxHwqapIgooYPbgT017/58j6qfbMO4eKoHsRgEsYIhisu7Kz+9hFtY2 XFT4LNBVIddstVwCJBmzNgUwXAzYoUOUHstAr9DkmCx/SKi0Zr0Iv3GtdsvJ1+TCOvva 9cFRJz6ZdnSzA7jYbeFviTsl3bYVDm2JmV3IhnjcbDhvdu19UKR66JzDdrcEwy8KyBAY vgzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MbZXMlwu9GClSGzOwqfaU2nR73601pigXqt5LczwV9E=; b=qqGpgjJ/ItJgb14dlCXvb+kCvI10N+PLwAjn9doaZnuiczxHpMqEKDq/MptjxbUfC1 +1HWxItBtkicokJhDMljFsTKNradSHKq3urZ6iBMqg4y1QVM9j8zRc8Q4fYJjoY4KQu5 jnI776NjEGDwpFPvN/wti7SuMI+3dicfWTpgZrzqQ4dH1j3RbRwC1hxDFBQ40cnEI0Wt qbjtOQ6o/wJUbENNfdEy8A8iNN7wu97IwljtJzXHslZP/oyVGzAsYqBt3cOUpe+r+frx Eoa9IL3XbjvAlh1r6uZyPK9oS1tfw00kfibagwUxWTQfv4SbzF3tNPwB3s6MN87FDf4c Odzg== X-Gm-Message-State: AA+aEWYCHwW27eH0UE6KarT37/q7fyMspxnFJKrnGeuOcjM7aaK0w/mo E3M7M/Je0J8VS1AMMPrLBs5xe3DHVBU= X-Google-Smtp-Source: AFSGD/WB1G+c3az0LVeETO+ot/Tzh8U5Zdi57OOEQ4T7PoBY4N+75Wmdw4fNxBV+DYVlmKt2LDnBkA== X-Received: by 2002:a17:902:25ab:: with SMTP id y40-v6mr5250388pla.258.1542778453520; Tue, 20 Nov 2018 21:34:13 -0800 (PST) Received: from cpu459.localdomain ([27.59.216.80]) by smtp.gmail.com with ESMTPSA id e65-v6sm58861867pfa.90.2018.11.20.21.34.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 21:34:13 -0800 (PST) From: Siva Rebbagondla To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: Redpine: fix for firmware assert upon assoc Date: Wed, 21 Nov 2018 11:08:47 +0530 Message-Id: <1542778727-4105-1-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 X-Mailman-Approved-At: Thu, 22 Nov 2018 13:06:17 +0000 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Siva Rebbagondla , Sasidhar Mudigonda MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Siva Rebbagondla When Association timeout happens and station tries to scan, observed below firmware assert. Root cause: When association starts, driver is sending station add peer notify to firmware but when Association timeout happens, driver is not sending station peer delete to Firmware. Hence, FW is going into DEEP SLEEP in associated state, which causes below Firmware assert. Fix: sending station delete peer notify when assoc timeout happens ...skipping... wlan0: authenticate with ac:a3:1e:a1:1e:85 wlan0: send auth to ac:a3:1e:a1:1e:85 (try 1/3) wlan0: authenticated wlan0: associate with ac:a3:1e:a1:1e:85 (try 1/3) wlan0: associate with ac:a3:1e:a1:1e:85 (try 2/3) wlan0: associate with ac:a3:1e:a1:1e:85 (try 3/3) wlan0: association with ac:a3:1e:a1:1e:85 timed out ven_rsi_91x: rsi_disable_ps: Cannot accept disable PS in PS_NONE state ven_rsi_91x: rsi_interrupt_handler: ==> FIRMWARE Assert <== ven_rsi_91x: rsi_interrupt_handler: Firmware Status is 0xa IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready Signed-off-by: Siva Rebbagondla --- ubuntu/rsi/rsi_91x_mac80211.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c index 696802f..78702ff 100644 --- a/ubuntu/rsi/rsi_91x_mac80211.c +++ b/ubuntu/rsi/rsi_91x_mac80211.c @@ -2687,7 +2687,24 @@ out: return status; } +static void rsi_mac80211_event_callback(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + const struct ieee80211_event *event) +{ + struct rsi_hw *adapter = hw->priv; + struct rsi_common *common = adapter->priv; + struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf; + if (event->type == MLME_EVENT && event->u.mlme.data == ASSOC_EVENT && + event->u.mlme.status == MLME_TIMEOUT) { + ven_rsi_dbg(ERR_ZONE, "%s: ASSOC Timeout: reason = %d\n", + __func__, event->u.mlme.reason); + rsi_send_sta_notify_frame(common, STA_OPMODE, + STA_DISCONNECTED, + bss->bssid, bss->qos, + bss->aid, 0); + } +} static struct ieee80211_ops mac80211_ops = { .tx = rsi_mac80211_tx, @@ -2722,6 +2739,7 @@ static struct ieee80211_ops mac80211_ops = { #endif .remain_on_channel = rsi_mac80211_roc, .cancel_remain_on_channel = rsi_mac80211_cancel_roc, + .event_callback = rsi_mac80211_event_callback, }; /**