Showing error 1833

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/net/wireless/wavelan_cs.c
Line in file: 776
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 746  unsigned short nwid=ntohs(beacon->nwid);  
 747  unsigned short sigqual=stats[2] & MMR_SGNL_QUAL;   /* SNR of beacon */
 748  wavepoint_history *wavepoint=NULL;                /* WavePoint table entry */
 749  net_local *lp = netdev_priv(dev);              /* Device info */
 750
 751#ifdef I_NEED_THIS_FEATURE
 752  /* Some people don't need this, some other may need it */
 753  nwid=nwid^ntohs(beacon->domain_id);
 754#endif
 755
 756#if WAVELAN_ROAMING_DEBUG > 1
 757  printk(KERN_DEBUG "WaveLAN: beacon, dev %s:\n",dev->name);
 758  printk(KERN_DEBUG "Domain: %.4X NWID: %.4X SigQual=%d\n",ntohs(beacon->domain_id),nwid,sigqual);
 759#endif
 760  
 761  lp->wavepoint_table.locked=1;                            /* <Mutex> */
 762  
 763  wavepoint=wl_roam_check(nwid,lp);            /* Find WavePoint table entry */
 764  if(wavepoint==NULL)                    /* If no entry, Create a new one... */
 765    {
 766      wavepoint=wl_new_wavepoint(nwid,beacon->seq,lp);
 767      if(wavepoint==NULL)
 768        goto out;
 769    }
 770  if(lp->curr_point==NULL)             /* If this is the only WavePoint, */
 771    wv_roam_handover(wavepoint, lp);                 /* Jump on it! */
 772  
 773  wl_update_history(wavepoint, sigqual, beacon->seq); /* Update SNR history
 774                                                         stats. */
 775  
 776  if(lp->curr_point->average_slow < SEARCH_THRESH_LOW) /* If our current */
 777    if(!lp->cell_search)                  /* WavePoint is getting faint, */
 778      wv_nwid_filter(NWID_PROMISC,lp);    /* start looking for a new one */
 779  
 780  if(wavepoint->average_slow > 
 781     lp->curr_point->average_slow + WAVELAN_ROAMING_DELTA)
 782    wv_roam_handover(wavepoint, lp);   /* Handover to a better WavePoint */
 783  
 784  if(lp->curr_point->average_slow > SEARCH_THRESH_HIGH) /* If our SNR is */
 785    if(lp->cell_search)  /* getting better, drop out of cell search mode */
 786      wv_nwid_filter(!NWID_PROMISC,lp);
Show full sources