From patchwork Thu Aug 20 22:08:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?G=C3=A1bor_Stefanik?= X-Patchwork-Id: 43019 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7KM8cue015865 for ; Thu, 20 Aug 2009 22:08:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754375AbZHTWIY (ORCPT ); Thu, 20 Aug 2009 18:08:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754201AbZHTWIY (ORCPT ); Thu, 20 Aug 2009 18:08:24 -0400 Received: from mail-fx0-f217.google.com ([209.85.220.217]:36262 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753292AbZHTWIX (ORCPT ); Thu, 20 Aug 2009 18:08:23 -0400 Received: by fxm17 with SMTP id 17so179486fxm.37 for ; Thu, 20 Aug 2009 15:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=1cI74qco0oXfI385TVUyAc98usHa4k5HOCVVbjJz0ZU=; b=ejOpM+AB75MfjxRcRs5UmmzhH0zAaEYGZhs+UVP1UsVmlxFRV3/RjhQdVdrEutbBt7 9Z8AfjBjbJyKxFHl3HYzk2xXbaLfEC0SxmXVF/tkaVFq6DJHgpntzK/fL1xIsLbFwdFL Plw/AKPSnWq0XsuVQYfQrVezjVhYXOLigqfhY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=BNHOyE8KCJsqaJeKdSYpK7gAfd9zbiP/dHv62rJ++2wP1hGdu+fv+aWEMqcpEa/Msw c1spJ4LTy92jWIzP+/nfm/Q+E9yo1YUXmaHyIIZshl1YXcdWn/Xm6hoDsOrZAy5CCQ+R djkY6XWWVKXja8rt3LcB/Ml0NiEeu0Xtr1bjE= Received: by 10.102.165.24 with SMTP id n24mr134299mue.47.1250806104182; Thu, 20 Aug 2009 15:08:24 -0700 (PDT) Received: from ?192.168.1.3? (pool-001de.externet.hu [80.85.49.221]) by mx.google.com with ESMTPS id e10sm6752356muf.44.2009.08.20.15.08.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 Aug 2009 15:08:23 -0700 (PDT) Message-ID: <4A8DC955.9060100@gmail.com> Date: Fri, 21 Aug 2009 00:08:21 +0200 From: =?UTF-8?B?R8OhYm9yIFN0ZWZhbmlr?= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Linville , Reinette Chatre , Zhu Yi CC: Wey-Yi Guy , Rafael Laufer , ipw3945-devel , linux-wireless Subject: [PATCH] iwlwifi: Make injection of non-broadcast frames work again Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Commit 1ccb84d87d04df3c76cd4352fe69786d8c7cf016 by Wey-Yi Guy ("iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor mode") broke injection of non-broadcast frames to unassociated stations (causing a SYSASSERT for all such injected frames), due to injected frames no longer automatically getting a broadcast station ID assigned, and instead ending up with invalid station IDs. This patch restores the old behavior, fixing the aforementioned regression. Signed-off-by: Gábor Stefanik --- This fixes a regression introduced between 2.6.30 and 2.6.31-rc1. Please apply to 2.6.31. drivers/net/wireless/iwlwifi/iwl-sta.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index c6633fe..81a656f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -1054,7 +1054,8 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) __le16 fc = hdr->frame_control; /* If this frame is broadcast or management, use broadcast station id */ - if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1)) + if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1) || + iwl_is_monitor_mode(priv)) /* Injected frames need broadcast too */ return priv->hw_params.bcast_sta_id; switch (priv->iw_mode) {