Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
---
 drivers/net/ieee802154/at86rf2xx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ieee802154/at86rf2xx.c 
b/drivers/net/ieee802154/at86rf2xx.c
index 2ecd930..d0af42e 100644
--- a/drivers/net/ieee802154/at86rf2xx.c
+++ b/drivers/net/ieee802154/at86rf2xx.c
@@ -50,6 +50,7 @@ struct at86rf2xx_chip_data {
        u16 t_off_to_aack;
        u16 t_trx_off;
        u16 t_reset_to_trx_off;
+       u16 t_channel_switch;
        /* short interframe spacing time */
        u16 t_sifs;
        /* long interframe spacing time */
@@ -853,7 +854,8 @@ at86rf2xx_channel(struct ieee802154_dev *dev, int page, int 
channel)
        if (rc < 0)
                return rc;
 
-       msleep(1); /* Wait for PLL */
+       /* Wait for PLL */
+       udelay(lp->data->t_channel_switch);
        dev->phy->current_channel = channel;
        dev->phy->current_page = page;
 
@@ -1027,6 +1029,7 @@ static struct at86rf2xx_chip_data at86rf233_data = {
        .t_off_to_aack = 80,
        .t_trx_off = 1,
        .t_reset_to_trx_off = 26,
+       .t_channel_switch = 11,
        .t_sifs = 192,
        .t_lifs = 480,
        .t_tx_timeout = 2000,
@@ -1042,6 +1045,7 @@ static struct at86rf2xx_chip_data at86rf231_data = {
        .t_off_to_aack = 110,
        .t_trx_off = 1,
        .t_reset_to_trx_off = 37,
+       .t_channel_switch = 24,
        .t_sifs = 192,
        .t_lifs = 480,
        .t_tx_timeout = 2000,
@@ -1057,6 +1061,7 @@ static struct at86rf2xx_chip_data at86rf212_data = {
        .t_off_to_aack = 200,
        .t_trx_off = 1,
        .t_reset_to_trx_off = 26,
+       .t_channel_switch = 42,
        .t_sifs = 192,
        .t_lifs = 480,
        .t_tx_timeout = 2000,
-- 
2.0.0


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to