diff options
Diffstat (limited to 'drivers/net/wireless/libertas_tf/main.c')
-rw-r--r-- | drivers/net/wireless/libertas_tf/main.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c index 019431d2f8a9..7945ff5aa334 100644 --- a/drivers/net/wireless/libertas_tf/main.c +++ b/drivers/net/wireless/libertas_tf/main.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * the Free Software Foundation; either version 2 of the License, or (at | 7 | * the Free Software Foundation; either version 2 of the License, or (at |
8 | * your option) any later version. | 8 | * your option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/slab.h> | ||
11 | |||
10 | #include "libertas_tf.h" | 12 | #include "libertas_tf.h" |
11 | #include "linux/etherdevice.h" | 13 | #include "linux/etherdevice.h" |
12 | 14 | ||
@@ -318,14 +320,14 @@ static void lbtf_op_stop(struct ieee80211_hw *hw) | |||
318 | } | 320 | } |
319 | 321 | ||
320 | static int lbtf_op_add_interface(struct ieee80211_hw *hw, | 322 | static int lbtf_op_add_interface(struct ieee80211_hw *hw, |
321 | struct ieee80211_if_init_conf *conf) | 323 | struct ieee80211_vif *vif) |
322 | { | 324 | { |
323 | struct lbtf_private *priv = hw->priv; | 325 | struct lbtf_private *priv = hw->priv; |
324 | if (priv->vif != NULL) | 326 | if (priv->vif != NULL) |
325 | return -EOPNOTSUPP; | 327 | return -EOPNOTSUPP; |
326 | 328 | ||
327 | priv->vif = conf->vif; | 329 | priv->vif = vif; |
328 | switch (conf->type) { | 330 | switch (vif->type) { |
329 | case NL80211_IFTYPE_MESH_POINT: | 331 | case NL80211_IFTYPE_MESH_POINT: |
330 | case NL80211_IFTYPE_AP: | 332 | case NL80211_IFTYPE_AP: |
331 | lbtf_set_mode(priv, LBTF_AP_MODE); | 333 | lbtf_set_mode(priv, LBTF_AP_MODE); |
@@ -337,12 +339,12 @@ static int lbtf_op_add_interface(struct ieee80211_hw *hw, | |||
337 | priv->vif = NULL; | 339 | priv->vif = NULL; |
338 | return -EOPNOTSUPP; | 340 | return -EOPNOTSUPP; |
339 | } | 341 | } |
340 | lbtf_set_mac_address(priv, (u8 *) conf->mac_addr); | 342 | lbtf_set_mac_address(priv, (u8 *) vif->addr); |
341 | return 0; | 343 | return 0; |
342 | } | 344 | } |
343 | 345 | ||
344 | static void lbtf_op_remove_interface(struct ieee80211_hw *hw, | 346 | static void lbtf_op_remove_interface(struct ieee80211_hw *hw, |
345 | struct ieee80211_if_init_conf *conf) | 347 | struct ieee80211_vif *vif) |
346 | { | 348 | { |
347 | struct lbtf_private *priv = hw->priv; | 349 | struct lbtf_private *priv = hw->priv; |
348 | 350 | ||
@@ -495,7 +497,6 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) | |||
495 | stats.band = IEEE80211_BAND_2GHZ; | 497 | stats.band = IEEE80211_BAND_2GHZ; |
496 | stats.signal = prxpd->snr; | 498 | stats.signal = prxpd->snr; |
497 | stats.noise = prxpd->nf; | 499 | stats.noise = prxpd->nf; |
498 | stats.qual = prxpd->snr - prxpd->nf; | ||
499 | /* Marvell rate index has a hole at value 4 */ | 500 | /* Marvell rate index has a hole at value 4 */ |
500 | if (prxpd->rx_rate > 4) | 501 | if (prxpd->rx_rate > 4) |
501 | --prxpd->rx_rate; | 502 | --prxpd->rx_rate; |
@@ -556,6 +557,9 @@ struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev) | |||
556 | priv->band.n_channels = ARRAY_SIZE(lbtf_channels); | 557 | priv->band.n_channels = ARRAY_SIZE(lbtf_channels); |
557 | priv->band.channels = priv->channels; | 558 | priv->band.channels = priv->channels; |
558 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | 559 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; |
560 | hw->wiphy->interface_modes = | ||
561 | BIT(NL80211_IFTYPE_STATION) | | ||
562 | BIT(NL80211_IFTYPE_ADHOC); | ||
559 | skb_queue_head_init(&priv->bc_ps_buf); | 563 | skb_queue_head_init(&priv->bc_ps_buf); |
560 | 564 | ||
561 | SET_IEEE80211_DEV(hw, dmdev); | 565 | SET_IEEE80211_DEV(hw, dmdev); |