25 #include <linux/module.h>
28 #include <linux/netdevice.h>
33 static int numlbs = 1;
63 pr_debug(
"set channel to %d\n", channel);
77 spin_lock(&priv->
lock);
82 spin_unlock(&priv->
lock);
94 if (priv->
list.next == priv->
list.prev) {
96 fakelb_hw_deliver(priv, skb);
101 (dp->
dev->phy->current_channel ==
102 priv->
dev->phy->current_channel))
103 fakelb_hw_deliver(dp, skb);
116 spin_lock(&priv->
lock);
121 spin_unlock(&priv->
lock);
130 spin_lock(&priv->
lock);
132 spin_unlock(&priv->
lock);
137 .xmit = fakelb_hw_xmit,
139 .set_channel = fakelb_hw_channel,
140 .start = fakelb_hw_start,
141 .stop = fakelb_hw_stop,
162 ieee->
phy->channels_supported[0] |= 1;
164 ieee->
phy->channels_supported[0] |= 0x7fe;
166 ieee->
phy->channels_supported[0] |= 0x7FFF800;
168 ieee->
phy->channels_supported[1] |= 1;
170 ieee->
phy->channels_supported[1] |= 0x7fe;
172 ieee->
phy->channels_supported[2] |= 1;
174 ieee->
phy->channels_supported[2] |= 0x7fe;
176 ieee->
phy->channels_supported[3] |= 0x3fff;
178 ieee->
phy->channels_supported[4] |= 1;
180 ieee->
phy->channels_supported[4] |= 0x1e;
182 ieee->
phy->channels_supported[4] |= 0xffe0;
184 ieee->
phy->channels_supported[5] |= 0xf;
186 ieee->
phy->channels_supported[5] |= 0xf0;
188 ieee->
phy->channels_supported[6] |= 0x3ff;
190 ieee->
phy->channels_supported[6] |= 0x3ffc00;
192 INIT_LIST_HEAD(&priv->
list);
235 INIT_LIST_HEAD(&priv->
list);
238 for (i = 0; i < numlbs; i++) {
239 err = fakelb_add_one(&pdev->
dev, priv);
244 platform_set_drvdata(pdev, priv);
245 dev_info(&pdev->
dev,
"added ieee802154 hardware\n");
258 struct fakelb_priv *priv = platform_get_drvdata(pdev);
271 .
probe = fakelb_probe,
274 .name =
"ieee802154fakelb",
279 static __init int fakelb_init_module(
void)
281 ieee802154fake_dev = platform_device_register_simple(
282 "ieee802154fakelb", -1,
NULL, 0);
286 static __exit void fake_remove_module(
void)