diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index f3e5b7e2e04c..278c8676906a 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -854,7 +854,7 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci, | |||
854 | rpn->flow_ctrl = flow_ctrl_settings; | 854 | rpn->flow_ctrl = flow_ctrl_settings; |
855 | rpn->xon_char = xon_char; | 855 | rpn->xon_char = xon_char; |
856 | rpn->xoff_char = xoff_char; | 856 | rpn->xoff_char = xoff_char; |
857 | rpn->param_mask = param_mask; | 857 | rpn->param_mask = cpu_to_le16(param_mask); |
858 | 858 | ||
859 | *ptr = __fcs(buf); ptr++; | 859 | *ptr = __fcs(buf); ptr++; |
860 | 860 | ||
@@ -1343,7 +1343,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1343 | /* Check for sane values, ignore/accept bit_rate, 8 bits, 1 stop bit, | 1343 | /* Check for sane values, ignore/accept bit_rate, 8 bits, 1 stop bit, |
1344 | * no parity, no flow control lines, normal XON/XOFF chars */ | 1344 | * no parity, no flow control lines, normal XON/XOFF chars */ |
1345 | 1345 | ||
1346 | if (rpn->param_mask & RFCOMM_RPN_PM_BITRATE) { | 1346 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_BITRATE)) { |
1347 | bit_rate = rpn->bit_rate; | 1347 | bit_rate = rpn->bit_rate; |
1348 | if (bit_rate != RFCOMM_RPN_BR_115200) { | 1348 | if (bit_rate != RFCOMM_RPN_BR_115200) { |
1349 | BT_DBG("RPN bit rate mismatch 0x%x", bit_rate); | 1349 | BT_DBG("RPN bit rate mismatch 0x%x", bit_rate); |
@@ -1352,7 +1352,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1352 | } | 1352 | } |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | if (rpn->param_mask & RFCOMM_RPN_PM_DATA) { | 1355 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_DATA)) { |
1356 | data_bits = __get_rpn_data_bits(rpn->line_settings); | 1356 | data_bits = __get_rpn_data_bits(rpn->line_settings); |
1357 | if (data_bits != RFCOMM_RPN_DATA_8) { | 1357 | if (data_bits != RFCOMM_RPN_DATA_8) { |
1358 | BT_DBG("RPN data bits mismatch 0x%x", data_bits); | 1358 | BT_DBG("RPN data bits mismatch 0x%x", data_bits); |
@@ -1361,7 +1361,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1361 | } | 1361 | } |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | if (rpn->param_mask & RFCOMM_RPN_PM_STOP) { | 1364 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_STOP)) { |
1365 | stop_bits = __get_rpn_stop_bits(rpn->line_settings); | 1365 | stop_bits = __get_rpn_stop_bits(rpn->line_settings); |
1366 | if (stop_bits != RFCOMM_RPN_STOP_1) { | 1366 | if (stop_bits != RFCOMM_RPN_STOP_1) { |
1367 | BT_DBG("RPN stop bits mismatch 0x%x", stop_bits); | 1367 | BT_DBG("RPN stop bits mismatch 0x%x", stop_bits); |
@@ -1370,7 +1370,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1370 | } | 1370 | } |
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | if (rpn->param_mask & RFCOMM_RPN_PM_PARITY) { | 1373 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_PARITY)) { |
1374 | parity = __get_rpn_parity(rpn->line_settings); | 1374 | parity = __get_rpn_parity(rpn->line_settings); |
1375 | if (parity != RFCOMM_RPN_PARITY_NONE) { | 1375 | if (parity != RFCOMM_RPN_PARITY_NONE) { |
1376 | BT_DBG("RPN parity mismatch 0x%x", parity); | 1376 | BT_DBG("RPN parity mismatch 0x%x", parity); |
@@ -1379,7 +1379,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1379 | } | 1379 | } |
1380 | } | 1380 | } |
1381 | 1381 | ||
1382 | if (rpn->param_mask & RFCOMM_RPN_PM_FLOW) { | 1382 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_FLOW)) { |
1383 | flow_ctrl = rpn->flow_ctrl; | 1383 | flow_ctrl = rpn->flow_ctrl; |
1384 | if (flow_ctrl != RFCOMM_RPN_FLOW_NONE) { | 1384 | if (flow_ctrl != RFCOMM_RPN_FLOW_NONE) { |
1385 | BT_DBG("RPN flow ctrl mismatch 0x%x", flow_ctrl); | 1385 | BT_DBG("RPN flow ctrl mismatch 0x%x", flow_ctrl); |
@@ -1388,7 +1388,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1388 | } | 1388 | } |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | if (rpn->param_mask & RFCOMM_RPN_PM_XON) { | 1391 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_XON)) { |
1392 | xon_char = rpn->xon_char; | 1392 | xon_char = rpn->xon_char; |
1393 | if (xon_char != RFCOMM_RPN_XON_CHAR) { | 1393 | if (xon_char != RFCOMM_RPN_XON_CHAR) { |
1394 | BT_DBG("RPN XON char mismatch 0x%x", xon_char); | 1394 | BT_DBG("RPN XON char mismatch 0x%x", xon_char); |
@@ -1397,7 +1397,7 @@ static int rfcomm_recv_rpn(struct rfcomm_session *s, int cr, int len, struct sk_ | |||
1397 | } | 1397 | } |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | if (rpn->param_mask & RFCOMM_RPN_PM_XOFF) { | 1400 | if (rpn->param_mask & cpu_to_le16(RFCOMM_RPN_PM_XOFF)) { |
1401 | xoff_char = rpn->xoff_char; | 1401 | xoff_char = rpn->xoff_char; |
1402 | if (xoff_char != RFCOMM_RPN_XOFF_CHAR) { | 1402 | if (xoff_char != RFCOMM_RPN_XOFF_CHAR) { |
1403 | BT_DBG("RPN XOFF char mismatch 0x%x", xoff_char); | 1403 | BT_DBG("RPN XOFF char mismatch 0x%x", xoff_char); |