.. | .. |
---|
70 | 70 | return err; |
---|
71 | 71 | } |
---|
72 | 72 | |
---|
73 | | -static int prism2_domibset_uint32(struct wlandevice *wlandev, u32 did, u32 data) |
---|
| 73 | +static int prism2_domibset_uint32(struct wlandevice *wlandev, |
---|
| 74 | + u32 did, u32 data) |
---|
74 | 75 | { |
---|
75 | 76 | struct p80211msg_dot11req_mibset msg; |
---|
76 | 77 | struct p80211item_uint32 *mibitem = |
---|
77 | 78 | (struct p80211item_uint32 *)&msg.mibattribute.data; |
---|
78 | 79 | |
---|
79 | | - msg.msgcode = DIDmsg_dot11req_mibset; |
---|
| 80 | + msg.msgcode = DIDMSG_DOT11REQ_MIBSET; |
---|
80 | 81 | mibitem->did = did; |
---|
81 | 82 | mibitem->data = data; |
---|
82 | 83 | |
---|
.. | .. |
---|
90 | 91 | struct p80211item_pstr32 *mibitem = |
---|
91 | 92 | (struct p80211item_pstr32 *)&msg.mibattribute.data; |
---|
92 | 93 | |
---|
93 | | - msg.msgcode = DIDmsg_dot11req_mibset; |
---|
| 94 | + msg.msgcode = DIDMSG_DOT11REQ_MIBSET; |
---|
94 | 95 | mibitem->did = did; |
---|
95 | 96 | mibitem->data.len = len; |
---|
96 | 97 | memcpy(mibitem->data.data, data, len); |
---|
.. | .. |
---|
129 | 130 | |
---|
130 | 131 | /* Set Operation mode to the PORT TYPE RID */ |
---|
131 | 132 | result = prism2_domibset_uint32(wlandev, |
---|
132 | | - DIDmib_p2_p2Static_p2CnfPortType, |
---|
| 133 | + DIDMIB_P2_STATIC_CNFPORTTYPE, |
---|
133 | 134 | data); |
---|
134 | 135 | |
---|
135 | 136 | if (result) |
---|
.. | .. |
---|
158 | 159 | } |
---|
159 | 160 | |
---|
160 | 161 | if (prism2_domibset_uint32(wlandev, |
---|
161 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, |
---|
| 162 | + DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, |
---|
162 | 163 | key_index)) |
---|
163 | 164 | return -EFAULT; |
---|
164 | 165 | |
---|
165 | 166 | /* send key to driver */ |
---|
166 | | - did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(key_index + 1); |
---|
| 167 | + did = didmib_dot11smt_wepdefaultkeystable_key(key_index + 1); |
---|
167 | 168 | |
---|
168 | 169 | if (prism2_domibset_pstr32(wlandev, did, params->key_len, params->key)) |
---|
169 | 170 | return -EFAULT; |
---|
.. | .. |
---|
216 | 217 | return -EINVAL; |
---|
217 | 218 | |
---|
218 | 219 | /* send key to driver */ |
---|
219 | | - did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(key_index + 1); |
---|
| 220 | + did = didmib_dot11smt_wepdefaultkeystable_key(key_index + 1); |
---|
220 | 221 | result = prism2_domibset_pstr32(wlandev, did, 13, "0000000000000"); |
---|
221 | 222 | |
---|
222 | 223 | if (result) |
---|
.. | .. |
---|
230 | 231 | { |
---|
231 | 232 | struct wlandevice *wlandev = dev->ml_priv; |
---|
232 | 233 | |
---|
233 | | - int err = 0; |
---|
234 | | - int result = 0; |
---|
235 | | - |
---|
236 | | - result = prism2_domibset_uint32(wlandev, |
---|
237 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, |
---|
238 | | - key_index); |
---|
239 | | - |
---|
240 | | - if (result) |
---|
241 | | - err = -EFAULT; |
---|
242 | | - |
---|
243 | | - return err; |
---|
| 234 | + return prism2_domibset_uint32(wlandev, |
---|
| 235 | + DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, |
---|
| 236 | + key_index); |
---|
244 | 237 | } |
---|
245 | 238 | |
---|
246 | 239 | static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, |
---|
.. | .. |
---|
256 | 249 | return -EOPNOTSUPP; |
---|
257 | 250 | |
---|
258 | 251 | /* build request message */ |
---|
259 | | - quality.msgcode = DIDmsg_lnxreq_commsquality; |
---|
| 252 | + quality.msgcode = DIDMSG_LNXREQ_COMMSQUALITY; |
---|
260 | 253 | quality.dbm.data = P80211ENUM_truth_true; |
---|
261 | 254 | quality.dbm.status = P80211ENUM_msgitem_status_data_ok; |
---|
262 | 255 | |
---|
.. | .. |
---|
311 | 304 | priv->scan_request = request; |
---|
312 | 305 | |
---|
313 | 306 | memset(&msg1, 0x00, sizeof(msg1)); |
---|
314 | | - msg1.msgcode = DIDmsg_dot11req_scan; |
---|
| 307 | + msg1.msgcode = DIDMSG_DOT11REQ_SCAN; |
---|
315 | 308 | msg1.bsstype.data = P80211ENUM_bsstype_any; |
---|
316 | 309 | |
---|
317 | 310 | memset(&msg1.bssid.data.data, 0xFF, sizeof(msg1.bssid.data.data)); |
---|
.. | .. |
---|
350 | 343 | int freq; |
---|
351 | 344 | |
---|
352 | 345 | memset(&msg2, 0, sizeof(msg2)); |
---|
353 | | - msg2.msgcode = DIDmsg_dot11req_scan_results; |
---|
| 346 | + msg2.msgcode = DIDMSG_DOT11REQ_SCAN_RESULTS; |
---|
354 | 347 | msg2.bssindex.data = i; |
---|
355 | 348 | |
---|
356 | 349 | result = p80211req_dorequest(wlandev, (u8 *)&msg2); |
---|
.. | .. |
---|
366 | 359 | freq = ieee80211_channel_to_frequency(msg2.dschannel.data, |
---|
367 | 360 | NL80211_BAND_2GHZ); |
---|
368 | 361 | bss = cfg80211_inform_bss(wiphy, |
---|
369 | | - ieee80211_get_channel(wiphy, freq), |
---|
370 | | - CFG80211_BSS_FTYPE_UNKNOWN, |
---|
371 | | - (const u8 *)&msg2.bssid.data.data, |
---|
372 | | - msg2.timestamp.data, msg2.capinfo.data, |
---|
373 | | - msg2.beaconperiod.data, |
---|
374 | | - ie_buf, |
---|
375 | | - ie_len, |
---|
376 | | - (msg2.signal.data - 65536) * 100, /* Conversion to signed type */ |
---|
377 | | - GFP_KERNEL |
---|
378 | | - ); |
---|
| 362 | + ieee80211_get_channel(wiphy, freq), |
---|
| 363 | + CFG80211_BSS_FTYPE_UNKNOWN, |
---|
| 364 | + (const u8 *)&msg2.bssid.data.data, |
---|
| 365 | + msg2.timestamp.data, msg2.capinfo.data, |
---|
| 366 | + msg2.beaconperiod.data, |
---|
| 367 | + ie_buf, |
---|
| 368 | + ie_len, |
---|
| 369 | + (msg2.signal.data - 65536) * 100, /* Conversion to signed type */ |
---|
| 370 | + GFP_KERNEL); |
---|
379 | 371 | |
---|
380 | 372 | if (!bss) { |
---|
381 | 373 | err = -ENOMEM; |
---|
.. | .. |
---|
410 | 402 | data = wiphy->rts_threshold; |
---|
411 | 403 | |
---|
412 | 404 | result = prism2_domibset_uint32(wlandev, |
---|
413 | | - DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold, |
---|
| 405 | + DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD, |
---|
414 | 406 | data); |
---|
415 | 407 | if (result) { |
---|
416 | 408 | err = -EFAULT; |
---|
.. | .. |
---|
425 | 417 | data = wiphy->frag_threshold; |
---|
426 | 418 | |
---|
427 | 419 | result = prism2_domibset_uint32(wlandev, |
---|
428 | | - DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold, |
---|
| 420 | + DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD, |
---|
429 | 421 | data); |
---|
430 | 422 | if (result) { |
---|
431 | 423 | err = -EFAULT; |
---|
.. | .. |
---|
455 | 447 | if (channel) { |
---|
456 | 448 | chan = ieee80211_frequency_to_channel(channel->center_freq); |
---|
457 | 449 | result = prism2_domibset_uint32(wlandev, |
---|
458 | | - DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel, |
---|
| 450 | + DIDMIB_DOT11PHY_DSSSTABLE_CURRENTCHANNEL, |
---|
459 | 451 | chan); |
---|
460 | 452 | if (result) |
---|
461 | 453 | goto exit; |
---|
.. | .. |
---|
480 | 472 | return -EINVAL; |
---|
481 | 473 | |
---|
482 | 474 | result = prism2_domibset_uint32(wlandev, |
---|
483 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, |
---|
| 475 | + DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, |
---|
484 | 476 | sme->key_idx); |
---|
485 | 477 | if (result) |
---|
486 | 478 | goto exit; |
---|
487 | 479 | |
---|
488 | 480 | /* send key to driver */ |
---|
489 | | - did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key( |
---|
| 481 | + did = didmib_dot11smt_wepdefaultkeystable_key( |
---|
490 | 482 | sme->key_idx + 1); |
---|
491 | 483 | result = prism2_domibset_pstr32(wlandev, |
---|
492 | 484 | did, sme->key_len, |
---|
.. | .. |
---|
500 | 492 | * seems reasonable anyways |
---|
501 | 493 | */ |
---|
502 | 494 | result = prism2_domibset_uint32(wlandev, |
---|
503 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, |
---|
| 495 | + DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED, |
---|
504 | 496 | P80211ENUM_truth_true); |
---|
505 | 497 | if (result) |
---|
506 | 498 | goto exit; |
---|
507 | 499 | |
---|
508 | 500 | result = prism2_domibset_uint32(wlandev, |
---|
509 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, |
---|
| 501 | + DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED, |
---|
510 | 502 | P80211ENUM_truth_true); |
---|
511 | 503 | if (result) |
---|
512 | 504 | goto exit; |
---|
.. | .. |
---|
516 | 508 | * and exclude unencrypted |
---|
517 | 509 | */ |
---|
518 | 510 | result = prism2_domibset_uint32(wlandev, |
---|
519 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, |
---|
| 511 | + DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED, |
---|
520 | 512 | P80211ENUM_truth_false); |
---|
521 | 513 | if (result) |
---|
522 | 514 | goto exit; |
---|
523 | 515 | |
---|
524 | 516 | result = prism2_domibset_uint32(wlandev, |
---|
525 | | - DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, |
---|
| 517 | + DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED, |
---|
526 | 518 | P80211ENUM_truth_false); |
---|
527 | 519 | if (result) |
---|
528 | 520 | goto exit; |
---|
.. | .. |
---|
531 | 523 | /* Now do the actual join. Note there is no way that I can |
---|
532 | 524 | * see to request a specific bssid |
---|
533 | 525 | */ |
---|
534 | | - msg_join.msgcode = DIDmsg_lnxreq_autojoin; |
---|
| 526 | + msg_join.msgcode = DIDMSG_LNXREQ_AUTOJOIN; |
---|
535 | 527 | |
---|
536 | 528 | memcpy(msg_join.ssid.data.data, sme->ssid, length); |
---|
537 | 529 | msg_join.ssid.data.len = length; |
---|
.. | .. |
---|
554 | 546 | int err = 0; |
---|
555 | 547 | |
---|
556 | 548 | /* Do a join, with a bogus ssid. Thats the only way I can think of */ |
---|
557 | | - msg_join.msgcode = DIDmsg_lnxreq_autojoin; |
---|
| 549 | + msg_join.msgcode = DIDMSG_LNXREQ_AUTOJOIN; |
---|
558 | 550 | |
---|
559 | 551 | memcpy(msg_join.ssid.data.data, "---", 3); |
---|
560 | 552 | msg_join.ssid.data.len = 3; |
---|
.. | .. |
---|
593 | 585 | data = MBM_TO_DBM(mbm); |
---|
594 | 586 | |
---|
595 | 587 | result = prism2_domibset_uint32(wlandev, |
---|
596 | | - DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel, |
---|
| 588 | + DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL, |
---|
597 | 589 | data); |
---|
598 | 590 | |
---|
599 | 591 | if (result) { |
---|
.. | .. |
---|
616 | 608 | int err = 0; |
---|
617 | 609 | |
---|
618 | 610 | mibitem = (struct p80211item_uint32 *)&msg.mibattribute.data; |
---|
619 | | - msg.msgcode = DIDmsg_dot11req_mibget; |
---|
620 | | - mibitem->did = |
---|
621 | | - DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; |
---|
| 611 | + msg.msgcode = DIDMSG_DOT11REQ_MIBGET; |
---|
| 612 | + mibitem->did = DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL; |
---|
622 | 613 | |
---|
623 | 614 | result = p80211req_dorequest(wlandev, (u8 *)&msg); |
---|
624 | 615 | |
---|
.. | .. |
---|
677 | 668 | }; |
---|
678 | 669 | |
---|
679 | 670 | /* Functions to create/free wiphy interface */ |
---|
680 | | -static struct wiphy *wlan_create_wiphy(struct device *dev, struct wlandevice *wlandev) |
---|
| 671 | +static struct wiphy *wlan_create_wiphy(struct device *dev, |
---|
| 672 | + struct wlandevice *wlandev) |
---|
681 | 673 | { |
---|
682 | 674 | struct wiphy *wiphy; |
---|
683 | 675 | struct prism2_wiphy_private *priv; |
---|