2012-06-08 20:30:34

by Jason Abele

[permalink] [raw]
Subject: [PATCH 0/2] mac80211: mesh remove unused var and fix naming

formerly sent as 2 and 4 respectively in:
[PATCH v3 0/5] Improvement to initial mesh metric

Javier Cardona (2):
mac80211: Remove unused variable
mac80211: Rename stainfo variable for the more common sta

net/mac80211/mesh.h | 2 +-
net/mac80211/mesh_hwmp.c | 11 ++++-------
2 files changed, 5 insertions(+), 8 deletions(-)

--
1.7.9.5



2012-06-08 20:30:36

by Jason Abele

[permalink] [raw]
Subject: [PATCH 1/2] mac80211: Remove unused variable

From: Javier Cardona <[email protected]>

Signed-off-by: Javier Cardona <[email protected]>
Reviewed-by: Jason Abele <[email protected]>
---
formerly sent as:
[PATCH v3 2/5] mac80211: Remove unused variable

net/mac80211/mesh_hwmp.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index fa7c580..acbd1ad 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -323,7 +323,6 @@ void ieee80211s_update_metric(struct ieee80211_local *local,
static u32 airtime_link_metric_get(struct ieee80211_local *local,
struct sta_info *sta)
{
- struct ieee80211_supported_band *sband;
struct rate_info rinfo;
/* This should be adjusted for each device */
int device_constant = 1 << ARITH_SHIFT;
@@ -333,8 +332,6 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
u32 tx_time, estimated_retx;
u64 result;

- sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
-
if (sta->fail_avg >= 100)
return MAX_METRIC;

--
1.7.9.5


2012-06-08 20:30:38

by Jason Abele

[permalink] [raw]
Subject: [PATCH 2/2] mac80211: Rename stainfo variable for the more common sta

From: Javier Cardona <[email protected]>

Signed-off-by: Javier Cardona <[email protected]>
Reviewed-by: Jason Abele <[email protected]>
---
formerly sent as:
[PATCH v3 4/5] mac80211: Rename stainfo variable for the more common sta

now also renames stainfo in mesh.h

net/mac80211/mesh.h | 2 +-
net/mac80211/mesh_hwmp.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index e364275..c7400a2 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -245,7 +245,7 @@ void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
int mesh_rmc_init(struct ieee80211_sub_if_data *sdata);
void ieee80211s_init(void);
void ieee80211s_update_metric(struct ieee80211_local *local,
- struct sta_info *stainfo, struct sk_buff *skb);
+ struct sta_info *sta, struct sk_buff *skb);
void ieee80211s_stop(void);
void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index acbd1ad..9b6da2d 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -303,7 +303,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
}

void ieee80211s_update_metric(struct ieee80211_local *local,
- struct sta_info *stainfo, struct sk_buff *skb)
+ struct sta_info *sta, struct sk_buff *skb)
{
struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
@@ -315,9 +315,9 @@ void ieee80211s_update_metric(struct ieee80211_local *local,
failed = !(txinfo->flags & IEEE80211_TX_STAT_ACK);

/* moving average, scaled to 100 */
- stainfo->fail_avg = ((80 * stainfo->fail_avg + 5) / 100 + 20 * failed);
- if (stainfo->fail_avg > 95)
- mesh_plink_broken(stainfo);
+ sta->fail_avg = ((80 * sta->fail_avg + 5) / 100 + 20 * failed);
+ if (sta->fail_avg > 95)
+ mesh_plink_broken(sta);
}

static u32 airtime_link_metric_get(struct ieee80211_local *local,
--
1.7.9.5


2012-06-09 08:38:56

by Johannes Berg

[permalink] [raw]