]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/mac80211_hwsim.c
b43: add hardware tkip
[karo-tx-linux.git] / drivers / net / wireless / mac80211_hwsim.c
index 4befa48dbc34458ee53283961ceadd1cc8c63609..6f6cd43592c84d7db96242e88359f295badeafc5 100644 (file)
@@ -406,7 +406,8 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
        rx_status.freq = data->channel->center_freq;
        rx_status.band = data->channel->band;
        rx_status.rate_idx = info->control.rates[0].idx;
-       /* TODO: simulate signal strength (and optional packet drop) */
+       /* TODO: simulate real signal strength (and optional packet loss) */
+       rx_status.signal = -50;
 
        if (data->ps != PS_DISABLED)
                hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
@@ -581,9 +582,7 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed)
 
 static void mac80211_hwsim_configure_filter(struct ieee80211_hw *hw,
                                            unsigned int changed_flags,
-                                           unsigned int *total_flags,
-                                           int mc_count,
-                                           struct dev_addr_list *mc_list)
+                                           unsigned int *total_flags,u64 multicast)
 {
        struct mac80211_hwsim_data *data = hw->priv;
 
@@ -788,7 +787,7 @@ static const struct ieee80211_ops mac80211_hwsim_ops =
 static void mac80211_hwsim_free(void)
 {
        struct list_head tmplist, *i, *tmp;
-       struct mac80211_hwsim_data *data;
+       struct mac80211_hwsim_data *data, *tmpdata;
 
        INIT_LIST_HEAD(&tmplist);
 
@@ -797,7 +796,7 @@ static void mac80211_hwsim_free(void)
                list_move(i, &tmplist);
        spin_unlock_bh(&hwsim_radio_lock);
 
-       list_for_each_entry(data, &tmplist, list) {
+       list_for_each_entry_safe(data, tmpdata, &tmplist, list) {
                debugfs_remove(data->debugfs_group);
                debugfs_remove(data->debugfs_ps);
                debugfs_remove(data->debugfs);
@@ -836,7 +835,6 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
 {
        struct mac80211_hwsim_data *data = dat;
        struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
-       DECLARE_MAC_BUF(buf);
        struct sk_buff *skb;
        struct ieee80211_pspoll *pspoll;
 
@@ -866,7 +864,6 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
                                struct ieee80211_vif *vif, int ps)
 {
        struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
-       DECLARE_MAC_BUF(buf);
        struct sk_buff *skb;
        struct ieee80211_hdr *hdr;
 
@@ -1024,7 +1021,8 @@ static int __init init_mac80211_hwsim(void)
                        BIT(NL80211_IFTYPE_AP) |
                        BIT(NL80211_IFTYPE_MESH_POINT);
 
-               hw->flags = IEEE80211_HW_MFP_CAPABLE;
+               hw->flags = IEEE80211_HW_MFP_CAPABLE |
+                           IEEE80211_HW_SIGNAL_DBM;
 
                /* ask mac80211 to reserve space for magic */
                hw->vif_data_size = sizeof(struct hwsim_vif_priv);
@@ -1246,8 +1244,8 @@ static void __exit exit_mac80211_hwsim(void)
 {
        printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n");
 
-       unregister_netdev(hwsim_mon);
        mac80211_hwsim_free();
+       unregister_netdev(hwsim_mon);
 }