summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorAlexis Green <agreen@cococorp.com>2015-06-05 15:43:54 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-06-09 15:53:35 -0400
commitafd2efb91990667cd4d9171a743f8a89e19d5ef1 (patch)
tree41cc3f82ecf3f6cfb5fad653569391f47fd46b2a /net/mac80211
parent74d803b6021f7a1cb06363cd9f65dbdf4fcf35e7 (diff)
mac80211: Fix incorrectly named last_hop_metric variable in mesh_rx_path_sel_frame
The last hop metric should refer to link cost (this is how hwmp_route_info_get uses it for example). But in mesh_rx_path_sel_frame we are not dealing with link cost but with the total cost to the origin of a PREQ or PREP. Signed-off-by: Alexis Green <agreen@cococorp.com> CC: Jesse Jones <jjones@cococorp.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh_hwmp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 214e63b84e5c..be33e4188209 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -854,7 +854,7 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
854{ 854{
855 struct ieee802_11_elems elems; 855 struct ieee802_11_elems elems;
856 size_t baselen; 856 size_t baselen;
857 u32 last_hop_metric; 857 u32 path_metric;
858 struct sta_info *sta; 858 struct sta_info *sta;
859 859
860 /* need action_code */ 860 /* need action_code */
@@ -877,21 +877,21 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
877 if (elems.preq_len != 37) 877 if (elems.preq_len != 37)
878 /* Right now we support just 1 destination and no AE */ 878 /* Right now we support just 1 destination and no AE */
879 return; 879 return;
880 last_hop_metric = hwmp_route_info_get(sdata, mgmt, elems.preq, 880 path_metric = hwmp_route_info_get(sdata, mgmt, elems.preq,
881 MPATH_PREQ); 881 MPATH_PREQ);
882 if (last_hop_metric) 882 if (path_metric)
883 hwmp_preq_frame_process(sdata, mgmt, elems.preq, 883 hwmp_preq_frame_process(sdata, mgmt, elems.preq,
884 last_hop_metric); 884 path_metric);
885 } 885 }
886 if (elems.prep) { 886 if (elems.prep) {
887 if (elems.prep_len != 31) 887 if (elems.prep_len != 31)
888 /* Right now we support no AE */ 888 /* Right now we support no AE */
889 return; 889 return;
890 last_hop_metric = hwmp_route_info_get(sdata, mgmt, elems.prep, 890 path_metric = hwmp_route_info_get(sdata, mgmt, elems.prep,
891 MPATH_PREP); 891 MPATH_PREP);
892 if (last_hop_metric) 892 if (path_metric)
893 hwmp_prep_frame_process(sdata, mgmt, elems.prep, 893 hwmp_prep_frame_process(sdata, mgmt, elems.prep,
894 last_hop_metric); 894 path_metric);
895 } 895 }
896 if (elems.perr) { 896 if (elems.perr) {
897 if (elems.perr_len != 15) 897 if (elems.perr_len != 15)