diff -ur kernel/arch/armnommu/boot/compressed/misc-bzip2.c ./arch/armnommu/boot/compressed/misc-bzip2.c --- kernel/arch/armnommu/boot/compressed/misc-bzip2.c 2003-09-24 15:42:42.000000000 +0200 +++ ./arch/armnommu/boot/compressed/misc-bzip2.c 2003-10-11 03:41:03.000000000 +0200 @@ -21,6 +21,7 @@ #include #include +#include "../../../../include/asm-armnommu/arch-isl3893/gpio.h" /* #define DEBUG */ @@ -88,6 +89,13 @@ free_mem_ptr = free_mem_ptr_p; /* This is our malloc area */ free_mem_ptr_end = free_mem_ptr_end_p; + //********** light on (green) power LED / modify by marcel.liao + #define PWR_ORANGE 0 + #define PWR_GREEN 4 + + uGPIO3->DDR = gpio_set((1<DR = gpio_set((1<DDR = gpio_set((1<DR = gpio_clr((1<DDR = gpio_set((1<DR = gpio_set((1<DDR = gpio_set((1<DR = gpio_set((1<base_addr == 2) /* Probe for the WLAN interface */ type = BIS_DT_802DOT11; +#if 0 else if (dev->base_addr == 3) type = BIS_DT_802DOT3; +#endif else return -ENODEV; @@ -473,7 +475,10 @@ /* Determine the mode to start the device depending on it's type. */ if (type == BIS_DT_802DOT11) { - start.mode = MODE_AP; + //start.mode = MODE_AP; + start.mode = MODE_CLIENT; + + } else if (type == BIS_DT_802DOT3) { start.mode = MODE_PROMISCUOUS; @@ -554,7 +559,9 @@ int requests; long mode; int error; - + int i; + struct obj_scan scan; + DEBUG(DBG_FUNC_CALL | DBG_OPEN, "prism_eth_start, dev->name %s\n", dev->name); /* set the MAC address */ @@ -571,8 +578,25 @@ set_rssi_linear_approximation_db(dev); set_zif_tx_iq_calibr_data(dev); set_hw_interface_variant(dev); - - mode = DOT11_MLME_INTERMEDIATE; + //set_calibration_data(dev); + + printk("\n\n\t\t DUETTE APDK CLIENT MODE \n\n"); + + /* Enable active scanning for every frequency in the scan structure. */ + if ((error = islmvc_send_mvc_msg(dev, OPGET, DOT11_OID_SCAN, (long*)&scan, sizeof(struct obj_scan))) < 0) + return -EINVAL; + + for (i = 0; i < scan.nr; i++) { + scan.mhz[i] |= 0x8000; + } + scan.sweep = 0; + + if ((error = islmvc_send_mvc_msg(dev, OPSET, DOT11_OID_SCAN, (long*)&scan, sizeof(struct obj_scan))) < 0) + return -EINVAL; + + //FIXME, what mode to use for CLIENT MODE? + //mode = DOT11_MLME_INTERMEDIATE; + mode = DOT11_MLME_AUTO; #else mode = DOT11_MLME_SIMPLE; #endif diff -ur kernel/kernel/timer.c ./kernel/timer.c --- kernel/kernel/timer.c 2003-09-24 15:47:38.000000000 +0200 +++ ./kernel/timer.c 2003-11-21 06:09:02.000000000 +0100 @@ -24,7 +24,7 @@ #include #include - +#include "../include/asm-armnommu/arch-isl3893/gpio.h" /* * Timekeeping variables */ @@ -660,19 +660,67 @@ * This spinlock protect us from races in SMP while playing with xtime. -arca */ rwlock_t xtime_lock = RW_LOCK_UNLOCKED; - +//Add by loda 2003/11/12 +int timer_check_count=0x00; +int timer_check_on=0x00; +int timer_check_stop=0x00; +#define PWR_ORANGE 0 +#define PWR_GREEN 4 static inline void update_times(void) { unsigned long ticks; - /* * update_times() is run from the raw timer_bh handler so we * just know that the irqs are locally enabled and so we don't * need to save/restore the flags of the local CPU here. -arca */ + // + //Add by loda 2003/11/12 + if(timer_check_stop==0x00) + { + /* Stardate 10311.21 Max Yin + * If only check LAN led, then if user doesn't plugin LAN cable + * the green LED will keep blinking until LAN is connected + */ + if(((uGPIO3->DDR&0x08)&&(uGPIO3->DR&0x08)) || + ((uGPIO3->DDR&0x04)&&(uGPIO3->DR&0x04)))//Check if ethernet or WLAN LED is on + { + //********** light on (green) power LED + uGPIO3->DDR = gpio_set((1<DR = gpio_set((1<DDR,uGPIO3->DR); + if(timer_check_on==0x00) + { + //********** light off (green) power LED + uGPIO3->DDR = gpio_set((1<DR = gpio_clr((1<DDR = gpio_set((1<DR = gpio_set((1<=9999999) + timer_check_count=0x00; + }//if(timer_check_stop==0x00) + // write_lock_irq(&xtime_lock); - ticks = jiffies - wall_jiffies; + if (ticks) { wall_jiffies += ticks; update_wall_time(ticks); diff -ur kernel/lib/bzip2/decompress.c ./lib/bzip2/decompress.c --- kernel/lib/bzip2/decompress.c 2003-09-24 15:47:39.000000000 +0200 +++ ./lib/bzip2/decompress.c 2003-10-11 03:41:35.000000000 +0200 @@ -61,6 +61,33 @@ #include "bzlib_private.h" +// ********** modify by marcel.liao - 09.09.2003 +#include "../../include/asm-armnommu/arch-isl3893/gpio.h" + +static unsigned int blinkUpCnt = 0; +static unsigned int blinkToggle = 0x00100000; +static unsigned int blinkBufA = 0, blinkBufB = 0; + +#define myTogglePowerLed { \ + if (!(blinkUpCnt & 0x000fffff)) { \ + uGPIO3->DDR = (0x00100010); \ + uGPIO3->DR = (blinkToggle ^= 0x00000010); \ + /*puts("Debug: PWR_GREEN blink\r");*/ \ + } \ + blinkUpCnt ++; } + +void lightPowerLed( char inOffOn, char inColor ) +{ + #define PWR_ORANGE 0 + #define PWR_GREEN 4 + + unsigned int maskDDR = 0, maskDR = 0; + + maskDDR = ((inColor == PWR_ORANGE)? gpio_set((1<DDR = maskDDR; + uGPIO3->DR = (inOffOn? /*on*/maskDR: /*off*/(maskDR & 0xffff0000)); +} /*---------------------------------------------------*/ static @@ -72,6 +99,7 @@ if (s->inUse[i]) { s->seqToUnseq[s->nInUse] = i; s->nInUse++; + myTogglePowerLed; //<--- } } @@ -85,6 +113,7 @@ while (True) { \ if (s->bsLive >= nnn) { \ UInt32 v; \ + myTogglePowerLed; /*by marcel.liao*/ \ v = (s->bsBuff >> \ (s->bsLive-nnn)) & ((1 << nnn)-1); \ s->bsLive -= nnn; \ @@ -92,6 +121,7 @@ break; \ } \ if (s->strm->avail_in == 0) RETURN(BZ_OK); \ + myTogglePowerLed; /*by marcel.liao*/ \ s->bsBuff \ = (s->bsBuff << 8) | \ ((UInt32) \ @@ -123,6 +153,7 @@ gLimit = &(s->limit[gSel][0]); \ gPerm = &(s->perm[gSel][0]); \ gBase = &(s->base[gSel][0]); \ + myTogglePowerLed; /*by marcel.liao*/ \ } \ groupPos--; \ zn = gMinlen; \ @@ -134,14 +165,15 @@ zn++; \ GET_BIT(label2, zj); \ zvec = (zvec << 1) | zj; \ + myTogglePowerLed; /*by marcel.liao*/ \ }; \ if (zvec - gBase[zn] < 0 \ || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \ RETURN(BZ_DATA_ERROR); \ lval = gPerm[zvec - gBase[zn]]; \ + myTogglePowerLed; /*by marcel.liao*/ \ } - /*---------------------------------------------------*/ Int32 BZ2_decompress ( DState* s ) { @@ -176,6 +208,8 @@ Int32* gBase; Int32* gPerm; + lightPowerLed( 1/*on*/, PWR_GREEN ); + if (s->state == BZ_X_MAGIC_1) { /*initialise the save area*/ s->save_i = 0; @@ -258,6 +292,7 @@ s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); if (s->tt == NULL) RETURN(BZ_MEM_ERROR); } + myTogglePowerLed; //<--- GET_UCHAR(BZ_X_BLKHDR_1, uc); @@ -274,6 +309,7 @@ GET_UCHAR(BZ_X_BLKHDR_6, uc); if (uc != 0x59) RETURN(BZ_DATA_ERROR); + myTogglePowerLed; //<--- s->currBlockNo++; if (s->verbosity >= 2) VPrintf1 ( "\n [%d: huff+mtf ", s->currBlockNo ); @@ -311,7 +347,7 @@ s->inUse16[i] = False; } - for (i = 0; i < 256; i++) s->inUse[i] = False; + for (i = 0; i < 256; i++) { s->inUse[i] = False; } for (i = 0; i < 16; i++) if (s->inUse16[i]) @@ -328,6 +364,7 @@ if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); if (nSelectors < 1) RETURN(BZ_DATA_ERROR); + for (i = 0; i < nSelectors; i++) { j = 0; while (True) { @@ -342,7 +379,9 @@ /*--- Undo the MTF values for the selectors. ---*/ { UChar pos[BZ_N_GROUPS], tmp, v; - for (v = 0; v < nGroups; v++) pos[v] = v; + for (v = 0; v < nGroups; v++) { + pos[v] = v; + } for (i = 0; i < nSelectors; i++) { v = s->selectorMtf[i]; @@ -375,8 +414,9 @@ for (i = 0; i < alphaSize; i++) { if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; if (s->len[t][i] < minLen) minLen = s->len[t][i]; + myTogglePowerLed; } - BZ2_hbCreateDecodeTables ( + BZ2_hbCreateDecodeTables ( /*Reference huffman.c*/ &(s->limit[t][0]), &(s->base[t][0]), &(s->perm[t][0]), @@ -384,6 +424,7 @@ minLen, maxLen, alphaSize ); s->minLens[t] = minLen; + for (blinkBufA=0; blinkBufA<500; blinkBufA++) { myTogglePowerLed; } } /*--- Now the MTF values ---*/ @@ -393,7 +434,7 @@ groupNo = -1; groupPos = 0; - for (i = 0; i <= 255; i++) s->unzftab[i] = 0; + for (i = 0; i <= 255; i++) { s->unzftab[i] = 0; } /*-- MTF init --*/ { @@ -403,6 +444,7 @@ for (jj = MTFL_SIZE-1; jj >= 0; jj--) { s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj); kk--; + myTogglePowerLed; //<--- } s->mtfbase[ii] = kk + 1; } @@ -413,20 +455,19 @@ GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); while (True) { - + myTogglePowerLed; //<--- if (nextSym == EOB) break; if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) { - es = -1; N = 1; do { + myTogglePowerLed; //*** if (nextSym == BZ_RUNA) es = es + (0+1) * N; else if (nextSym == BZ_RUNB) es = es + (1+1) * N; N = N * 2; GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym); - } - while (nextSym == BZ_RUNA || nextSym == BZ_RUNB); + } while (nextSym == BZ_RUNA || nextSym == BZ_RUNB); es++; uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ]; @@ -438,15 +479,16 @@ s->ll16[nblock] = (UInt16)uc; nblock++; es--; + myTogglePowerLed; //*** } - else + else // Not Small-decompress while (es > 0) { if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); s->tt[nblock] = (UInt32)uc; nblock++; es--; + myTogglePowerLed; //*** }; - continue; } else { @@ -472,7 +514,7 @@ nn -= 4; } while (nn > 0) { - s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; + s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; }; s->mtfa[pp] = uc; } else { @@ -482,7 +524,7 @@ pp = s->mtfbase[lno] + off; uc = s->mtfa[pp]; while (pp > s->mtfbase[lno]) { - s->mtfa[pp] = s->mtfa[pp-1]; pp--; + s->mtfa[pp] = s->mtfa[pp-1]; pp--; }; s->mtfbase[lno]++; while (lno > 0) { @@ -499,10 +541,11 @@ for (jj = MTFL_SIZE-1; jj >= 0; jj--) { s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; kk--; + myTogglePowerLed; //*** } s->mtfbase[ii] = kk + 1; } - } + }//if(s->mtfbase) } } /*-- end uc = MTF ( nextSym-1 ) --*/ @@ -532,19 +575,20 @@ /*-- Set up cftab to facilitate generation of T^(-1) --*/ s->cftab[0] = 0; - for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; - for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; + for (i = 1; i <= 256; i++) { s->cftab[i] = s->unzftab[i-1]; } + for (i = 1; i <= 256; i++) { s->cftab[i] += s->cftab[i-1]; } if (s->smallDecompress) { /*-- Make a copy of cftab, used in generation of T --*/ - for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i]; + for (i = 0; i <= 256; i++) { s->cftabCopy[i] = s->cftab[i]; myTogglePowerLed; } /*-- compute the T vector --*/ for (i = 0; i < nblock; i++) { uc = (UChar)(s->ll16[i]); SET_LL(i, s->cftabCopy[uc]); s->cftabCopy[uc]++; + myTogglePowerLed; //*** } /*-- Compute T^(-1) by pointer reversal on T --*/ @@ -555,8 +599,8 @@ SET_LL(j, i); i = j; j = tmp; - } - while (i != s->origPtr); + myTogglePowerLed; //*** + } while (i != s->origPtr); s->tPos = s->origPtr; s->nblock_used = 0; @@ -568,13 +612,14 @@ BZ_GET_SMALL(s->k0); s->nblock_used++; } - } else { + } else { /* Not Small-decompress */ /*-- compute the T^(-1) vector --*/ for (i = 0; i < nblock; i++) { uc = (UChar)(s->tt[i] & 0xff); s->tt[s->cftab[uc]] |= (i << 8); s->cftab[uc]++; + myTogglePowerLed; //*** } s->tPos = s->tt[s->origPtr] >> 8; @@ -586,9 +631,9 @@ } else { BZ_GET_FAST(s->k0); s->nblock_used++; } - + myTogglePowerLed; } - + RETURN(BZ_OK); diff -ur kernel/net/core/dev.c ./net/core/dev.c --- kernel/net/core/dev.c 2003-09-24 15:47:44.000000000 +0200 +++ ./net/core/dev.c 2004-03-24 14:11:26.000000000 +0100 @@ -1401,8 +1401,8 @@ ret = pt_prev->func(skb, skb->dev, pt_prev); } } - - br_handle_frame_hook(skb); + if(br_handle_frame_hook) + ret = br_handle_frame_hook(skb); return ret; } @@ -1949,6 +1949,7 @@ if (old_flags^dev->flags) rtmsg_ifinfo(RTM_NEWLINK, dev, old_flags^dev->flags); + br_handle_frame_hook(skb); return ret; } diff -ur kernel/net/ipv4/arp.c ./net/ipv4/arp.c --- kernel/net/ipv4/arp.c 2003-09-24 15:47:45.000000000 +0200 +++ ./net/ipv4/arp.c 2003-10-10 16:12:51.000000000 +0200 @@ -831,8 +831,10 @@ do not assert neighbour reachability. */ if (arp->ar_op != __constant_htons(ARPOP_REPLY) || - skb->pkt_type != PACKET_HOST) + skb->pkt_type != PACKET_HOST){ state = NUD_STALE; + override = 0; + } neigh_update(n, sha, state, override, 1); neigh_release(n); }