2010-09-08 23:34:43

by Steve deRosier

[permalink] [raw]
Subject: [PATCH 0/2] libertas_tf/mac80211: fix mesh mode for libertas_tf

- Steve

[PATCH 1/2] libertas_tf: Fixed mesh mode to get mesh established
[PATCH 2/2] mac80211: Fix dangling pointer in ieee80211_xmit


2010-09-08 23:34:46

by Steve deRosier

[permalink] [raw]
Subject: [PATCH 2/2] mac80211: Fix dangling pointer in ieee80211_xmit

hdr pointer is left dangling after call to ieee80211_skb_resize. This
can cause guards around mesh path selection to fail.

Signed-off-by: Steve deRosier <[email protected]>
---
net/mac80211/tx.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ccf3737..e1733dc 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1609,6 +1609,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
return;
}

+ hdr = (struct ieee80211_hdr *) skb->data;
info->control.vif = &sdata->vif;

if (ieee80211_vif_is_mesh(&sdata->vif) &&
--
1.7.0


2010-09-08 23:34:45

by Steve deRosier

[permalink] [raw]
Subject: [PATCH 1/2] libertas_tf: Fixed mesh mode to get mesh established

Along with some firmware changes, slight adjustments were needed
the driver to get mesh beacons through the firmware in mesh mode.

Signed-off-by: Steve deRosier <[email protected]>
---
drivers/net/wireless/libertas_tf/main.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 0b03fd5..647d195 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -428,6 +428,7 @@ static int lbtf_op_add_interface(struct ieee80211_hw *hw,
switch (vif->type) {
case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_ADHOC:
lbtf_set_mode(priv, LBTF_AP_MODE);
break;
case NL80211_IFTYPE_STATION:
@@ -485,6 +486,7 @@ static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw,
int i;
struct netdev_hw_addr *ha;
int mc_count = netdev_hw_addr_list_count(mc_list);
+ lbtf_deb_enter(LBTF_DEB_MACOPS);

if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE)
return mc_count;
@@ -494,6 +496,7 @@ static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw,
netdev_hw_addr_list_for_each(ha, mc_list)
memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN);

+ lbtf_deb_leave_args(LBTF_DEB_MACOPS, "count: %d", mc_count);
return mc_count;
}

@@ -512,10 +515,13 @@ static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
*new_flags &= SUPPORTED_FIF_FLAGS;

if (!changed_flags) {
+ lbtf_deb_macops("no flags changed");
lbtf_deb_leave(LBTF_DEB_MACOPS);
return;
}

+ lbtf_deb_macops("New flags 0x%x", *new_flags);
+
if (*new_flags & (FIF_PROMISC_IN_BSS))
priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE;
else
@@ -566,7 +572,6 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
kfree_skb(beacon);
priv->beacon_enable = bss_conf->enable_beacon;
priv->beacon_int = bss_conf->beacon_int;
- lbtf_set_bssid(priv, 1, bss_conf->bssid);
lbtf_beacon_ctrl(priv, bss_conf->enable_beacon,
bss_conf->beacon_int);
}
--
1.7.0