History

mac802154: make csma/cca parameters per-wpan

Commit 9b2777d6089bcd (ieee802154: add TX power control to wpan_phy) and following erroneously added CSMA and CCA parameters for 802.15.4 devices as PHY parameters, while they are actually MAC parameters and can differ for any two WPAN instances. Since it is now sensible to have multiple WPAN devices with differing CSMA/CCA parameters, make these parameters MAC parameters instead.

Phoebe Buckheister committed 12 years ago

Commit e462ded1 parent 336908f11 files · +252 −236Browse files

Showing the changes to include/net (1 of 11 files). Show all

Unified · Split

include/net/ieee802154_netdev.h+17−0
@@ -229,6 +229,18 @@ static inline int mac_cb_type(struct sk_buff *skb) · 228 unmodified lines
229229 #define IEEE802154_MAC_SCAN_PASSIVE 2
230230 #define IEEE802154_MAC_SCAN_ORPHAN 3
231231
232+struct ieee802154_mac_params {
233+ s8 transmit_power;
234+ u8 min_be;
235+ u8 max_be;
236+ u8 csma_retries;
237+ s8 frame_retries;
238+
239+ bool lbt;
240+ u8 cca_mode;
241+ s32 cca_ed_level;
242+};
243+
232244 struct wpan_phy;
233245 /*
234246 * This should be located at net_device->ml_priv
@@ -255,6 +267,11 @@ struct ieee802154_mlme_ops { · 20 unmodified lines
255267 int (*scan_req)(struct net_device *dev,
256268 u8 type, u32 channels, u8 page, u8 duration);
257269
270+ int (*set_mac_params)(struct net_device *dev,
271+ const struct ieee802154_mac_params *params);
272+ void (*get_mac_params)(struct net_device *dev,
273+ struct ieee802154_mac_params *params);
274+
258275 /* The fields below are required. */
259276
260277 struct wpan_phy *(*get_phy)(const struct net_device *dev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t