From patchwork Mon Nov 2 15:10:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya X-Patchwork-Id: 7537101 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AFDA39F750 for ; Mon, 2 Nov 2015 15:10:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D12722041B for ; Mon, 2 Nov 2015 15:10:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2C8C20414 for ; Mon, 2 Nov 2015 15:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557AbbKBPKt (ORCPT ); Mon, 2 Nov 2015 10:10:49 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38136 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753143AbbKBPKs (ORCPT ); Mon, 2 Nov 2015 10:10:48 -0500 Received: by wmeg8 with SMTP id g8so63307128wme.1 for ; Mon, 02 Nov 2015 07:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=hR0TzQlJibCsRO+lpbF4MvEWTIn0YZA2M/ZmxHZa1Rg=; b=HIqsgHS2nKoAVZQykSc9IoQwVNUpaARKjaStgSctmjg8Vr+HjUdLqZ8Zt9rRG4vSlR hfuyrHEZGPjUwIdfVao1VfqlnneIAAGkXN0MerChPhErxNklBZ+4gL2uy9WgZupyIxEO j/AFQWYg7QNT82tc6PhGGU/c6F7StCMbYrvn3MDP8jB+acZ5MVamOpnGMlQDHX9RX4uS 01itsQxfTTFYwaFCxX7xPiWk+cdXQlMXiukw6nggrWAvIMuNVN3TdXknPFpnj7jmDDae 3IZVPshcvFF1nVvCgcvtzwdnD875eXZBqK1XMdIgrgxGelAVmXIsejXa5dEV9Fc7R619 9qIA== X-Received: by 10.28.6.142 with SMTP id 136mr14862054wmg.9.1446477047637; Mon, 02 Nov 2015 07:10:47 -0800 (PST) Received: from rocky.hb.imgtec.org ([115.112.122.66]) by smtp.gmail.com with ESMTPSA id uj4sm22802890wjc.34.2015.11.02.07.10.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 07:10:46 -0800 (PST) From: Chaitanya T K To: hostap@lists.infradead.org, linux-wireless@vger.kernel.org, j@w1.fi Cc: tkc Subject: [PATCHv2] offchannel: Cancel the pending_action TX wait, before starting new one. Date: Mon, 2 Nov 2015 20:40:28 +0530 Message-Id: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: tkc Before the tx_status is received for the action frame, if we get another request, we respond to that by freeing the memory for pending_action_tx, but we don't cancel the TX wait, so in the kernel the ROC will not be cancelled. Due to above issue, wpa_supplicant assumes that all pending RoC's are cancelled and proceeds with interface creation and connection, where as state in mac80211/driver will be roc_in_progress. This is leading to issues at driver level. Signed-off-by: Chaitanya T K --- V2: Fix 2 from's. Remove the unnecessary braces. --- wpa_supplicant/offchannel.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c index 6b3f83c..581c5f6 100644 --- a/wpa_supplicant/offchannel.c +++ b/wpa_supplicant/offchannel.c @@ -253,15 +253,9 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq, wpa_s->pending_action_tx_status_cb = tx_cb; - if (wpa_s->pending_action_tx) { - wpa_printf(MSG_DEBUG, "Off-channel: Dropped pending Action " - "frame TX to " MACSTR " (pending_action_tx=%p)", - MAC2STR(wpa_s->pending_action_dst), - wpa_s->pending_action_tx); - wpa_hexdump_buf(MSG_MSGDUMP, "Pending TX frame", - wpa_s->pending_action_tx); - wpabuf_free(wpa_s->pending_action_tx); - } + if (wpa_s->pending_action_tx) + offchannel_send_action_done(wpa_s); + wpa_s->pending_action_tx_done = 0; wpa_s->pending_action_tx = wpabuf_alloc(len); if (wpa_s->pending_action_tx == NULL) {