]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/mac80211_hwsim.c
iwlwifi: adding pci device ids to iwl_hw_card_ids
[mv-sheeva.git] / drivers / net / wireless / mac80211_hwsim.c
index 8da352ae6825ad41934dcfe83de059e0cc8c9b2d..913dc9fe08f9a242b35d46412511e34a5c098e81 100644 (file)
@@ -126,7 +126,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
                                          (1 << IEEE80211_RADIOTAP_CHANNEL));
        hdr->rt_flags = 0;
        hdr->rt_rate = txrate->bitrate / 5;
-       hdr->rt_channel = data->channel->center_freq;
+       hdr->rt_channel = cpu_to_le16(data->channel->center_freq);
        flags = IEEE80211_CHAN_2GHZ;
        if (txrate->flags & IEEE80211_RATE_ERP_G)
                flags |= IEEE80211_CHAN_OFDM;
@@ -430,15 +430,16 @@ static int __init init_mac80211_hwsim(void)
                hwsim_radios[i] = hw;
 
                data = hw->priv;
-               data->dev = device_create(hwsim_class, NULL, 0, "hwsim%d", i);
+               data->dev = device_create_drvdata(hwsim_class, NULL, 0, hw,
+                                               "hwsim%d", i);
                if (IS_ERR(data->dev)) {
-                       printk(KERN_DEBUG "mac80211_hwsim: device_create "
+                       printk(KERN_DEBUG
+                              "mac80211_hwsim: device_create_drvdata "
                               "failed (%ld)\n", PTR_ERR(data->dev));
                        err = -ENOMEM;
                        goto failed;
                }
                data->dev->driver = &mac80211_hwsim_driver;
-               dev_set_drvdata(data->dev, hw);
 
                SET_IEEE80211_DEV(hw, data->dev);
                addr[3] = i >> 8;