Re: [PATCH v2] staging: wilc1000: remove unwanted assignment

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

 



On Tue, Jun 02, 2015 at 03:06:04PM +0300, Dan Carpenter wrote:
> On Tue, Jun 02, 2015 at 12:01:14PM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> > On Tue, Jun 02, 2015 at 02:47:24PM +0300, Dan Carpenter wrote:
> > > On Tue, Jun 02, 2015 at 11:37:11AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> > > > >From : Hari Prasath Gujulan Elango <hgujulan@xxxxxxxxxxx>
> > > > 
> > > > remove unwanted assignment to ih->check here as it will be
> > > > overwritten.Its not used in the ip_fast_csum() function as well.
> > > 
> > > This code is hard for me to follow.  How do you know it's not used in
> > > ip_fast_csum()?
> > > 
> > > regards,
> > > dan carpenter
> > > 
> > 
> > Dan,this function to calculate the checksum of a IP header is defined 
> > in the kernel source at lib/checksum.c.
> 
> Yes.  I know that.
> 
> > This particular member is not
> > used in the function.
> 
> Because it treats the whole struct as a char buffer.
> 
> > I referred other drivers under drivers/net.It seems
> > that this assignment is not required before calling the function
> > ip_fast_csum().
> 
> I was really hoping you were going to make this simpler for me to review
> this patch but this information is very vague.
> 
> regards,
> dan carpenter
> 

Sorry Dan.Its my mistake.I think its a must to make the checksum field
in the header as zero before computing the checksum of the received
header because otherwise it will also be included in the checksum
calculation.The source of the packet fills this checksum field and at
the destination before verifying the integrity of the packet
received,this field needs to made zero.Should have checked this before I
sent out the patch.

regards
hari prasath
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux