update d80211 to latest wireless-dev version
[openwrt.git] / package / d80211 / src / ieee80211_sysfs.c
index 6a60077..b9d0973 100644 (file)
@@ -189,15 +189,13 @@ __IEEE80211_LOCAL_SHOW(tx_power_reduction);
 static ssize_t ieee80211_local_fmt_modes(struct ieee80211_local *local,
                                         char *buf)
 {
 static ssize_t ieee80211_local_fmt_modes(struct ieee80211_local *local,
                                         char *buf)
 {
-       int i;
-       struct ieee80211_hw_modes *mode;
+       struct ieee80211_hw_mode *mode;
        char *p = buf;
 
        char *p = buf;
 
-       /* FIXME: locking against ieee80211_update_hw? */
-       for (i = 0; i < local->hw.num_modes; i++) {
-               mode = &local->hw.modes[i];
+       /* FIXME: Locking? Could register a mode in the meantime. */
+       list_for_each_entry(mode, &local->modes_list, list)
                p += sprintf(p, "%s\n", ieee80211_mode_str_short(mode->mode));
                p += sprintf(p, "%s\n", ieee80211_mode_str_short(mode->mode));
-       }
+
        return (p - buf);
 }
 __IEEE80211_LOCAL_SHOW(modes);
        return (p - buf);
 }
 __IEEE80211_LOCAL_SHOW(modes);
This page took 0.021647 seconds and 4 git commands to generate.