diff options
| author | fires.gc <fires.gc@gmail.com> | 2009-02-24 07:16:34 +0000 |
|---|---|---|
| committer | fires.gc <fires.gc@gmail.com> | 2009-02-24 07:16:34 +0000 |
| commit | f4f0fc9c00be3cff7cd796fad8011327cdc05414 (patch) | |
| tree | c956bdb7ceb67cda4e381e8f960200ece495405a /Source/Core | |
| parent | 8c93e39ddd4a474407dee693b12000c3278f2d52 (diff) | |
added HCI_CMD_DELETE_STORED_LINK_KEY... but as long as all is okay it shouldnt be called
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2407 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 34 | ||||
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h | 1 |
2 files changed, 34 insertions, 1 deletions
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index b71f8fbce8..5ab68fe5f4 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -1132,6 +1132,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::ExecuteHCICommandMessage(const SHCICom CommandLinkKeyRep(pInput); break; + case HCI_CMD_DELETE_STORED_LINK_KEY: + CommandDeleteStoredLinkKey(pInput); + break; // // --- default --- @@ -1811,6 +1814,35 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteLinkSupervisionTimeout(u8* SendEventCommandComplete(HCI_OCF_WRITE_LINK_SUPERVISION_TIMEOUT, &Reply, sizeof(hci_write_link_supervision_timeout_rp)); } +void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandDeleteStoredLinkKey(u8* _Input) +{ + // command parameters + hci_delete_stored_link_key_cp* pDeleteStoredLinkKey = (hci_delete_stored_link_key_cp*)_Input; + + LOG(WII_IPC_WIIMOTE, "Command: HCI_OCF_DELETE_STORED_LINK_KEY"); + LOG(WII_IPC_WIIMOTE, "Input:"); + LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x", + pDeleteStoredLinkKey->bdaddr.b[0], pDeleteStoredLinkKey->bdaddr.b[1], pDeleteStoredLinkKey->bdaddr.b[2], + pDeleteStoredLinkKey->bdaddr.b[3], pDeleteStoredLinkKey->bdaddr.b[4], pDeleteStoredLinkKey->bdaddr.b[5]); + LOG(WII_IPC_WIIMOTE, " delete_all: 0x%01x", pDeleteStoredLinkKey->delete_all); + + + CWII_IPC_HLE_WiiMote* pWiiMote = AccessWiiMote(pDeleteStoredLinkKey->bdaddr); + if (pWiiMote == NULL) + { + PanicAlert("CommandDeleteStoredLinkKey: Cant find WiiMote by bd"); + return; + } + + hci_delete_stored_link_key_rp Reply; + Reply.status = 0x00; + Reply.num_keys_deleted = 0; + + SendEventCommandComplete(HCI_CMD_DELETE_STORED_LINK_KEY, &Reply, sizeof(hci_delete_stored_link_key_rp)); + + PanicAlert("HCI: CommandDeleteStoredLinkKey... Prolly the security for linking has failed. COuld be a problem with the loading of the SCONF"); +} + void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandLinkKeyNegRep(u8* _Input) { // command parameters @@ -1826,7 +1858,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandLinkKeyNegRep(u8* _Input) Reply.status = 0x00; Reply.bdaddr = pKeyNeg->bdaddr; - SendEventCommandComplete(HCI_OCF_WRITE_LINK_SUPERVISION_TIMEOUT, &Reply, sizeof(hci_link_key_neg_rep_rp)); + SendEventCommandComplete(HCI_CMD_LINK_KEY_NEG_REP, &Reply, sizeof(hci_link_key_neg_rep_rp)); } void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandLinkKeyRep(u8* _Input) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h index 822e868905..a9e1d2a9cb 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h @@ -184,6 +184,7 @@ private: void CommandDisconnect(u8* _Input); void CommandLinkKeyNegRep(u8* _Input); void CommandLinkKeyRep(u8* _Input); + void CommandDeleteStoredLinkKey(u8* _Input); // OGF 0x02 Link policy commands and return parameters void CommandWriteLinkPolicy(u8* _Input); |
