]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/debugfs_key.c
[MAC80211]: implement cfg80211's change_interface hook
[linux-2.6-omap-h63xx.git] / net / mac80211 / debugfs_key.c
index 36e7812da55670c7d0a600ba1773d6ec5ecc97b1..c881524c87251ca39a02717663538f381248a836 100644 (file)
@@ -56,6 +56,8 @@ KEY_CONF_FILE(keyidx, D);
 KEY_CONF_FILE(hw_key_idx, D);
 KEY_FILE(flags, X);
 KEY_FILE(tx_rx_count, D);
+KEY_READ(ifindex, sdata->dev->ifindex, 20, "%d\n");
+KEY_OPS(ifindex);
 
 static ssize_t key_algorithm_read(struct file *file,
                                  char __user *userbuf,
@@ -209,6 +211,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_local *local,
        DEBUGFS_ADD(rx_spec);
        DEBUGFS_ADD(replays);
        DEBUGFS_ADD(key);
+       DEBUGFS_ADD(ifindex);
 };
 
 #define DEBUGFS_DEL(name) \
@@ -229,6 +232,7 @@ void ieee80211_debugfs_key_remove(struct ieee80211_key *key)
        DEBUGFS_DEL(rx_spec);
        DEBUGFS_DEL(replays);
        DEBUGFS_DEL(key);
+       DEBUGFS_DEL(ifindex);
 
        debugfs_remove(key->debugfs.stalink);
        key->debugfs.stalink = NULL;
@@ -258,11 +262,12 @@ void ieee80211_debugfs_key_sta_link(struct ieee80211_key *key,
                                    struct sta_info *sta)
 {
        char buf[50];
+       DECLARE_MAC_BUF(mac);
 
        if (!key->debugfs.dir)
                return;
 
-       sprintf(buf, "../../stations/" MAC_FMT, MAC_ARG(sta->addr));
+       sprintf(buf, "../../stations/%s", print_mac(mac, sta->addr));
        key->debugfs.stalink =
                debugfs_create_symlink("station", key->debugfs.dir, buf);
 }