Lines Matching defs:mic

847 	__be32 mic;
961 u64 accum; // accumulated mic, reduced to u32 in final()
1156 static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *pPacket, u16 payLen);
1315 /* Age current mic Context */
1325 /* Give key to mic seed */
1329 /* micinit - Initialize mic seed */
1341 /* So next time we have a valid key and mic is enabled, we will
1392 * PacketTxLen will be updated with the mic'd packets size.
1395 * be big enough to hold the largets mic message possible.
1402 static int encapsulate(struct airo_info *ai, etherHead *frame, MICBuffer *mic, int payLen)
1417 mic->typelen = htons(payLen + 16); //Length of Mic'd packet
1419 memcpy(&mic->u.snap, micsnap, sizeof(micsnap)); // Add Snap
1422 mic->seq = htonl(context->tx);
1427 emmh32_update(&context->seed, (u8*)&mic->typelen, 10); // Type/Length and Snap
1428 emmh32_update(&context->seed, (u8*)&mic->seq, sizeof(mic->seq)); //SEQ
1430 emmh32_final(&context->seed, (u8*)&mic->mic);
1433 mic->typelen = 0; //Let NIC know it could be an oversized packet
1458 static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *eth, u16 payLen)
1477 if (ntohs(mic->typelen) == 0x888E)
1480 if (memcmp (mic->u.snap, micsnap, sizeof(micsnap)) != 0) {
1486 micSEQ = ntohl(mic->seq); //store SEQ as CPU order
1488 //At this point we a have a mic'd packet and mic is enabled
1489 //Now do the mic error checking.
1510 if (!mic->typelen)
1511 mic->typelen = htons(payLen + sizeof(MICBuffer) - 2);
1515 emmh32_update(&context->seed, (u8 *)&mic->typelen, sizeof(mic->typelen)+sizeof(mic->u.snap));
1516 emmh32_update(&context->seed, (u8 *)&mic->seq, sizeof(mic->seq));
1521 if (memcmp(digest, &mic->mic, 4)) { //Make sure the mics match
1552 * Inputs: miccntx - mic context to check seq against
1632 /* mic accumulate */
1661 /* prepare for calculation of a new mic */
1664 /* prepare for new mic calculation */
1669 /* add some bytes to the mic calculation */
1711 /* calculate the mic */