From patchwork Sat May 8 21:40:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gertjan van Wingerde X-Patchwork-Id: 97941 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o48LeZAs031246 for ; Sat, 8 May 2010 21:40:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754028Ab0EHVkj (ORCPT ); Sat, 8 May 2010 17:40:39 -0400 Received: from cpsmtpb-ews06.kpnxchange.com ([213.75.39.9]:2117 "EHLO cpsmtpb-ews06.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754009Ab0EHVke (ORCPT ); Sat, 8 May 2010 17:40:34 -0400 Received: from cpbrm-ews27.kpnxchange.com ([10.94.84.158]) by cpsmtpb-ews06.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 8 May 2010 23:40:30 +0200 Received: from CPSMTPM-EML107.kpnxchange.com ([195.121.3.11]) by cpbrm-ews27.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 8 May 2010 23:40:30 +0200 Received: from wingerd.gvw.nl ([86.87.118.224]) by CPSMTPM-EML107.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Sat, 8 May 2010 23:40:29 +0200 Received: by wingerd.gvw.nl (Postfix, from userid 501) id F33E360037; Sat, 8 May 2010 23:40:29 +0200 (CEST) From: Gertjan van Wingerde To: "John W. Linville" Cc: Ivo van Doorn , , , Gertjan van Wingerde Subject: [PATCH 9/9] rt2x00: Fix beaconing on rt2800. Date: Sat, 8 May 2010 23:40:26 +0200 Message-Id: <1273354826-4335-10-git-send-email-gwingerde@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1273354826-4335-1-git-send-email-gwingerde@gmail.com> References: <1273354826-4335-1-git-send-email-gwingerde@gmail.com> X-OriginalArrivalTime: 08 May 2010 21:40:29.0929 (UTC) FILETIME=[145A8590:01CAEEF7] X-RecipientDomain: vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 08 May 2010 21:40:57 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 80c6768..7d4778d 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -682,7 +682,6 @@ static void rt2800pci_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc) { struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; - struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); unsigned int beacon_base; u32 reg; @@ -695,15 +694,17 @@ static void rt2800pci_write_beacon(struct queue_entry *entry, rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); /* - * Write entire beacon with descriptor to register. + * Add the TXWI for the beacon to the skb. + */ + rt2800_write_txwi(entry->skb, txdesc); + skb_push(entry->skb, TXWI_DESC_SIZE); + + /* + * Write entire beacon with TXWI to register. */ beacon_base = HW_BEACON_OFFSET(entry->entry_idx); - rt2800_register_multiwrite(rt2x00dev, - beacon_base, - skbdesc->desc, skbdesc->desc_len); - rt2800_register_multiwrite(rt2x00dev, - beacon_base + skbdesc->desc_len, - entry->skb->data, entry->skb->len); + rt2800_register_multiwrite(rt2x00dev, beacon_base, + entry->skb->data, entry->skb->len); /* * Enable beaconing again. diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index d992a93..00e7906 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -431,18 +431,10 @@ static void rt2800usb_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc) { struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; - struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); unsigned int beacon_base; u32 reg; /* - * Add the descriptor in front of the skb. - */ - skb_push(entry->skb, entry->queue->desc_size); - memcpy(entry->skb->data, skbdesc->desc, skbdesc->desc_len); - skbdesc->desc = entry->skb->data; - - /* * Disable beaconing while we are reloading the beacon data, * otherwise we might be sending out invalid data. */ @@ -451,6 +443,12 @@ static void rt2800usb_write_beacon(struct queue_entry *entry, rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); /* + * Add the TXWI for the beacon to the skb. + */ + rt2800_write_txwi(entry->skb, txdesc); + skb_push(entry->skb, TXWI_DESC_SIZE); + + /* * Write entire beacon with descriptor to register. */ beacon_base = HW_BEACON_OFFSET(entry->entry_idx);