diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-07-02 18:20:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 00:29:25 -0400 |
commit | 984e0c682c5aebdf65bab95906ec0538e9d6ee7d (patch) | |
tree | 9fd8107d9ae796fda043e6fa0a36bcfbaa6951d0 | |
parent | 09e536cd4fb9bf52e729ec097bbe7d0651d3c69f (diff) |
at86rf230: add timing for channel switch
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ieee802154/at86rf230.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index a64914a39866..dbf85b85a708 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
@@ -42,6 +42,7 @@ struct at86rf230_local; | |||
42 | * All timings are in us. | 42 | * All timings are in us. |
43 | */ | 43 | */ |
44 | struct at86rf2xx_chip_data { | 44 | struct at86rf2xx_chip_data { |
45 | u16 t_channel_switch; | ||
45 | u16 t_reset_to_off; | 46 | u16 t_reset_to_off; |
46 | u16 t_off_to_aack; | 47 | u16 t_off_to_aack; |
47 | u16 t_off_to_tx_on; | 48 | u16 t_off_to_tx_on; |
@@ -1079,7 +1080,9 @@ at86rf230_channel(struct ieee802154_dev *dev, int page, int channel) | |||
1079 | if (rc < 0) | 1080 | if (rc < 0) |
1080 | return rc; | 1081 | return rc; |
1081 | 1082 | ||
1082 | msleep(1); /* Wait for PLL */ | 1083 | /* Wait for PLL */ |
1084 | usleep_range(lp->data->t_channel_switch, | ||
1085 | lp->data->t_channel_switch + 10); | ||
1083 | dev->phy->current_channel = channel; | 1086 | dev->phy->current_channel = channel; |
1084 | dev->phy->current_page = page; | 1087 | dev->phy->current_page = page; |
1085 | 1088 | ||
@@ -1247,6 +1250,7 @@ static struct ieee802154_ops at86rf230_ops = { | |||
1247 | }; | 1250 | }; |
1248 | 1251 | ||
1249 | static struct at86rf2xx_chip_data at86rf233_data = { | 1252 | static struct at86rf2xx_chip_data at86rf233_data = { |
1253 | .t_channel_switch = 11, | ||
1250 | .t_reset_to_off = 26, | 1254 | .t_reset_to_off = 26, |
1251 | .t_off_to_aack = 80, | 1255 | .t_off_to_aack = 80, |
1252 | .t_off_to_tx_on = 80, | 1256 | .t_off_to_tx_on = 80, |
@@ -1261,6 +1265,7 @@ static struct at86rf2xx_chip_data at86rf233_data = { | |||
1261 | }; | 1265 | }; |
1262 | 1266 | ||
1263 | static struct at86rf2xx_chip_data at86rf231_data = { | 1267 | static struct at86rf2xx_chip_data at86rf231_data = { |
1268 | .t_channel_switch = 24, | ||
1264 | .t_reset_to_off = 37, | 1269 | .t_reset_to_off = 37, |
1265 | .t_off_to_aack = 110, | 1270 | .t_off_to_aack = 110, |
1266 | .t_off_to_tx_on = 110, | 1271 | .t_off_to_tx_on = 110, |
@@ -1275,6 +1280,7 @@ static struct at86rf2xx_chip_data at86rf231_data = { | |||
1275 | }; | 1280 | }; |
1276 | 1281 | ||
1277 | static struct at86rf2xx_chip_data at86rf212_data = { | 1282 | static struct at86rf2xx_chip_data at86rf212_data = { |
1283 | .t_channel_switch = 11, | ||
1278 | .t_reset_to_off = 26, | 1284 | .t_reset_to_off = 26, |
1279 | .t_off_to_aack = 200, | 1285 | .t_off_to_aack = 200, |
1280 | .t_off_to_tx_on = 200, | 1286 | .t_off_to_tx_on = 200, |