diff options
Diffstat (limited to 'drivers/net/wireless/rtl8180_dev.c')
-rw-r--r-- | drivers/net/wireless/rtl8180_dev.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c index b7172a12c05..861c76a65d6 100644 --- a/drivers/net/wireless/rtl8180_dev.c +++ b/drivers/net/wireless/rtl8180_dev.c | |||
@@ -110,12 +110,12 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev) | |||
110 | struct sk_buff *skb = priv->rx_buf[priv->rx_idx]; | 110 | struct sk_buff *skb = priv->rx_buf[priv->rx_idx]; |
111 | u32 flags = le32_to_cpu(entry->flags); | 111 | u32 flags = le32_to_cpu(entry->flags); |
112 | 112 | ||
113 | if (flags & RTL8180_RX_DESC_FLAG_OWN) | 113 | if (flags & RTL818X_RX_DESC_FLAG_OWN) |
114 | return; | 114 | return; |
115 | 115 | ||
116 | if (unlikely(flags & (RTL8180_RX_DESC_FLAG_DMA_FAIL | | 116 | if (unlikely(flags & (RTL818X_RX_DESC_FLAG_DMA_FAIL | |
117 | RTL8180_RX_DESC_FLAG_FOF | | 117 | RTL818X_RX_DESC_FLAG_FOF | |
118 | RTL8180_RX_DESC_FLAG_RX_ERR))) | 118 | RTL818X_RX_DESC_FLAG_RX_ERR))) |
119 | goto done; | 119 | goto done; |
120 | else { | 120 | else { |
121 | u32 flags2 = le32_to_cpu(entry->flags2); | 121 | u32 flags2 = le32_to_cpu(entry->flags2); |
@@ -140,7 +140,7 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev) | |||
140 | rx_status.band = dev->conf.channel->band; | 140 | rx_status.band = dev->conf.channel->band; |
141 | rx_status.mactime = le64_to_cpu(entry->tsft); | 141 | rx_status.mactime = le64_to_cpu(entry->tsft); |
142 | rx_status.flag |= RX_FLAG_TSFT; | 142 | rx_status.flag |= RX_FLAG_TSFT; |
143 | if (flags & RTL8180_RX_DESC_FLAG_CRC32_ERR) | 143 | if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR) |
144 | rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; | 144 | rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; |
145 | 145 | ||
146 | ieee80211_rx_irqsafe(dev, skb, &rx_status); | 146 | ieee80211_rx_irqsafe(dev, skb, &rx_status); |
@@ -154,10 +154,10 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev) | |||
154 | 154 | ||
155 | done: | 155 | done: |
156 | entry->rx_buf = cpu_to_le32(*((dma_addr_t *)skb->cb)); | 156 | entry->rx_buf = cpu_to_le32(*((dma_addr_t *)skb->cb)); |
157 | entry->flags = cpu_to_le32(RTL8180_RX_DESC_FLAG_OWN | | 157 | entry->flags = cpu_to_le32(RTL818X_RX_DESC_FLAG_OWN | |
158 | MAX_RX_SIZE); | 158 | MAX_RX_SIZE); |
159 | if (priv->rx_idx == 31) | 159 | if (priv->rx_idx == 31) |
160 | entry->flags |= cpu_to_le32(RTL8180_RX_DESC_FLAG_EOR); | 160 | entry->flags |= cpu_to_le32(RTL818X_RX_DESC_FLAG_EOR); |
161 | priv->rx_idx = (priv->rx_idx + 1) % 32; | 161 | priv->rx_idx = (priv->rx_idx + 1) % 32; |
162 | } | 162 | } |
163 | } | 163 | } |
@@ -173,7 +173,7 @@ static void rtl8180_handle_tx(struct ieee80211_hw *dev, unsigned int prio) | |||
173 | struct ieee80211_tx_info *info; | 173 | struct ieee80211_tx_info *info; |
174 | u32 flags = le32_to_cpu(entry->flags); | 174 | u32 flags = le32_to_cpu(entry->flags); |
175 | 175 | ||
176 | if (flags & RTL8180_TX_DESC_FLAG_OWN) | 176 | if (flags & RTL818X_TX_DESC_FLAG_OWN) |
177 | return; | 177 | return; |
178 | 178 | ||
179 | ring->idx = (ring->idx + 1) % ring->entries; | 179 | ring->idx = (ring->idx + 1) % ring->entries; |
@@ -185,7 +185,7 @@ static void rtl8180_handle_tx(struct ieee80211_hw *dev, unsigned int prio) | |||
185 | memset(&info->status, 0, sizeof(info->status)); | 185 | memset(&info->status, 0, sizeof(info->status)); |
186 | 186 | ||
187 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { | 187 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { |
188 | if (flags & RTL8180_TX_DESC_FLAG_TX_OK) | 188 | if (flags & RTL818X_TX_DESC_FLAG_TX_OK) |
189 | info->flags |= IEEE80211_TX_STAT_ACK; | 189 | info->flags |= IEEE80211_TX_STAT_ACK; |
190 | else | 190 | else |
191 | info->status.excessive_retries = 1; | 191 | info->status.excessive_retries = 1; |
@@ -252,20 +252,20 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
252 | mapping = pci_map_single(priv->pdev, skb->data, | 252 | mapping = pci_map_single(priv->pdev, skb->data, |
253 | skb->len, PCI_DMA_TODEVICE); | 253 | skb->len, PCI_DMA_TODEVICE); |
254 | 254 | ||
255 | tx_flags = RTL8180_TX_DESC_FLAG_OWN | RTL8180_TX_DESC_FLAG_FS | | 255 | tx_flags = RTL818X_TX_DESC_FLAG_OWN | RTL818X_TX_DESC_FLAG_FS | |
256 | RTL8180_TX_DESC_FLAG_LS | | 256 | RTL818X_TX_DESC_FLAG_LS | |
257 | (ieee80211_get_tx_rate(dev, info)->hw_value << 24) | | 257 | (ieee80211_get_tx_rate(dev, info)->hw_value << 24) | |
258 | skb->len; | 258 | skb->len; |
259 | 259 | ||
260 | if (priv->r8185) | 260 | if (priv->r8185) |
261 | tx_flags |= RTL8180_TX_DESC_FLAG_DMA | | 261 | tx_flags |= RTL818X_TX_DESC_FLAG_DMA | |
262 | RTL8180_TX_DESC_FLAG_NO_ENC; | 262 | RTL818X_TX_DESC_FLAG_NO_ENC; |
263 | 263 | ||
264 | if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) { | 264 | if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) { |
265 | tx_flags |= RTL8180_TX_DESC_FLAG_RTS; | 265 | tx_flags |= RTL818X_TX_DESC_FLAG_RTS; |
266 | tx_flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19; | 266 | tx_flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19; |
267 | } else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) { | 267 | } else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) { |
268 | tx_flags |= RTL8180_TX_DESC_FLAG_CTS; | 268 | tx_flags |= RTL818X_TX_DESC_FLAG_CTS; |
269 | tx_flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19; | 269 | tx_flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19; |
270 | } | 270 | } |
271 | 271 | ||
@@ -446,10 +446,10 @@ static int rtl8180_init_rx_ring(struct ieee80211_hw *dev) | |||
446 | *mapping = pci_map_single(priv->pdev, skb_tail_pointer(skb), | 446 | *mapping = pci_map_single(priv->pdev, skb_tail_pointer(skb), |
447 | MAX_RX_SIZE, PCI_DMA_FROMDEVICE); | 447 | MAX_RX_SIZE, PCI_DMA_FROMDEVICE); |
448 | entry->rx_buf = cpu_to_le32(*mapping); | 448 | entry->rx_buf = cpu_to_le32(*mapping); |
449 | entry->flags = cpu_to_le32(RTL8180_RX_DESC_FLAG_OWN | | 449 | entry->flags = cpu_to_le32(RTL818X_RX_DESC_FLAG_OWN | |
450 | MAX_RX_SIZE); | 450 | MAX_RX_SIZE); |
451 | } | 451 | } |
452 | entry->flags |= cpu_to_le32(RTL8180_RX_DESC_FLAG_EOR); | 452 | entry->flags |= cpu_to_le32(RTL818X_RX_DESC_FLAG_EOR); |
453 | return 0; | 453 | return 0; |
454 | } | 454 | } |
455 | 455 | ||