aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-03-14 16:23:59 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-14 22:15:26 -0400
commitb70ab2e87f17176d18f67ef331064441a032b5f3 (patch)
tree634b1482ab909ebe4d62b2a786378ad9584f922a /include/net
parent46ef0eb3ea65e7043aac17cb92982be879c65366 (diff)
ieee802154: enforce consistent endianness in the 802.15.4 stack
Enable sparse warnings about endianness, replace the remaining fields regarding network operations without explicit endianness annotations with such that are annotated, and propagate this through the entire stack. Uses of ieee802154_addr_sa are not changed yet, this patch is only concerned with all other fields (such as address filters, operation parameters and the likes). Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ieee802154_netdev.h6
-rw-r--r--include/net/mac802154.h5
-rw-r--r--include/net/nl802154.h6
3 files changed, 8 insertions, 9 deletions
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
index 86d5d50a6a53..e4810d566b1b 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -171,7 +171,7 @@ struct ieee802154_mlme_ops {
171 u8 channel, u8 page, u8 cap); 171 u8 channel, u8 page, u8 cap);
172 int (*assoc_resp)(struct net_device *dev, 172 int (*assoc_resp)(struct net_device *dev,
173 struct ieee802154_addr_sa *addr, 173 struct ieee802154_addr_sa *addr,
174 u16 short_addr, u8 status); 174 __le16 short_addr, u8 status);
175 int (*disassoc_req)(struct net_device *dev, 175 int (*disassoc_req)(struct net_device *dev,
176 struct ieee802154_addr_sa *addr, 176 struct ieee802154_addr_sa *addr,
177 u8 reason); 177 u8 reason);
@@ -190,8 +190,8 @@ struct ieee802154_mlme_ops {
190 * FIXME: these should become the part of PIB/MIB interface. 190 * FIXME: these should become the part of PIB/MIB interface.
191 * However we still don't have IB interface of any kind 191 * However we still don't have IB interface of any kind
192 */ 192 */
193 u16 (*get_pan_id)(const struct net_device *dev); 193 __le16 (*get_pan_id)(const struct net_device *dev);
194 u16 (*get_short_addr)(const struct net_device *dev); 194 __le16 (*get_short_addr)(const struct net_device *dev);
195 u8 (*get_dsn)(const struct net_device *dev); 195 u8 (*get_dsn)(const struct net_device *dev);
196}; 196};
197 197
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 8ca3d04e7558..f74b2a8bf2b6 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -50,7 +50,7 @@ struct ieee802154_hw_addr_filt {
50 * devices across independent networks. 50 * devices across independent networks.
51 */ 51 */
52 __le16 short_addr; 52 __le16 short_addr;
53 u8 ieee_addr[IEEE802154_ADDR_LEN]; 53 __le64 ieee_addr;
54 u8 pan_coord; 54 u8 pan_coord;
55}; 55};
56 56
@@ -153,8 +153,7 @@ struct ieee802154_ops {
153 int (*set_hw_addr_filt)(struct ieee802154_dev *dev, 153 int (*set_hw_addr_filt)(struct ieee802154_dev *dev,
154 struct ieee802154_hw_addr_filt *filt, 154 struct ieee802154_hw_addr_filt *filt,
155 unsigned long changed); 155 unsigned long changed);
156 int (*ieee_addr)(struct ieee802154_dev *dev, 156 int (*ieee_addr)(struct ieee802154_dev *dev, __le64 addr);
157 u8 addr[IEEE802154_ADDR_LEN]);
158 int (*set_txpower)(struct ieee802154_dev *dev, int db); 157 int (*set_txpower)(struct ieee802154_dev *dev, int db);
159 int (*set_lbt)(struct ieee802154_dev *dev, bool on); 158 int (*set_lbt)(struct ieee802154_dev *dev, bool on);
160 int (*set_cca_mode)(struct ieee802154_dev *dev, u8 mode); 159 int (*set_cca_mode)(struct ieee802154_dev *dev, u8 mode);
diff --git a/include/net/nl802154.h b/include/net/nl802154.h
index 06ead976755a..3121ed047c1e 100644
--- a/include/net/nl802154.h
+++ b/include/net/nl802154.h
@@ -52,7 +52,7 @@ int ieee802154_nl_assoc_indic(struct net_device *dev,
52 * Note: This is in section 7.3.2 of the IEEE 802.15.4 document. 52 * Note: This is in section 7.3.2 of the IEEE 802.15.4 document.
53 */ 53 */
54int ieee802154_nl_assoc_confirm(struct net_device *dev, 54int ieee802154_nl_assoc_confirm(struct net_device *dev,
55 u16 short_addr, u8 status); 55 __le16 short_addr, u8 status);
56 56
57/** 57/**
58 * ieee802154_nl_disassoc_indic - Notify userland of disassociation. 58 * ieee802154_nl_disassoc_indic - Notify userland of disassociation.
@@ -111,8 +111,8 @@ int ieee802154_nl_scan_confirm(struct net_device *dev,
111 * Note: This API cannot indicate a beacon frame for a coordinator 111 * Note: This API cannot indicate a beacon frame for a coordinator
112 * operating in long addressing mode. 112 * operating in long addressing mode.
113 */ 113 */
114int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid, 114int ieee802154_nl_beacon_indic(struct net_device *dev, __le16 panid,
115 u16 coord_addr); 115 __le16 coord_addr);
116 116
117/** 117/**
118 * ieee802154_nl_start_confirm - Notify userland of completion of start. 118 * ieee802154_nl_start_confirm - Notify userland of completion of start.