* [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.
@ 2017-05-15 12:04 Karim Eshapa
2017-05-16 11:51 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Karim Eshapa @ 2017-05-15 12:04 UTC (permalink / raw)
To: gregkh; +Cc: sergio.paracuellos, alexander, devel, linux-kernel, Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be
compatible with byte ordering of the network.
and in hfa384x_usb.c make calculations with respect to machine.
Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
drivers/staging/wlan-ng/p80211conv.h | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 6134eba..8f989bc 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3513,7 +3513,7 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev,
caphdr->version = htonl(P80211CAPTURE_VERSION);
caphdr->length = htonl(sizeof(struct p80211_caphdr));
- caphdr->mactime = __cpu_to_be64(rxdesc->time) * 1000;
+ caphdr->mactime = __cpu_to_be64(rxdesc->time * 1000);
caphdr->hosttime = __cpu_to_be64(jiffies);
caphdr->phytype = htonl(4); /* dss_dot11_b */
caphdr->channel = htonl(hw->sniff_channel);
diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
index 04bac2e..66332b1 100644
--- a/drivers/staging/wlan-ng/p80211conv.h
+++ b/drivers/staging/wlan-ng/p80211conv.h
@@ -101,20 +101,20 @@ void p80211skb_rxmeta_detach(struct sk_buff *skb);
* Frame capture header. (See doc/capturefrm.txt)
*/
struct p80211_caphdr {
- u32 version;
- u32 length;
- u64 mactime;
- u64 hosttime;
- u32 phytype;
- u32 channel;
- u32 datarate;
- u32 antenna;
- u32 priority;
- u32 ssi_type;
- s32 ssi_signal;
- s32 ssi_noise;
- u32 preamble;
- u32 encoding;
+ __be32 version;
+ __be32 length;
+ __be64 mactime;
+ __be64 hosttime;
+ __be32 phytype;
+ __be32 channel;
+ __be32 datarate;
+ __be32 antenna;
+ __be32 priority;
+ __be32 ssi_type;
+ __be32 ssi_signal;
+ __be32 ssi_noise;
+ __be32 preamble;
+ __be32 encoding;
};
/* buffer free method pointer type */
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.
2017-05-15 12:04 [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible Karim Eshapa
@ 2017-05-16 11:51 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-05-16 11:51 UTC (permalink / raw)
To: Karim Eshapa; +Cc: devel, sergio.paracuellos, linux-kernel
On Mon, May 15, 2017 at 02:04:57PM +0200, Karim Eshapa wrote:
> Change p80211_caphdr structure args types to __be.. to be
> compatible with byte ordering of the network.
> and in hfa384x_usb.c make calculations with respect to machine.
>
> Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
> ---
> drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
> drivers/staging/wlan-ng/p80211conv.h | 28 ++++++++++++++--------------
> 2 files changed, 15 insertions(+), 15 deletions(-)
You send two copies of this patch, at different times, which one is
correct? I'm dropping both, please resend only 1 of them :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.
@ 2017-05-15 11:23 Karim Eshapa
0 siblings, 0 replies; 5+ messages in thread
From: Karim Eshapa @ 2017-05-15 11:23 UTC (permalink / raw)
To: gregkh; +Cc: sergio.paracuellos, alexander, devel, linux-kernel, Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be
compatible with byte ordering of the network.
and in hfa384x_usb.c make calculations with respect to machine.
Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
drivers/staging/wlan-ng/p80211conv.h | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 6134eba..8f989bc 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3513,7 +3513,7 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev,
caphdr->version = htonl(P80211CAPTURE_VERSION);
caphdr->length = htonl(sizeof(struct p80211_caphdr));
- caphdr->mactime = __cpu_to_be64(rxdesc->time) * 1000;
+ caphdr->mactime = __cpu_to_be64(rxdesc->time * 1000);
caphdr->hosttime = __cpu_to_be64(jiffies);
caphdr->phytype = htonl(4); /* dss_dot11_b */
caphdr->channel = htonl(hw->sniff_channel);
diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
index 04bac2e..66332b1 100644
--- a/drivers/staging/wlan-ng/p80211conv.h
+++ b/drivers/staging/wlan-ng/p80211conv.h
@@ -101,20 +101,20 @@ void p80211skb_rxmeta_detach(struct sk_buff *skb);
* Frame capture header. (See doc/capturefrm.txt)
*/
struct p80211_caphdr {
- u32 version;
- u32 length;
- u64 mactime;
- u64 hosttime;
- u32 phytype;
- u32 channel;
- u32 datarate;
- u32 antenna;
- u32 priority;
- u32 ssi_type;
- s32 ssi_signal;
- s32 ssi_noise;
- u32 preamble;
- u32 encoding;
+ __be32 version;
+ __be32 length;
+ __be64 mactime;
+ __be64 hosttime;
+ __be32 phytype;
+ __be32 channel;
+ __be32 datarate;
+ __be32 antenna;
+ __be32 priority;
+ __be32 ssi_type;
+ __be32 ssi_signal;
+ __be32 ssi_noise;
+ __be32 preamble;
+ __be32 encoding;
};
/* buffer free method pointer type */
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.
2017-05-12 12:51 Karim Eshapa
@ 2017-05-15 10:48 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-05-15 10:48 UTC (permalink / raw)
To: Karim Eshapa; +Cc: linux-kernel
On Fri, May 12, 2017 at 02:51:56PM +0200, Karim Eshapa wrote:
> Change p80211_caphdr structure args types to __be.. to be
> compatible with byte ordering of the network.
> and in hfa384x_usb.c make calculations with respect to machine.
>
> Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
> ---
> drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
> drivers/staging/wlan-ng/p80211conv.h | 28 ++++++++++++++--------------
> 2 files changed, 15 insertions(+), 15 deletions(-)
This patch does not apply to my tree :(
Also, always use scripts/get_maintainer.pl to determine what mailing
lists to send patches to.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.
@ 2017-05-12 12:51 Karim Eshapa
2017-05-15 10:48 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Karim Eshapa @ 2017-05-12 12:51 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be
compatible with byte ordering of the network.
and in hfa384x_usb.c make calculations with respect to machine.
Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
drivers/staging/wlan-ng/p80211conv.h | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 6134eba..8f989bc 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3513,7 +3513,7 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev,
caphdr->version = htonl(P80211CAPTURE_VERSION);
caphdr->length = htonl(sizeof(struct p80211_caphdr));
- caphdr->mactime = __cpu_to_be64(rxdesc->time) * 1000;
+ caphdr->mactime = __cpu_to_be64(rxdesc->time * 1000);
caphdr->hosttime = __cpu_to_be64(jiffies);
caphdr->phytype = htonl(4); /* dss_dot11_b */
caphdr->channel = htonl(hw->sniff_channel);
diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
index 04bac2e..66332b1 100644
--- a/drivers/staging/wlan-ng/p80211conv.h
+++ b/drivers/staging/wlan-ng/p80211conv.h
@@ -101,20 +101,20 @@ void p80211skb_rxmeta_detach(struct sk_buff *skb);
* Frame capture header. (See doc/capturefrm.txt)
*/
struct p80211_caphdr {
- u32 version;
- u32 length;
- u64 mactime;
- u64 hosttime;
- u32 phytype;
- u32 channel;
- u32 datarate;
- u32 antenna;
- u32 priority;
- u32 ssi_type;
- s32 ssi_signal;
- s32 ssi_noise;
- u32 preamble;
- u32 encoding;
+ __be32 version;
+ __be32 length;
+ __be64 mactime;
+ __be64 hosttime;
+ __be32 phytype;
+ __be32 channel;
+ __be32 datarate;
+ __be32 antenna;
+ __be32 priority;
+ __be32 ssi_type;
+ __be32 ssi_signal;
+ __be32 ssi_noise;
+ __be32 preamble;
+ __be32 encoding;
};
/* buffer free method pointer type */
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-16 11:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 12:04 [PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible Karim Eshapa
2017-05-16 11:51 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2017-05-15 11:23 Karim Eshapa
2017-05-12 12:51 Karim Eshapa
2017-05-15 10:48 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).