diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-10-29 12:18:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:33 -0500 |
commit | 3514a441265c6788d85e8222dcca10cd66433123 (patch) | |
tree | 8426726746a078a17911ef7b988b688dc7c94a6d /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | c3fd7b41cae2fa213858d6501e6065f24097c0a8 (diff) |
rt2x00: Improve interface_modes initialization
All operating modes which require beaconing should
depend on the availability of beacon entries from
the hardware.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index c42e4fdf0a1b..477a944167c4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -1056,10 +1056,16 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
1056 | */ | 1056 | */ |
1057 | rt2x00dev->hw->vif_data_size = sizeof(struct rt2x00_intf); | 1057 | rt2x00dev->hw->vif_data_size = sizeof(struct rt2x00_intf); |
1058 | 1058 | ||
1059 | rt2x00dev->hw->wiphy->interface_modes = | 1059 | /* |
1060 | BIT(NL80211_IFTYPE_AP) | | 1060 | * Determine which operating modes are supported, all modes |
1061 | BIT(NL80211_IFTYPE_STATION) | | 1061 | * which require beaconing, depend on the availability of |
1062 | BIT(NL80211_IFTYPE_ADHOC); | 1062 | * beacon entries. |
1063 | */ | ||
1064 | rt2x00dev->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | ||
1065 | if (rt2x00dev->ops->bcn->entry_num > 0) | ||
1066 | rt2x00dev->hw->wiphy->interface_modes |= | ||
1067 | BIT(NL80211_IFTYPE_ADHOC) | | ||
1068 | BIT(NL80211_IFTYPE_AP); | ||
1063 | 1069 | ||
1064 | /* | 1070 | /* |
1065 | * Let the driver probe the device to detect the capabilities. | 1071 | * Let the driver probe the device to detect the capabilities. |