summaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-08-09 15:06:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-09 15:06:28 -0400
commit4f0544489215fc78cccb96f8e3d0f078ae965297 (patch)
tree69e71db0cf005a68ab1b70f33ae0462fd94152fc /net/wireless/nl80211.c
parent2952f6ef5195ea76279f7370f0a6571867e54438 (diff)
parent5a6e0cf70743f30c17ccb5f228db9a124b0e7477 (diff)
downloadlinux-4f0544489215fc78cccb96f8e3d0f078ae965297.tar.gz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 160c1f7c6091..587ff843cf94 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -449,10 +449,12 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb,
goto out_unlock;
}
*rdev = wiphy_to_dev((*wdev)->wiphy);
- cb->args[0] = (*rdev)->wiphy_idx;
+ /* 0 is the first index - add 1 to parse only once */
+ cb->args[0] = (*rdev)->wiphy_idx + 1;
cb->args[1] = (*wdev)->identifier;
} else {
- struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0]);
+ /* subtract the 1 again here */
+ struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1);
struct wireless_dev *tmp;
if (!wiphy) {