Re: [RFC bluetooth-next 16/21] mrf24j40: add csma params support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 27, 2015 at 03:46:59PM +0200, Stefan Schmidt wrote:
> Hello.
> 
> On 13/08/15 14:22, Alexander Aring wrote:
> >This patch adds supports to change the CSMA parameters. The datasheet
> >doesn't say anything about max_be value. Seems not configurable and we
> >assume the 802.15.4 default. But this value must exists because there is
> >a min_be value.
> >
> >Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx>
> >---
> >  drivers/net/ieee802154/mrf24j40.c | 30 +++++++++++++++++++++++++++++-
> >  1 file changed, 29 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> >index e992bff..fdb0b84 100644
> >--- a/drivers/net/ieee802154/mrf24j40.c
> >+++ b/drivers/net/ieee802154/mrf24j40.c
> >@@ -769,6 +769,26 @@ static int mrf24j40_handle_rx(struct mrf24j40 *devrec)
> >  	return spi_async(devrec->spi, &devrec->rx_msg);
> >  }
> >+static int
> >+mrf24j40_csma_params(struct ieee802154_hw *hw, u8 min_be, u8 max_be,
> >+		     u8 retries)
> >+{
> >+	struct mrf24j40 *devrec = hw->priv;
> >+	u8 val;
> >+
> >+	/* datasheet doesn't say anything about max_be, but we have min_be
> >+	 * So we assume the max_be default.
> >+	 */
> >+	WARN_ON(max_be != 5);
> Hmm, the WARN_ON here should never trigger as long as no change is made to
> the driver, right? You advertise min_maxbe and max_maxbe both to 5 below and
> this is the only value that could come from userspace. Maybe remove the
> WARN_ON here and move the comment below?
> 

ok. I will remove it, it should never happen yes. Of course also move
the comment to the range limits.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux