On 14/10/14 11:21 am, "Johannes Berg" <johannes@xxxxxxxxxxxxxxxx> wrote: >On Fri, 2014-10-10 at 20:55 +0300, Jouni Malinen wrote: > >>+ * @reason_code: Reason code for the Disassociation/Deauthentication >>frame >> */ >> struct station_del_parameters { >> const u8 *mac; >> + u8 subtype; >> + u16 reason_code; > >the reason_code could end up being zero right now, if userspace doesn't >specify the attribute. That was more or less by design, but not really fully documented and not really supposed to be used if the subtype is not provided. >I think you should probably force a reason code to be given when >specifying the subtype. And I'm thinking that defaulting to deauth/3 >would be better than leaving it up to the driver(s)? I guess we could do that in cfg80211. I was trying to follow the current behavior for this (i.e., not telling the driver what to do if user space does not require something). As an example, ath6kl uses Deauthentication with reason code 2. I don't think reason code 3 would be a good default, though, since it has a special meaning for P2P groups (GO indicates group is being terminated). That specific use case is one of the main reasons for making sure that user space can specify that Deauthentication with a specific reason code is used. I think I would be fine with cfg80211 default being Deauthentication frame with reason code 2, so if that is what you would like to see here (rather than leaving this to the drivers), I can update the patch to behave in that way. - Jouni -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html