[PATCH] staging: stlc45xx: mac80211 - unify config_interface and bss_info_changed

From: Tim Gardner
Date: Wed Apr 29 2009 - 15:02:18 EST


The commit 'mac80211: unify config_interface and bss_info_changed' from
Johannes Berg <johannes@xxxxxxxxxxxxxxxx> removed the config_interface structure
tag from struct ieee80211_ops. The BSSID detection functionality migrated to
ieee80211_ops.bss_info_changed.

Merged BSSID change detection from stlc45xx_op_config_interface()
into stlc45xx_op_bss_info_changed() and removed stlc45xx_op_config_interface().
Also added missing mutex locking to stlc45xx_op_bss_info_changed().

Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
---
drivers/staging/stlc45xx/stlc45xx.c | 28 +++++++++-------------------
1 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/stlc45xx/stlc45xx.c b/drivers/staging/stlc45xx/stlc45xx.c
index cfdaac9..32b2354 100644
--- a/drivers/staging/stlc45xx/stlc45xx.c
+++ b/drivers/staging/stlc45xx/stlc45xx.c
@@ -2235,24 +2235,6 @@ static void stlc45xx_op_remove_interface(struct ieee80211_hw *hw,
stlc45xx_debug(DEBUG_FUNC, "%s", __func__);
}

-static int stlc45xx_op_config_interface(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct ieee80211_if_conf *conf)
-{
- struct stlc45xx *stlc = hw->priv;
-
- stlc45xx_debug(DEBUG_FUNC, "%s", __func__);
-
- mutex_lock(&stlc->mutex);
-
- memcpy(stlc->bssid, conf->bssid, ETH_ALEN);
- stlc45xx_tx_setup(stlc);
-
- mutex_unlock(&stlc->mutex);
-
- return 0;
-}
-
static int stlc45xx_op_config(struct ieee80211_hw *hw, u32 changed)
{
struct stlc45xx *stlc = hw->priv;
@@ -2295,6 +2277,8 @@ static void stlc45xx_op_bss_info_changed(struct ieee80211_hw *hw,
{
struct stlc45xx *stlc = hw->priv;

+ mutex_lock(&stlc->mutex);
+
if (changed & BSS_CHANGED_ASSOC) {
stlc->associated = info->assoc;
if (info->assoc)
@@ -2307,6 +2291,13 @@ static void stlc45xx_op_bss_info_changed(struct ieee80211_hw *hw,
stlc45xx_tx_nullfunc(stlc, stlc->psm);
}
}
+
+ if (changed & BSS_CHANGED_BSSID) {
+ memcpy(stlc->bssid, info->bssid, ETH_ALEN);
+ stlc45xx_tx_setup(stlc);
+ }
+
+ mutex_unlock(&stlc->mutex);
}


@@ -2357,7 +2348,6 @@ static const struct ieee80211_ops stlc45xx_ops = {
.add_interface = stlc45xx_op_add_interface,
.remove_interface = stlc45xx_op_remove_interface,
.config = stlc45xx_op_config,
- .config_interface = stlc45xx_op_config_interface,
.configure_filter = stlc45xx_op_configure_filter,
.tx = stlc45xx_op_tx,
.bss_info_changed = stlc45xx_op_bss_info_changed,
--
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/