Patchwork driver_nl80211: simplify cbmsg buffer

login
register
mail settings
Submitter Johannes Berg
Date June 19, 2012, 4:24 p.m.
Message ID <1340123073.4482.15.camel@jlt3.sipsolutions.net>
Download mbox | patch
Permalink /patch/165808/
State Accepted
Commit cad0f50e02e3169296bd53ad1efacd0e3f90732a
Headers show

Comments

Johannes Berg - June 19, 2012, 4:24 p.m.
From: Johannes Berg <johannes.berg@intel.com>

The control message received from the kernel needs
some space, but there's no need for the strange
typing that breaks clang compilation.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
---
 src/drivers/driver_nl80211.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Jouni Malinen - June 23, 2012, 5:37 p.m.
On Tue, Jun 19, 2012 at 06:24:33PM +0200, Johannes Berg wrote:
> The control message received from the kernel needs
> some space, but there's no need for the strange
> typing that breaks clang compilation.

Thanks! Applied.

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 92a7de0..b403792 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2826,10 +2826,7 @@  static void wpa_driver_nl80211_handle_eapol_tx_status(int sock,
 	u8 data[2048];
 	struct msghdr msg;
 	struct iovec entry;
-	struct {
-		struct cmsghdr cm;
-		char control[512];
-	} control;
+	u8 control[512];
 	struct cmsghdr *cmsg;
 	int res, found_ee = 0, found_wifi = 0, acked = 0;
 	union wpa_event_data event;