On Fri, Jun 27, 2014 at 06:09:31PM +0530, Varka Bhadram wrote: > On 06/27/2014 06:07 PM, Alexander Aring wrote: > >On Fri, Jun 27, 2014 at 06:00:58PM +0530, Varka Bhadram wrote: > >>On 06/27/2014 05:52 PM, Alexander Aring wrote: > >>>On Fri, Jun 27, 2014 at 05:35:00PM +0530, Varka Bhadram wrote: > >>>>Hi Alex, > >>>> > >>>> > >>>>On 06/27/2014 04:16 PM, Alexander Aring wrote: > >>>>>+ > >>>>>+static void > >>>>>+at86rf230_rx(struct at86rf230_local *lp, > >>>>>+ const u8 *data, u8 len) > >>>>const u8 len ? > >>>> > >>>len will be changed during runtime above, because the transceiver > >>>doesn't filter if len > IEEE802154_MTU, then I will change it to > >>>IEEE802154_MTU. See above. > >>at86rf230_rx_read_frame_complete(void *context) > >>{ > >> struct at86rf230_state_change *ctx = context; > >> struct at86rf230_local *lp = ctx->lp; > >> const u8 *buf = lp->irq.buf; > >> const u8 len = buf[1]; > >> > >> at86rf230_rx(lp, buf + 2, len); > >>} > >> > >>const u8 len = buf[1] ?... :-) > >What you mean here? In this local context of this function len should be > >const. > > len is not changing at runtime ? >
Of course in the at86rf230_rx function. Each function has his own stack for a local context and in at86rf230_rx len is not a pointer as parameter. In at86rf230_rx_read_frame_complete the local context is const for len, because we don't change it. In at86rf230_rx the local context is not const but len is not the same len like the len in at86rf230_rx_read_frame_complete, because we put it on the stack. In at86rf230_rx len will be changed at runtime for the local context of at86rf230_rx. - Alex ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel