diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 3f07e36f462b..69097d1faeb6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
| @@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, | |||
| 194 | */ | 194 | */ |
| 195 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); | 195 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); |
| 196 | while (skb) { | 196 | while (skb) { |
| 197 | rt2x00mac_tx(rt2x00dev->hw, skb); | 197 | rt2x00mac_tx(rt2x00dev->hw, NULL, skb); |
| 198 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); | 198 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); |
| 199 | } | 199 | } |
| 200 | } | 200 | } |
| @@ -1118,6 +1118,34 @@ void rt2x00lib_stop(struct rt2x00_dev *rt2x00dev) | |||
| 1118 | rt2x00dev->intf_associated = 0; | 1118 | rt2x00dev->intf_associated = 0; |
| 1119 | } | 1119 | } |
| 1120 | 1120 | ||
| 1121 | static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev) | ||
| 1122 | { | ||
| 1123 | struct ieee80211_iface_limit *if_limit; | ||
| 1124 | struct ieee80211_iface_combination *if_combination; | ||
| 1125 | |||
| 1126 | /* | ||
| 1127 | * Build up AP interface limits structure. | ||
| 1128 | */ | ||
| 1129 | if_limit = &rt2x00dev->if_limits_ap; | ||
| 1130 | if_limit->max = rt2x00dev->ops->max_ap_intf; | ||
| 1131 | if_limit->types = BIT(NL80211_IFTYPE_AP); | ||
| 1132 | |||
| 1133 | /* | ||
| 1134 | * Build up AP interface combinations structure. | ||
| 1135 | */ | ||
| 1136 | if_combination = &rt2x00dev->if_combinations[IF_COMB_AP]; | ||
| 1137 | if_combination->limits = if_limit; | ||
| 1138 | if_combination->n_limits = 1; | ||
| 1139 | if_combination->max_interfaces = if_limit->max; | ||
| 1140 | if_combination->num_different_channels = 1; | ||
| 1141 | |||
| 1142 | /* | ||
| 1143 | * Finally, specify the possible combinations to mac80211. | ||
| 1144 | */ | ||
| 1145 | rt2x00dev->hw->wiphy->iface_combinations = rt2x00dev->if_combinations; | ||
| 1146 | rt2x00dev->hw->wiphy->n_iface_combinations = 1; | ||
| 1147 | } | ||
| 1148 | |||
| 1121 | /* | 1149 | /* |
| 1122 | * driver allocation handlers. | 1150 | * driver allocation handlers. |
| 1123 | */ | 1151 | */ |
| @@ -1126,6 +1154,11 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
| 1126 | int retval = -ENOMEM; | 1154 | int retval = -ENOMEM; |
| 1127 | 1155 | ||
| 1128 | /* | 1156 | /* |
| 1157 | * Set possible interface combinations. | ||
| 1158 | */ | ||
| 1159 | rt2x00lib_set_if_combinations(rt2x00dev); | ||
| 1160 | |||
| 1161 | /* | ||
| 1129 | * Allocate the driver data memory, if necessary. | 1162 | * Allocate the driver data memory, if necessary. |
| 1130 | */ | 1163 | */ |
| 1131 | if (rt2x00dev->ops->drv_data_size > 0) { | 1164 | if (rt2x00dev->ops->drv_data_size > 0) { |
