Message ID | 16643744.119941393329727710.JavaMail.weblogic@epml20 |
---|---|
State | Superseded |
Headers | show |
On Tue, Feb 25, 2014 at 12:02:07PM +0000, Rahul Jain wrote: > Subject: [PATCH] Use P2P_IE_VENDOR_TYPE instead of combination of OUI_WFA and > P2P_OUI_TYPE > diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c > @@ -17,8 +17,7 @@ > void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) > { > wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); > - wpabuf_put_be24(buf, OUI_WFA); > - wpabuf_put_u8(buf, P2P_OUI_TYPE); > + wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); Why? I don't see much of a practical difference with this, but the commit here would leave number of places within src/p2p still using the OUI_WFA + P2P_OUI_TYPE combination, so this does not seem to make this any more consistent that it is today. I guess it could be justifiable to make this consistent, but in that case, I'd expect the changes to go through all files in hostap.git and likely also to remove P2P_OUI_TYPE define at the same time.
diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c index 664fade..e9b683d 100644 --- a/src/p2p/p2p_build.c +++ b/src/p2p/p2p_build.c @@ -17,8 +17,7 @@ void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) { wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); - wpabuf_put_be24(buf, OUI_WFA); - wpabuf_put_u8(buf, P2P_OUI_TYPE); + wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); wpabuf_put_u8(buf, subtype); /* OUI Subtype */ wpabuf_put_u8(buf, dialog_token); @@ -31,8 +30,7 @@ void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, { wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); - wpabuf_put_be24(buf, OUI_WFA); - wpabuf_put_u8(buf, P2P_OUI_TYPE); + wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); wpabuf_put_u8(buf, subtype); /* OUI Subtype */ wpabuf_put_u8(buf, dialog_token); @@ -47,8 +45,7 @@ u8 * p2p_buf_add_ie_hdr(struct wpabuf *buf) /* P2P IE header */ wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); len = wpabuf_put(buf, 1); /* IE length to be filled */ - wpabuf_put_be24(buf, OUI_WFA); - wpabuf_put_u8(buf, P2P_OUI_TYPE); + wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); wpa_printf(MSG_DEBUG, "P2P: * P2P IE header"); return len; }