3 * @file coreconfigurator.c
6 * @sa coreconfigurator.h
12 /*****************************************************************************/
14 /*****************************************************************************/
15 #include "coreconfigurator.h"
16 #include <linux/errno.h>
17 /*****************************************************************************/
19 /*****************************************************************************/
20 #define INLINE static __inline
21 #define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \
22 BEACON_INTERVAL_LEN + CAP_INFO_LEN)
24 /*****************************************************************************/
26 /*****************************************************************************/
29 /*****************************************************************************/
30 /* Type Definitions */
31 /*****************************************************************************/
33 /* Basic Frame Type Codes (2-bit) */
35 FRAME_TYPE_CONTROL
= 0x04,
36 FRAME_TYPE_DATA
= 0x08,
37 FRAME_TYPE_MANAGEMENT
= 0x00,
38 FRAME_TYPE_RESERVED
= 0x0C,
39 FRAME_TYPE_FORCE_32BIT
= 0xFFFFFFFF
42 /* Frame Type and Subtype Codes (6-bit) */
73 QOS_DATA_POLL_ACK
= 0xB8,
74 QOS_NULL_FRAME
= 0xC8,
76 QOS_CFPOLL_ACK
= 0xF8,
79 FRAME_SUBTYPE_FORCE_32BIT
= 0xFFFFFFFF
82 /* Element ID of various Information Elements */
84 ISSID
= 0, /* Service Set Identifier */
85 ISUPRATES
= 1, /* Supported Rates */
86 IFHPARMS
= 2, /* FH parameter set */
87 IDSPARMS
= 3, /* DS parameter set */
88 ICFPARMS
= 4, /* CF parameter set */
89 ITIM
= 5, /* Traffic Information Map */
90 IIBPARMS
= 6, /* IBSS parameter set */
91 ICOUNTRY
= 7, /* Country element */
92 IEDCAPARAMS
= 12, /* EDCA parameter set */
93 ITSPEC
= 13, /* Traffic Specification */
94 ITCLAS
= 14, /* Traffic Classification */
95 ISCHED
= 15, /* Schedule */
96 ICTEXT
= 16, /* Challenge Text */
97 IPOWERCONSTRAINT
= 32, /* Power Constraint */
98 IPOWERCAPABILITY
= 33, /* Power Capability */
99 ITPCREQUEST
= 34, /* TPC Request */
100 ITPCREPORT
= 35, /* TPC Report */
101 ISUPCHANNEL
= 36, /* Supported channel list */
102 ICHSWANNOUNC
= 37, /* Channel Switch Announcement */
103 IMEASUREMENTREQUEST
= 38, /* Measurement request */
104 IMEASUREMENTREPORT
= 39, /* Measurement report */
105 IQUIET
= 40, /* Quiet element Info */
106 IIBSSDFS
= 41, /* IBSS DFS */
107 IERPINFO
= 42, /* ERP Information */
108 ITSDELAY
= 43, /* TS Delay */
109 ITCLASPROCESS
= 44, /* TCLAS Processing */
110 IHTCAP
= 45, /* HT Capabilities */
111 IQOSCAP
= 46, /* QoS Capability */
112 IRSNELEMENT
= 48, /* RSN Information Element */
113 IEXSUPRATES
= 50, /* Extended Supported Rates */
114 IEXCHSWANNOUNC
= 60, /* Extended Ch Switch Announcement*/
115 IHTOPERATION
= 61, /* HT Information */
116 ISECCHOFF
= 62, /* Secondary Channel Offeset */
117 I2040COEX
= 72, /* 20/40 Coexistence IE */
118 I2040INTOLCHREPORT
= 73, /* 20/40 Intolerant channel report*/
119 IOBSSSCAN
= 74, /* OBSS Scan parameters */
120 IEXTCAP
= 127, /* Extended capability */
121 IWMM
= 221, /* WMM parameters */
122 IWPAELEMENT
= 221, /* WPA Information Element */
123 INFOELEM_ID_FORCE_32BIT
= 0xFFFFFFFF
129 s32 s32MaxRespBuffLen
;
136 /*****************************************************************************/
137 /* Extern Variable Declarations */
138 /*****************************************************************************/
140 /*****************************************************************************/
141 /* Global Variables */
142 /*****************************************************************************/
143 /*****************************************************************************/
144 /* Static Function Declarations */
145 /*****************************************************************************/
149 /*****************************************************************************/
151 /*****************************************************************************/
153 /* This function extracts the beacon period field from the beacon or probe */
154 /* response frame. */
155 INLINE u16
get_beacon_period(u8
*data
)
160 bcn_per
|= (data
[1] << 8);
165 INLINE u32
get_beacon_timestamp_lo(u8
*data
)
168 u32 index
= MAC_HDR_LEN
;
170 time_stamp
|= data
[index
++];
171 time_stamp
|= (data
[index
++] << 8);
172 time_stamp
|= (data
[index
++] << 16);
173 time_stamp
|= (data
[index
] << 24);
178 INLINE u32
get_beacon_timestamp_hi(u8
*data
)
181 u32 index
= (MAC_HDR_LEN
+ 4);
183 time_stamp
|= data
[index
++];
184 time_stamp
|= (data
[index
++] << 8);
185 time_stamp
|= (data
[index
++] << 16);
186 time_stamp
|= (data
[index
] << 24);
191 /* This function extracts the 'frame type and sub type' bits from the MAC */
192 /* header of the input frame. */
193 /* Returns the value in the LSB of the returned value. */
194 INLINE tenuFrmSubtype
get_sub_type(u8
*header
)
196 return ((tenuFrmSubtype
)(header
[0] & 0xFC));
199 /* This function extracts the 'to ds' bit from the MAC header of the input */
201 /* Returns the value in the LSB of the returned value. */
202 INLINE u8
get_to_ds(u8
*header
)
204 return (header
[1] & 0x01);
207 /* This function extracts the 'from ds' bit from the MAC header of the input */
209 /* Returns the value in the LSB of the returned value. */
210 INLINE u8
get_from_ds(u8
*header
)
212 return ((header
[1] & 0x02) >> 1);
215 /* This function extracts the MAC Address in 'address1' field of the MAC */
216 /* header and updates the MAC Address in the allocated 'addr' variable. */
217 INLINE
void get_address1(u8
*pu8msa
, u8
*addr
)
219 memcpy(addr
, pu8msa
+ 4, 6);
222 /* This function extracts the MAC Address in 'address2' field of the MAC */
223 /* header and updates the MAC Address in the allocated 'addr' variable. */
224 INLINE
void get_address2(u8
*pu8msa
, u8
*addr
)
226 memcpy(addr
, pu8msa
+ 10, 6);
229 /* This function extracts the MAC Address in 'address3' field of the MAC */
230 /* header and updates the MAC Address in the allocated 'addr' variable. */
231 INLINE
void get_address3(u8
*pu8msa
, u8
*addr
)
233 memcpy(addr
, pu8msa
+ 16, 6);
236 /* This function extracts the BSSID from the incoming WLAN packet based on */
237 /* the 'from ds' bit, and updates the MAC Address in the allocated 'addr' */
239 INLINE
void get_BSSID(u8
*data
, u8
*bssid
)
241 if (get_from_ds(data
) == 1)
242 get_address2(data
, bssid
);
243 else if (get_to_ds(data
) == 1)
244 get_address1(data
, bssid
);
246 get_address3(data
, bssid
);
249 /* This function extracts the SSID from a beacon/probe response frame */
250 INLINE
void get_ssid(u8
*data
, u8
*ssid
, u8
*p_ssid_len
)
256 len
= data
[MAC_HDR_LEN
+ TIME_STAMP_LEN
+ BEACON_INTERVAL_LEN
+
258 j
= MAC_HDR_LEN
+ TIME_STAMP_LEN
+ BEACON_INTERVAL_LEN
+
261 /* If the SSID length field is set wrongly to a value greater than the */
262 /* allowed maximum SSID length limit, reset the length to 0 */
263 if (len
>= MAX_SSID_LEN
)
266 for (i
= 0; i
< len
; i
++, j
++)
274 /* This function extracts the capability info field from the beacon or probe */
275 /* response frame. */
276 INLINE u16
get_cap_info(u8
*data
)
279 u16 index
= MAC_HDR_LEN
;
282 st
= get_sub_type(data
);
284 /* Location of the Capability field is different for Beacon and */
285 /* Association frames. */
286 if ((st
== BEACON
) || (st
== PROBE_RSP
))
287 index
+= TIME_STAMP_LEN
+ BEACON_INTERVAL_LEN
;
289 cap_info
= data
[index
];
290 cap_info
|= (data
[index
+ 1] << 8);
295 /* This function extracts the capability info field from the Association */
296 /* response frame. */
297 INLINE u16
get_assoc_resp_cap_info(u8
*data
)
302 cap_info
|= (data
[1] << 8);
307 /* This funcion extracts the association status code from the incoming */
308 /* association response frame and returns association status code */
309 INLINE u16
get_asoc_status(u8
*data
)
313 asoc_status
= data
[3];
314 asoc_status
= (asoc_status
<< 8) | data
[2];
319 /* This function extracts association ID from the incoming association */
321 INLINE u16
get_asoc_id(u8
*data
)
326 asoc_id
|= (data
[5] << 8);
332 * @brief initializes the Core Configurator
334 * @return Error code indicating success/failure
341 s32
CoreConfiguratorInit(void)
345 PRINT_D(CORECONFIG_DBG
, "CoreConfiguratorInit()\n");
350 u8
*get_tim_elm(u8
*pu8msa
, u16 u16RxLen
, u16 u16TagParamOffset
)
354 /*************************************************************************/
355 /* Beacon Frame - Frame Body */
356 /* --------------------------------------------------------------------- */
357 /* |Timestamp |BeaconInt |CapInfo |SSID |SupRates |DSParSet |TIM elm | */
358 /* --------------------------------------------------------------------- */
359 /* |8 |2 |2 |2-34 |3-10 |3 |4-256 | */
360 /* --------------------------------------------------------------------- */
362 /*************************************************************************/
364 u16index
= u16TagParamOffset
;
366 /* Search for the TIM Element Field and return if the element is found */
367 while (u16index
< (u16RxLen
- FCS_LEN
)) {
368 if (pu8msa
[u16index
] == ITIM
)
369 return &pu8msa
[u16index
];
371 u16index
+= (IE_HDR_LEN
+ pu8msa
[u16index
+ 1]);
377 /* This function gets the current channel information from
378 * the 802.11n beacon/probe response frame */
379 u8
get_current_channel_802_11n(u8
*pu8msa
, u16 u16RxLen
)
383 index
= TAG_PARAM_OFFSET
;
384 while (index
< (u16RxLen
- FCS_LEN
)) {
385 if (pu8msa
[index
] == IDSPARMS
)
386 return pu8msa
[index
+ 2];
388 /* Increment index by length information and header */
389 index
+= pu8msa
[index
+ 1] + IE_HDR_LEN
;
392 /* Return current channel information from the MIB, if beacon/probe */
393 /* response frame does not contain the DS parameter set IE */
394 /* return (mget_CurrentChannel() + 1); */
395 return 0; /* no MIB here */
398 u8
get_current_channel(u8
*pu8msa
, u16 u16RxLen
)
400 /* Extract current channel information from */
401 /* the beacon/probe response frame */
402 return get_current_channel_802_11n(pu8msa
, u16RxLen
);
406 * @brief parses the received 'N' message
408 * @param[in] pu8MsgBuffer The message to be parsed
409 * @param[out] ppstrNetworkInfo pointer to pointer to the structure containing the parsed Network Info
410 * @return Error code indicating success/failure
416 s32
ParseNetworkInfo(u8
*pu8MsgBuffer
, tstrNetworkInfo
**ppstrNetworkInfo
)
419 tstrNetworkInfo
*pstrNetworkInfo
= NULL
;
424 u16 u16WidID
= (u16
)WID_NIL
;
426 u8
*pu8WidVal
= NULL
;
428 u8MsgType
= pu8MsgBuffer
[0];
430 /* Check whether the received message type is 'N' */
431 if ('N' != u8MsgType
) {
432 PRINT_ER("Received Message format incorrect.\n");
436 /* Extract message ID */
437 u8MsgID
= pu8MsgBuffer
[1];
439 /* Extract message Length */
440 u16MsgLen
= MAKE_WORD16(pu8MsgBuffer
[2], pu8MsgBuffer
[3]);
443 u16WidID
= MAKE_WORD16(pu8MsgBuffer
[4], pu8MsgBuffer
[5]);
445 /* Extract WID Length */
446 u16WidLen
= MAKE_WORD16(pu8MsgBuffer
[6], pu8MsgBuffer
[7]);
448 /* Assign a pointer to the WID value */
449 pu8WidVal
= &pu8MsgBuffer
[8];
451 /* parse the WID value of the WID "WID_NEWORK_INFO" */
455 u8
*pu8TimElm
= NULL
;
462 pstrNetworkInfo
= kmalloc(sizeof(tstrNetworkInfo
), GFP_KERNEL
);
463 if (!pstrNetworkInfo
)
466 memset((void *)(pstrNetworkInfo
), 0, sizeof(tstrNetworkInfo
));
468 pstrNetworkInfo
->s8rssi
= pu8WidVal
[0];
470 /* Assign a pointer to msa "Mac Header Start Address" */
471 pu8msa
= &pu8WidVal
[1];
473 u16RxLen
= u16WidLen
- 1;
477 /* Get the cap_info */
478 pstrNetworkInfo
->u16CapInfo
= get_cap_info(pu8msa
);
480 /* Get time-stamp [Low only 32 bit] */
481 pstrNetworkInfo
->u32Tsf
= get_beacon_timestamp_lo(pu8msa
);
482 PRINT_D(CORECONFIG_DBG
, "TSF :%x\n", pstrNetworkInfo
->u32Tsf
);
485 /* Get full time-stamp [Low and High 64 bit] */
486 u32Tsf_Lo
= get_beacon_timestamp_lo(pu8msa
);
487 u32Tsf_Hi
= get_beacon_timestamp_hi(pu8msa
);
489 pstrNetworkInfo
->u64Tsf
= u32Tsf_Lo
| ((u64
)u32Tsf_Hi
<< 32);
492 get_ssid(pu8msa
, pstrNetworkInfo
->au8ssid
, &(pstrNetworkInfo
->u8SsidLen
));
495 get_BSSID(pu8msa
, pstrNetworkInfo
->au8bssid
);
497 /* Get the current channel */
498 pstrNetworkInfo
->u8channel
= get_current_channel(pu8msa
, (u16RxLen
+ FCS_LEN
));
500 /* Get beacon period */
501 u8index
= (MAC_HDR_LEN
+ TIME_STAMP_LEN
);
503 pstrNetworkInfo
->u16BeaconPeriod
= get_beacon_period(pu8msa
+ u8index
);
505 u8index
+= BEACON_INTERVAL_LEN
+ CAP_INFO_LEN
;
507 /* Get DTIM Period */
508 pu8TimElm
= get_tim_elm(pu8msa
, (u16RxLen
+ FCS_LEN
), u8index
);
509 if (pu8TimElm
!= NULL
)
510 pstrNetworkInfo
->u8DtimPeriod
= pu8TimElm
[3];
511 pu8IEs
= &pu8msa
[MAC_HDR_LEN
+ TIME_STAMP_LEN
+ BEACON_INTERVAL_LEN
+ CAP_INFO_LEN
];
512 u16IEsLen
= u16RxLen
- (MAC_HDR_LEN
+ TIME_STAMP_LEN
+ BEACON_INTERVAL_LEN
+ CAP_INFO_LEN
);
515 pstrNetworkInfo
->pu8IEs
= kmalloc(u16IEsLen
, GFP_KERNEL
);
516 if (!pstrNetworkInfo
->pu8IEs
)
519 memset((void *)(pstrNetworkInfo
->pu8IEs
), 0, u16IEsLen
);
521 memcpy(pstrNetworkInfo
->pu8IEs
, pu8IEs
, u16IEsLen
);
523 pstrNetworkInfo
->u16IEsLen
= u16IEsLen
;
527 *ppstrNetworkInfo
= pstrNetworkInfo
;
533 * @brief Deallocates the parsed Network Info
535 * @param[in] pstrNetworkInfo Network Info to be deallocated
536 * @return Error code indicating success/failure
542 s32
DeallocateNetworkInfo(tstrNetworkInfo
*pstrNetworkInfo
)
546 if (pstrNetworkInfo
!= NULL
) {
547 if (pstrNetworkInfo
->pu8IEs
!= NULL
) {
548 kfree(pstrNetworkInfo
->pu8IEs
);
549 pstrNetworkInfo
->pu8IEs
= NULL
;
554 kfree(pstrNetworkInfo
);
555 pstrNetworkInfo
= NULL
;
565 * @brief parses the received Association Response frame
567 * @param[in] pu8Buffer The Association Response frame to be parsed
568 * @param[out] ppstrConnectRespInfo pointer to pointer to the structure containing the parsed Association Response Info
569 * @return Error code indicating success/failure
575 s32
ParseAssocRespInfo(u8
*pu8Buffer
, u32 u32BufferLen
,
576 tstrConnectRespInfo
**ppstrConnectRespInfo
)
579 tstrConnectRespInfo
*pstrConnectRespInfo
= NULL
;
580 u16 u16AssocRespLen
= 0;
584 pstrConnectRespInfo
= kmalloc(sizeof(tstrConnectRespInfo
), GFP_KERNEL
);
585 if (!pstrConnectRespInfo
)
588 memset((void *)(pstrConnectRespInfo
), 0, sizeof(tstrConnectRespInfo
));
590 /* u16AssocRespLen = pu8Buffer[0]; */
591 u16AssocRespLen
= (u16
)u32BufferLen
;
593 /* get the status code */
594 pstrConnectRespInfo
->u16ConnectStatus
= get_asoc_status(pu8Buffer
);
595 if (pstrConnectRespInfo
->u16ConnectStatus
== SUCCESSFUL_STATUSCODE
) {
597 /* get the capability */
598 pstrConnectRespInfo
->u16capability
= get_assoc_resp_cap_info(pu8Buffer
);
600 /* get the Association ID */
601 pstrConnectRespInfo
->u16AssocID
= get_asoc_id(pu8Buffer
);
603 /* get the Information Elements */
604 pu8IEs
= &pu8Buffer
[CAP_INFO_LEN
+ STATUS_CODE_LEN
+ AID_LEN
];
605 u16IEsLen
= u16AssocRespLen
- (CAP_INFO_LEN
+ STATUS_CODE_LEN
+ AID_LEN
);
607 pstrConnectRespInfo
->pu8RespIEs
= kmalloc(u16IEsLen
, GFP_KERNEL
);
608 if (!pstrConnectRespInfo
->pu8RespIEs
)
611 memset((void *)(pstrConnectRespInfo
->pu8RespIEs
), 0, u16IEsLen
);
613 memcpy(pstrConnectRespInfo
->pu8RespIEs
, pu8IEs
, u16IEsLen
);
614 pstrConnectRespInfo
->u16RespIEsLen
= u16IEsLen
;
617 *ppstrConnectRespInfo
= pstrConnectRespInfo
;
624 * @brief Deallocates the parsed Association Response Info
626 * @param[in] pstrNetworkInfo Network Info to be deallocated
627 * @return Error code indicating success/failure
633 s32
DeallocateAssocRespInfo(tstrConnectRespInfo
*pstrConnectRespInfo
)
637 if (pstrConnectRespInfo
!= NULL
) {
638 if (pstrConnectRespInfo
->pu8RespIEs
!= NULL
) {
639 kfree(pstrConnectRespInfo
->pu8RespIEs
);
640 pstrConnectRespInfo
->pu8RespIEs
= NULL
;
645 kfree(pstrConnectRespInfo
);
646 pstrConnectRespInfo
= NULL
;
655 #ifndef CONNECT_DIRECT
656 s32
ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults
[][MAX_SURVEY_RESULT_FRAG_SIZE
],
657 wid_site_survey_reslts_s
**ppstrSurveyResults
,
658 u32
*pu32SurveyResultsCount
)
661 wid_site_survey_reslts_s
*pstrSurveyResults
= NULL
;
662 u32 u32SurveyResultsCount
= 0;
663 u32 u32SurveyBytesLength
= 0;
665 u32 u32RcvdSurveyResultsNum
= 2;
666 u8 u8ReadSurveyResFragNum
;
670 for (i
= 0; i
< u32RcvdSurveyResultsNum
; i
++) {
671 u32SurveyBytesLength
= ppu8RcvdSiteSurveyResults
[i
][0];
674 for (j
= 0; j
< u32SurveyBytesLength
; j
+= SURVEY_RESULT_LENGTH
) {
675 u32SurveyResultsCount
++;
679 pstrSurveyResults
= kmalloc_array(u32SurveyResultsCount
,
680 sizeof(wid_site_survey_reslts_s
), GFP_KERNEL
);
681 if (!pstrSurveyResults
)
684 memset((void *)(pstrSurveyResults
), 0, u32SurveyResultsCount
* sizeof(wid_site_survey_reslts_s
));
686 u32SurveyResultsCount
= 0;
688 for (i
= 0; i
< u32RcvdSurveyResultsNum
; i
++) {
689 pu8BufferPtr
= ppu8RcvdSiteSurveyResults
[i
];
691 u32SurveyBytesLength
= pu8BufferPtr
[0];
693 /* TODO: mostafa: pu8BufferPtr[1] contains the fragment num */
694 u8ReadSurveyResFragNum
= pu8BufferPtr
[1];
698 for (j
= 0; j
< u32SurveyBytesLength
; j
+= SURVEY_RESULT_LENGTH
) {
699 memcpy(&pstrSurveyResults
[u32SurveyResultsCount
], pu8BufferPtr
, SURVEY_RESULT_LENGTH
);
700 pu8BufferPtr
+= SURVEY_RESULT_LENGTH
;
701 u32SurveyResultsCount
++;
706 *ppstrSurveyResults
= pstrSurveyResults
;
707 *pu32SurveyResultsCount
= u32SurveyResultsCount
;
713 s32
DeallocateSurveyResults(wid_site_survey_reslts_s
*pstrSurveyResults
)
717 if (pstrSurveyResults
!= NULL
) {
718 kfree(pstrSurveyResults
);
726 * @brief Deinitializes the Core Configurator
728 * @return Error code indicating success/failure
735 s32
CoreConfiguratorDeInit(void)
739 PRINT_D(CORECONFIG_DBG
, "CoreConfiguratorDeInit()\n");
745 /*Using the global handle of the driver*/
746 extern wilc_wlan_oup_t
*gpstrWlanOps
;
748 * @brief sends certain Configuration Packet based on the input WIDs pstrWIDs
749 * using driver config layer
752 * @param[in] pstrWIDs WIDs to be sent in the configuration packet
753 * @param[in] u32WIDsCount number of WIDs to be sent in the configuration packet
754 * @param[out] pu8RxResp The received Packet Response
755 * @param[out] ps32RxRespLen Length of the received Packet Response
756 * @return Error code indicating success/failure
762 s32
SendConfigPkt(u8 u8Mode
, tstrWID
*pstrWIDs
,
763 u32 u32WIDsCount
, bool bRespRequired
, u32 drvHandler
)
765 s32 counter
= 0, ret
= 0;
767 if (gpstrWlanOps
== NULL
) {
768 PRINT_D(CORECONFIG_DBG
, "Net Dev is still not initialized\n");
771 PRINT_D(CORECONFIG_DBG
, "Net Dev is initialized\n");
773 if (gpstrWlanOps
->wlan_cfg_set
== NULL
||
774 gpstrWlanOps
->wlan_cfg_get
== NULL
) {
775 PRINT_D(CORECONFIG_DBG
, "Set and Get is still not initialized\n");
778 PRINT_D(CORECONFIG_DBG
, "SET is initialized\n");
780 if (u8Mode
== GET_CFG
) {
781 for (counter
= 0; counter
< u32WIDsCount
; counter
++) {
782 PRINT_INFO(CORECONFIG_DBG
, "Sending CFG packet [%d][%d]\n", !counter
,
783 (counter
== u32WIDsCount
- 1));
784 if (!gpstrWlanOps
->wlan_cfg_get(!counter
,
785 pstrWIDs
[counter
].u16WIDid
,
786 (counter
== u32WIDsCount
- 1), drvHandler
)) {
788 printk("[Sendconfigpkt]Get Timed out\n");
796 for (counter
= 0; counter
< u32WIDsCount
; counter
++) {
797 pstrWIDs
[counter
].s32ValueSize
= gpstrWlanOps
->wlan_cfg_get_value(
798 pstrWIDs
[counter
].u16WIDid
,
799 pstrWIDs
[counter
].ps8WidVal
, pstrWIDs
[counter
].s32ValueSize
);
802 } else if (u8Mode
== SET_CFG
) {
803 for (counter
= 0; counter
< u32WIDsCount
; counter
++) {
804 PRINT_D(CORECONFIG_DBG
, "Sending config SET PACKET WID:%x\n", pstrWIDs
[counter
].u16WIDid
);
805 if (!gpstrWlanOps
->wlan_cfg_set(!counter
,
806 pstrWIDs
[counter
].u16WIDid
, pstrWIDs
[counter
].ps8WidVal
,
807 pstrWIDs
[counter
].s32ValueSize
,
808 (counter
== u32WIDsCount
- 1), drvHandler
)) {
810 printk("[Sendconfigpkt]Set Timed out\n");