Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: chromeos/compat-wireless/net/mac80211/debugfs_netdev.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 2 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
3 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 3 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9 9
10 #include <linux/kernel.h> 10 #include <linux/kernel.h>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 { \ 77 { \
78 return scnprintf(buf, buflen, format_string, sdata->field); \ 78 return scnprintf(buf, buflen, format_string, sdata->field); \
79 } 79 }
80 #define IEEE80211_IF_FMT_DEC(name, field) \ 80 #define IEEE80211_IF_FMT_DEC(name, field) \
81 IEEE80211_IF_FMT(name, field, "%d\n") 81 IEEE80211_IF_FMT(name, field, "%d\n")
82 #define IEEE80211_IF_FMT_HEX(name, field) \ 82 #define IEEE80211_IF_FMT_HEX(name, field) \
83 IEEE80211_IF_FMT(name, field, "%#x\n") 83 IEEE80211_IF_FMT(name, field, "%#x\n")
84 #define IEEE80211_IF_FMT_SIZE(name, field) \ 84 #define IEEE80211_IF_FMT_SIZE(name, field) \
85 IEEE80211_IF_FMT(name, field, "%zd\n") 85 IEEE80211_IF_FMT(name, field, "%zd\n")
86 86
87 #define IEEE80211_IF_FMT_BOOL(name, field) \
88 static ssize_t ieee80211_if_fmt_##name( \
89 const struct ieee80211_sub_if_data *sdata, char *buf, \
90 int buflen) \
91 { \
92 return scnprintf(buf, buflen, "%s\n", sdata->field ? \
93 "true" : "false"); \
Sam Leffler 2010/12/01 00:23:44 dropped local changes
94 }
95
96 #define IEEE80211_IF_FMT_ATOMIC(name, field) \ 87 #define IEEE80211_IF_FMT_ATOMIC(name, field) \
97 static ssize_t ieee80211_if_fmt_##name( \ 88 static ssize_t ieee80211_if_fmt_##name( \
98 const struct ieee80211_sub_if_data *sdata, \ 89 const struct ieee80211_sub_if_data *sdata, \
99 char *buf, int buflen) \ 90 char *buf, int buflen) \
100 { \ 91 { \
101 return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\ 92 return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\
102 } 93 }
103 94
104 #define IEEE80211_IF_FMT_MAC(name, field) \ 95 #define IEEE80211_IF_FMT_MAC(name, field) \
105 static ssize_t ieee80211_if_fmt_##name( \ 96 static ssize_t ieee80211_if_fmt_##name( \
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ], 143 IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ],
153 HEX); 144 HEX);
154 IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ], 145 IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ],
155 HEX); 146 HEX);
156 147
157 /* STA attributes */ 148 /* STA attributes */
158 IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC); 149 IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC);
159 IEEE80211_IF_FILE(aid, u.mgd.aid, DEC); 150 IEEE80211_IF_FILE(aid, u.mgd.aid, DEC);
160 IEEE80211_IF_FILE(last_beacon, u.mgd.last_beacon_signal, DEC); 151 IEEE80211_IF_FILE(last_beacon, u.mgd.last_beacon_signal, DEC);
161 IEEE80211_IF_FILE(ave_beacon, u.mgd.ave_beacon_signal, DEC_DIV_16); 152 IEEE80211_IF_FILE(ave_beacon, u.mgd.ave_beacon_signal, DEC_DIV_16);
162 IEEE80211_IF_FILE(dtim_period, local->hw.conf.ps_dtim_period, DEC);
163 IEEE80211_IF_FILE(beacon_int, vif.bss_conf.beacon_int, DEC);
164 IEEE80211_IF_FILE(cts_prot, vif.bss_conf.use_cts_prot, BOOL);
165 IEEE80211_IF_FILE(short_preamble, vif.bss_conf.use_short_preamble, BOOL);
166 IEEE80211_IF_FILE(short_slot, vif.bss_conf.use_short_slot, BOOL);
Sam Leffler 2010/12/01 00:23:44 local changes
167 153
168 static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata, 154 static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
169 enum ieee80211_smps_mode smps_mode) 155 enum ieee80211_smps_mode smps_mode)
170 { 156 {
171 struct ieee80211_local *local = sdata->local; 157 struct ieee80211_local *local = sdata->local;
172 int err; 158 int err;
173 159
174 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) && 160 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) &&
175 smps_mode == IEEE80211_SMPS_STATIC) 161 smps_mode == IEEE80211_SMPS_STATIC)
176 return -EINVAL; 162 return -EINVAL;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 { 282 {
297 DEBUGFS_ADD(drop_unencrypted); 283 DEBUGFS_ADD(drop_unencrypted);
298 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 284 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
299 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 285 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
300 286
301 DEBUGFS_ADD(bssid); 287 DEBUGFS_ADD(bssid);
302 DEBUGFS_ADD(aid); 288 DEBUGFS_ADD(aid);
303 DEBUGFS_ADD(last_beacon); 289 DEBUGFS_ADD(last_beacon);
304 DEBUGFS_ADD(ave_beacon); 290 DEBUGFS_ADD(ave_beacon);
305 DEBUGFS_ADD_MODE(smps, 0600); 291 DEBUGFS_ADD_MODE(smps, 0600);
306 DEBUGFS_ADD(dtim_period);
307 DEBUGFS_ADD(beacon_int);
308 DEBUGFS_ADD(cts_prot);
309 DEBUGFS_ADD(short_preamble);
310 DEBUGFS_ADD(short_slot);
Sam Leffler 2010/12/01 00:23:44 local changes
311 } 292 }
312 293
313 static void add_ap_files(struct ieee80211_sub_if_data *sdata) 294 static void add_ap_files(struct ieee80211_sub_if_data *sdata)
314 { 295 {
315 DEBUGFS_ADD(drop_unencrypted); 296 DEBUGFS_ADD(drop_unencrypted);
316 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 297 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
317 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 298 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
318 299
319 DEBUGFS_ADD(num_sta_ps); 300 DEBUGFS_ADD(num_sta_ps);
320 DEBUGFS_ADD(dtim_count); 301 DEBUGFS_ADD(dtim_count);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 dir = sdata->debugfs.dir; 429 dir = sdata->debugfs.dir;
449 430
450 if (!dir) 431 if (!dir)
451 return; 432 return;
452 433
453 sprintf(buf, "netdev:%s", sdata->name); 434 sprintf(buf, "netdev:%s", sdata->name);
454 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) 435 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
455 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs " 436 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
456 "dir to %s\n", buf); 437 "dir to %s\n", buf);
457 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698