aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-17 15:44:47 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-05-19 05:44:42 -0400
commit65318680c97cca15e3678148b3a5acaa33e991ec (patch)
tree6a8a0e994ff76c44d6f0d6859885f6bd468f8f5e /net/mac802154
parentedea8f7c75ec6c238130bd7e74d9f6f4c26e97b0 (diff)
ieee802154: add iftypes capability
This patch adds capability flags for supported interface types. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index ddcd6ff8d39c..356b346e1ee8 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -116,6 +116,9 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
116 phy->supported.max_csma_backoffs = 5; 116 phy->supported.max_csma_backoffs = 5;
117 phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE; 117 phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE;
118 118
119 /* always supported */
120 phy->supported.iftypes = BIT(NL802154_IFTYPE_NODE);
121
119 return &local->hw; 122 return &local->hw;
120} 123}
121EXPORT_SYMBOL(ieee802154_alloc_hw); 124EXPORT_SYMBOL(ieee802154_alloc_hw);
@@ -181,6 +184,9 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
181 local->phy->supported.max_frame_retries = -1; 184 local->phy->supported.max_frame_retries = -1;
182 } 185 }
183 186
187 if (hw->flags & IEEE802154_HW_PROMISCUOUS)
188 local->phy->supported.iftypes |= BIT(NL802154_IFTYPE_MONITOR);
189
184 rc = wpan_phy_register(local->phy); 190 rc = wpan_phy_register(local->phy);
185 if (rc < 0) 191 if (rc < 0)
186 goto out_wq; 192 goto out_wq;