Folks,
No wonder the "pinfo->flags = mpath->flags" was (sort of)
needed to make "mpath dump/get" show the correct flags!
if (mpath->flags & MESH_PATH_ACTIVE)
pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE;
if (mpath->flags & MESH_PATH_RESOLVING)
pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING;
if (mpath->flags & MESH_PATH_SN_VALID)
pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID;
if (mpath->flags & MESH_PATH_FIXED)
pinfo->flags |= NL80211_MPATH_FLAG_FIXED;
if (mpath->flags & MESH_PATH_RESOLVING)
pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING;
The last conditional assignment should be
if (mpath->flags & MESH_PATH_RESOLVED)
pinfo->flags |= NL80211_MPATH_FLAG_RESOLVED;
I'll try to make an updated patch in the correct format.
--- shinoda
On 2012/08/18, at 2:57, LEO Airwarosu Yoichi Shinoda wrote:
>
> Thomas,
>
> I really appreciate the quick response.
>
> I will try to generate the proper patch, although it will take
> some time 'caz I'm not on git...
>
> --- shinoda
>
> On 2012/08/18, at 2:50, Thomas Pedersen wrote:
>
>> Hi Leo
>>
>> On Fri, Aug 17, 2012 at 10:21 AM, LEO Airwarosu Yoichi Shinoda
>> <[email protected]> wrote:
>>> I'm not too sure if this is the correct list for submitting
>>> proposed patches.
>>
>> You really want to submit them to [email protected], but
>> feel free to CC [email protected]. This list is also useful
>> for RFCs and internal review.
>>
>>> A patch to remove a bogus assignment of mpath->flags into
>>> pinfo->flags after copying flag bits one by one;
>>> in net/mac80211/cfg.c.
>>
>> The diff itself looks good, but please see
>> http://www.kernel.org/doc/Documentation/SubmittingPatches for the
>> proper format (hint: use 'git format-patch').
>>
>>> Signed-off-by: Yoichi Shinoda <[email protected]>
>>> ======
>>> --- compat-wireless-2012-07-16/net/mac80211/cfg.c-orig 2012-07-26
>>> 02:24:54.316000226 +0900
>>> +++ compat-wireless-2012-07-16/net/mac80211/cfg.c 2012-08-18
>>> 02:06:24.347710521 +0900
>>> @@ -1418,8 +1418,6 @@
>>> pinfo->flags |= NL80211_MPATH_FLAG_FIXED;
>>> if (mpath->flags & MESH_PATH_RESOLVING)
>>> pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING;
>>> -
>>> - pinfo->flags = mpath->flags;
>>> }
>>>
>>> static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev,
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> [email protected]
>>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
>> _______________________________________________
>> Devel mailing list
>> [email protected]
>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
>
> _______________________________________________
> Devel mailing list
> [email protected]
> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel