mac80211: add multi-rate retry support
[pandora-kernel.git] / drivers / net / wireless / rtl8180_dev.c
index 861c76a..df7e78e 100644 (file)
@@ -292,8 +292,8 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
        entry->plcp_len = cpu_to_le16(plcp_len);
        entry->tx_buf = cpu_to_le32(mapping);
        entry->frame_len = cpu_to_le32(skb->len);
-       entry->flags2 = info->control.alt_retry_rate_idx >= 0 ?
-               ieee80211_get_alt_retry_rate(dev, info)->bitrate << 4 : 0;
+       entry->flags2 = info->control.retries[0].rate_idx >= 0 ?
+               ieee80211_get_alt_retry_rate(dev, info, 0)->bitrate << 4 : 0;
        entry->retry_limit = info->control.retry_limit;
        entry->flags = cpu_to_le32(tx_flags);
        __skb_queue_tail(&ring->queue, skb);
@@ -615,7 +615,7 @@ static int rtl8180_start(struct ieee80211_hw *dev)
        reg |= RTL818X_CMD_TX_ENABLE;
        rtl818x_iowrite8(priv, &priv->map->CMD, reg);
 
-       priv->mode = IEEE80211_IF_TYPE_MNTR;
+       priv->mode = NL80211_IFTYPE_MONITOR;
        return 0;
 
  err_free_rings:
@@ -633,7 +633,7 @@ static void rtl8180_stop(struct ieee80211_hw *dev)
        u8 reg;
        int i;
 
-       priv->mode = IEEE80211_IF_TYPE_INVALID;
+       priv->mode = NL80211_IFTYPE_UNSPECIFIED;
 
        rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0);
 
@@ -661,11 +661,11 @@ static int rtl8180_add_interface(struct ieee80211_hw *dev,
 {
        struct rtl8180_priv *priv = dev->priv;
 
-       if (priv->mode != IEEE80211_IF_TYPE_MNTR)
+       if (priv->mode != NL80211_IFTYPE_MONITOR)
                return -EOPNOTSUPP;
 
        switch (conf->type) {
-       case IEEE80211_IF_TYPE_STA:
+       case NL80211_IFTYPE_STATION:
                priv->mode = conf->type;
                break;
        default:
@@ -688,7 +688,7 @@ static void rtl8180_remove_interface(struct ieee80211_hw *dev,
                                     struct ieee80211_if_init_conf *conf)
 {
        struct rtl8180_priv *priv = dev->priv;
-       priv->mode = IEEE80211_IF_TYPE_MNTR;
+       priv->mode = NL80211_IFTYPE_MONITOR;
        priv->vif = NULL;
 }
 
@@ -855,6 +855,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
        priv = dev->priv;
        priv->pdev = pdev;
 
+       dev->max_altrates = 1;
        SET_IEEE80211_DEV(dev, &pdev->dev);
        pci_set_drvdata(pdev, dev);