aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl8187_dev.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index ca5deb6244e6..e9902613e2ee 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -187,18 +187,18 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
187 } 187 }
188 188
189 flags = skb->len; 189 flags = skb->len;
190 flags |= RTL8187_TX_FLAG_NO_ENCRYPT; 190 flags |= RTL818X_TX_DESC_FLAG_NO_ENC;
191 191
192 flags |= ieee80211_get_tx_rate(dev, info)->hw_value << 24; 192 flags |= ieee80211_get_tx_rate(dev, info)->hw_value << 24;
193 if (ieee80211_has_morefrags(((struct ieee80211_hdr *)skb->data)->frame_control)) 193 if (ieee80211_has_morefrags(((struct ieee80211_hdr *)skb->data)->frame_control))
194 flags |= RTL8187_TX_FLAG_MORE_FRAG; 194 flags |= RTL818X_TX_DESC_FLAG_MOREFRAG;
195 if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) { 195 if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) {
196 flags |= RTL8187_TX_FLAG_RTS; 196 flags |= RTL818X_TX_DESC_FLAG_RTS;
197 flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19; 197 flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19;
198 rts_dur = ieee80211_rts_duration(dev, priv->vif, 198 rts_dur = ieee80211_rts_duration(dev, priv->vif,
199 skb->len, info); 199 skb->len, info);
200 } else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) { 200 } else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) {
201 flags |= RTL8187_TX_FLAG_CTS; 201 flags |= RTL818X_TX_DESC_FLAG_CTS;
202 flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19; 202 flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19;
203 } 203 }
204 204
@@ -354,7 +354,7 @@ static void rtl8187_rx_cb(struct urb *urb)
354 rx_status.freq = dev->conf.channel->center_freq; 354 rx_status.freq = dev->conf.channel->center_freq;
355 rx_status.band = dev->conf.channel->band; 355 rx_status.band = dev->conf.channel->band;
356 rx_status.flag |= RX_FLAG_TSFT; 356 rx_status.flag |= RX_FLAG_TSFT;
357 if (flags & (1 << 13)) 357 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR)
358 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; 358 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
359 ieee80211_rx_irqsafe(dev, skb, &rx_status); 359 ieee80211_rx_irqsafe(dev, skb, &rx_status);
360 360
@@ -836,11 +836,11 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
836 struct rtl8187_priv *priv = dev->priv; 836 struct rtl8187_priv *priv = dev->priv;
837 int i; 837 int i;
838 838
839 if (priv->mode != IEEE80211_IF_TYPE_MNTR) 839 if (priv->mode != NL80211_IFTYPE_MONITOR)
840 return -EOPNOTSUPP; 840 return -EOPNOTSUPP;
841 841
842 switch (conf->type) { 842 switch (conf->type) {
843 case IEEE80211_IF_TYPE_STA: 843 case NL80211_IFTYPE_STATION:
844 priv->mode = conf->type; 844 priv->mode = conf->type;
845 break; 845 break;
846 default: 846 default:
@@ -865,7 +865,7 @@ static void rtl8187_remove_interface(struct ieee80211_hw *dev,
865{ 865{
866 struct rtl8187_priv *priv = dev->priv; 866 struct rtl8187_priv *priv = dev->priv;
867 mutex_lock(&priv->conf_mutex); 867 mutex_lock(&priv->conf_mutex);
868 priv->mode = IEEE80211_IF_TYPE_MNTR; 868 priv->mode = NL80211_IFTYPE_MONITOR;
869 priv->vif = NULL; 869 priv->vif = NULL;
870 mutex_unlock(&priv->conf_mutex); 870 mutex_unlock(&priv->conf_mutex);
871} 871}
@@ -1057,7 +1057,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1057 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; 1057 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
1058 1058
1059 1059
1060 priv->mode = IEEE80211_IF_TYPE_MNTR; 1060 priv->mode = NL80211_IFTYPE_MONITOR;
1061 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | 1061 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
1062 IEEE80211_HW_RX_INCLUDES_FCS; 1062 IEEE80211_HW_RX_INCLUDES_FCS;
1063 1063
@@ -1184,6 +1184,8 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1184 dev->max_signal = 65; 1184 dev->max_signal = 65;
1185 } 1185 }
1186 1186
1187 dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
1188
1187 if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b) 1189 if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b)
1188 printk(KERN_INFO "rtl8187: inconsistency between id with OEM" 1190 printk(KERN_INFO "rtl8187: inconsistency between id with OEM"
1189 " info!\n"); 1191 " info!\n");