]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/rt2x00/rt2500pci.c
rt2x00: Remove redundant flags/dev_flags initializations
[linux-2.6] / drivers / net / wireless / rt2x00 / rt2500pci.c
index 6c31c5db0ca17a999b21a7943ca046d10ccaef17..805781306dd132994ecaa3bc4497a3f7df1d2ba8 100644 (file)
@@ -1242,7 +1242,6 @@ static void rt2500pci_fill_rxdone(struct queue_entry *entry,
        rt2x00_desc_read(priv_rx->desc, 0, &word0);
        rt2x00_desc_read(priv_rx->desc, 2, &word2);
 
-       rxdesc->flags = 0;
        if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR))
                rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC;
        if (rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR))
@@ -1259,7 +1258,6 @@ static void rt2500pci_fill_rxdone(struct queue_entry *entry,
            entry->queue->rt2x00dev->rssi_offset;
        rxdesc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
-       rxdesc->dev_flags = 0;
        if (rt2x00_get_field32(word0, RXD_W0_OFDM))
                rxdesc->dev_flags |= RXDONE_SIGNAL_PLCP;
        if (rt2x00_get_field32(word0, RXD_W0_MY_BSS))
@@ -1808,6 +1806,7 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
        struct rt2x00_intf *intf = vif_to_intf(control->vif);
        struct queue_entry_priv_pci_tx *priv_tx;
        struct skb_frame_desc *skbdesc;
+       struct txentry_desc txdesc;
        u32 reg;
 
        if (unlikely(!intf->beacon))
@@ -1815,6 +1814,14 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
 
        priv_tx = intf->beacon->priv_data;
 
+       /*
+        * Copy all TX descriptor information into txdesc,
+        * after that we are free to use the skb->cb array
+        * for our information.
+        */
+       intf->beacon->skb = skb;
+       rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control);
+
        /*
         * Fill in skb descriptor
         */
@@ -1842,8 +1849,8 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
         * Write entire beacon with descriptor to register,
         * and kick the beacon generator.
         */
-       rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
        memcpy(priv_tx->data, skb->data, skb->len);
+       rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc);
        rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON);
 
        return 0;