diff options
| author | Jouni Malinen <j@w1.fi> | 2011-07-17 19:47:41 +0300 |
|---|---|---|
| committer | Keith Deacon <kdeacon@ti.com> | 2011-11-15 20:45:50 -0600 |
| commit | 3e2218521bce7deddeb094156d7d781b5f7d4612 (patch) | |
| tree | a9f43537eed0b4b3a6c137b089bc417716f4e28f | |
| parent | dde5d82cae87c9e56716d63000cac9ef11ada45b (diff) | |
| download | android_external_wpa_supplicant_8-3e2218521bce7deddeb094156d7d781b5f7d4612.tar.gz android_external_wpa_supplicant_8-3e2218521bce7deddeb094156d7d781b5f7d4612.tar.bz2 android_external_wpa_supplicant_8-3e2218521bce7deddeb094156d7d781b5f7d4612.zip | |
nl80211: Add more debug info for iftype changes
Change-Id: Iac57962593adc9e73623dba52ccd0e64fb18b8c5
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
| -rw-r--r-- | src/drivers/driver_nl80211.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index df187aa1..b9932646 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -4003,6 +4003,27 @@ static void nl80211_remove_iface(struct wpa_driver_nl80211_data *drv, } +static const char * nl80211_iftype_str(enum nl80211_iftype mode) +{ + switch (mode) { + case NL80211_IFTYPE_ADHOC: + return "ADHOC"; + case NL80211_IFTYPE_STATION: + return "STATION"; + case NL80211_IFTYPE_AP: + return "AP"; + case NL80211_IFTYPE_MONITOR: + return "MONITOR"; + case NL80211_IFTYPE_P2P_CLIENT: + return "P2P_CLIENT"; + case NL80211_IFTYPE_P2P_GO: + return "P2P_GO"; + default: + return "unknown"; + } +} + + static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv, const char *ifname, enum nl80211_iftype iftype, @@ -4012,6 +4033,9 @@ static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv, int ifidx; int ret = -ENOBUFS; + wpa_printf(MSG_DEBUG, "nl80211: Create interface iftype %d (%s)", + iftype, nl80211_iftype_str(iftype)); + msg = nlmsg_alloc(); if (!msg) return -1; @@ -5029,11 +5053,14 @@ nla_put_failure: static int nl80211_set_mode(struct wpa_driver_nl80211_data *drv, - int ifindex, int mode) + int ifindex, enum nl80211_iftype mode) { struct nl_msg *msg; int ret = -ENOBUFS; + wpa_printf(MSG_DEBUG, "nl80211: Set mode ifindex %d iftype %d (%s)", + ifindex, mode, nl80211_iftype_str(mode)); + msg = nlmsg_alloc(); if (!msg) return -ENOMEM; |
