diff options
| author | Joel Challis <git@zvecr.com> | 2019-11-25 20:33:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-25 20:33:02 +0000 |
| commit | f0f161e5724375b7a289699703d86d6de2adae8d (patch) | |
| tree | 2560653fc37df8ee0210e3bb3414628ba74b28ef /tmk_core | |
| parent | 3a7085dee4389bfc3356336180b44d294cf0738a (diff) | |
| download | qmk_firmware-f0f161e5724375b7a289699703d86d6de2adae8d.tar.gz qmk_firmware-f0f161e5724375b7a289699703d86d6de2adae8d.zip | |
Remove vusb 'reset to bootloader' hid message due to security implications (#7456)
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/protocol/vusb/vusb.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 72445e00b..e66938445 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c | |||
| @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 26 | #include "debug.h" | 26 | #include "debug.h" |
| 27 | #include "host_driver.h" | 27 | #include "host_driver.h" |
| 28 | #include "vusb.h" | 28 | #include "vusb.h" |
| 29 | #include "bootloader.h" | ||
| 30 | #include <util/delay.h> | 29 | #include <util/delay.h> |
| 31 | 30 | ||
| 32 | static uint8_t vusb_keyboard_leds = 0; | 31 | static uint8_t vusb_keyboard_leds = 0; |
| @@ -145,7 +144,7 @@ static void send_consumer(uint16_t data) { | |||
| 145 | *------------------------------------------------------------------*/ | 144 | *------------------------------------------------------------------*/ |
| 146 | static struct { | 145 | static struct { |
| 147 | uint16_t len; | 146 | uint16_t len; |
| 148 | enum { NONE, BOOTLOADER, SET_LED } kind; | 147 | enum { NONE, SET_LED } kind; |
| 149 | } last_req; | 148 | } last_req; |
| 150 | 149 | ||
| 151 | usbMsgLen_t usbFunctionSetup(uchar data[8]) { | 150 | usbMsgLen_t usbFunctionSetup(uchar data[8]) { |
| @@ -173,11 +172,6 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { | |||
| 173 | debug("SET_LED: "); | 172 | debug("SET_LED: "); |
| 174 | last_req.kind = SET_LED; | 173 | last_req.kind = SET_LED; |
| 175 | last_req.len = rq->wLength.word; | 174 | last_req.len = rq->wLength.word; |
| 176 | #ifdef BOOTLOADER_SIZE | ||
| 177 | } else if (rq->wValue.word == 0x0301) { | ||
| 178 | last_req.kind = BOOTLOADER; | ||
| 179 | last_req.len = rq->wLength.word; | ||
| 180 | #endif | ||
| 181 | } | 175 | } |
| 182 | return USB_NO_MSG; // to get data in usbFunctionWrite | 176 | return USB_NO_MSG; // to get data in usbFunctionWrite |
| 183 | } else { | 177 | } else { |
| @@ -204,11 +198,6 @@ uchar usbFunctionWrite(uchar *data, uchar len) { | |||
| 204 | last_req.len = 0; | 198 | last_req.len = 0; |
| 205 | return 1; | 199 | return 1; |
| 206 | break; | 200 | break; |
| 207 | case BOOTLOADER: | ||
| 208 | usbDeviceDisconnect(); | ||
| 209 | bootloader_jump(); | ||
| 210 | return 1; | ||
| 211 | break; | ||
| 212 | case NONE: | 201 | case NONE: |
| 213 | default: | 202 | default: |
| 214 | return -1; | 203 | return -1; |
