/* * I'm tired of doing "vsnprintf()" etc just to open a * file, so here's a "return static buffer with printf" * interface for paths. * * It's obviously not thread-safe. Sue me. But it's quite * useful for doing things like * * f = open(mkpath("%s/%s.perf", base, name), O_RDONLY); * * which is what it's designed for. */ #include "cache.h" #include "util.h" #include static char bad_path[] = "/bad-path/"; /* * One hack: */ static char *get_pathname(void) { static char pathname_array[4][PATH_MAX]; static int idx; return pathname_array[3 & ++idx]; } static char *cleanup_path(char *path) { /* Clean it up */ if (!memcmp(path, "./", 2)) { path += 2; while (*path == '/') path++; } return path; } char *mkpath(const char *fmt, ...) { va_list args; unsigned len; char *pathname = get_pathname(); va_start(args, fmt); len = vsnprintf(pathname, PATH_MAX, fmt, args); va_end(args); if (len >= PATH_MAX) return bad_path; return cleanup_path(pathname); } s.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2017-02-08 15:32:05 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-02-09 15:18:24 +0100
commitf181d6a3bcc35633facf5f3925699021c13492c5 (patch)
treea48ff9317b9b736188e73945b4a5704b36276485 /net/mac80211
parent8585989d146c61dd073d2135c5bb11d0f979d576 (diff)
mac80211: fix CSA in IBSS mode
Add the missing IBSS capability flag during capability init as it needs to be inserted into the generated beacon in order for CSA to work. Fixes: cd7760e62c2ac ("mac80211: add support for CSA in IBSS mode") Signed-off-by: Piotr Gawlowicz <gawlowicz@tkn.tu-berlin.de> Signed-off-by: MikoĊ‚aj Chwalisz <chwalisz@tkn.tu-berlin.de> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ibss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c