}
                server->sec_mode = (__u8)le16_to_cpu(rsp->SecurityMode);
                server->maxReq = le16_to_cpu(rsp->MaxMpxCount);
-               server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize),
-                               (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);
+               server->maxBuf = le16_to_cpu(rsp->MaxBufSize);
                server->max_vcs = le16_to_cpu(rsp->MaxNumberVcs);
                /* even though we do not use raw we might as well set this
                accurately, in case we ever find a need for it */
           little endian */
        server->maxReq = le16_to_cpu(pSMBr->MaxMpxCount);
        /* probably no need to store and check maxvcs */
-       server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize),
-                       (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);
+       server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize);
        server->max_rw = le32_to_cpu(pSMBr->MaxRawSize);
        cFYI(DBG2, "Max buf = %d", ses->server->maxBuf);
        server->capabilities = le32_to_cpu(pSMBr->Capabilities);
        pSMB->TotalDataCount = 0;
        pSMB->MaxParameterCount = cpu_to_le32(2);
        /* BB find exact data count max from sess structure BB */
-       pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf -
-                                         MAX_CIFS_HDR_SIZE) & 0xFFFFFF00);
+       pSMB->MaxDataCount = cpu_to_le32(CIFSMaxBufSize & 0xFFFFFF00);
        pSMB->MaxSetupCount = 4;
        pSMB->Reserved = 0;
        pSMB->ParameterOffset = 0;
        pSMB->Reserved = 0;
        pSMB->TotalParameterCount = cpu_to_le32(parm_len);
        pSMB->TotalDataCount  = 0;
-       pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf -
-                                         MAX_CIFS_HDR_SIZE) & 0xFFFFFF00);
+       pSMB->MaxDataCount = cpu_to_le32(CIFSMaxBufSize & 0xFFFFFF00);
        pSMB->ParameterCount = pSMB->TotalParameterCount;
        pSMB->DataCount  = pSMB->TotalDataCount;
        temp_offset = offsetof(struct smb_com_ntransact_req, Parms) +
        params = 12 + name_len /* includes null */ ;
        pSMB->TotalDataCount = 0;       /* no EAs */
        pSMB->MaxParameterCount = cpu_to_le16(10);
-       pSMB->MaxDataCount = cpu_to_le16((tcon->ses->server->maxBuf -
-                                         MAX_CIFS_HDR_SIZE) & 0xFFFFFF00);
+       pSMB->MaxDataCount = cpu_to_le16(CIFSMaxBufSize & 0xFFFFFF00);
        pSMB->MaxSetupCount = 0;
        pSMB->Reserved = 0;
        pSMB->Flags = 0;
                        psrch_inf->index_of_last_entry = 2 /* skip . and .. */ +
                                psrch_inf->entries_in_buffer;
                        lnoff = le16_to_cpu(parms->LastNameOffset);
-                       if (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE <
-                             lnoff) {
+                       if (CIFSMaxBufSize < lnoff) {
                                cERROR(1, "ignoring corrupt resume name");
                                psrch_inf->last_entry = NULL;
                                return rc;
        byte_count = 0;
        pSMB->TotalDataCount = 0;       /* no EAs */
        pSMB->MaxParameterCount = cpu_to_le16(8);
-       pSMB->MaxDataCount =
-               cpu_to_le16((tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) &
-                               0xFFFFFF00);
+       pSMB->MaxDataCount = cpu_to_le16(CIFSMaxBufSize & 0xFFFFFF00);
        pSMB->MaxSetupCount = 0;
        pSMB->Reserved = 0;
        pSMB->Flags = 0;
                        psrch_inf->index_of_last_entry +=
                                psrch_inf->entries_in_buffer;
                        lnoff = le16_to_cpu(parms->LastNameOffset);
-                       if (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE <
-                             lnoff) {
+                       if (CIFSMaxBufSize < lnoff) {
                                cERROR(1, "ignoring corrupt resume name");
                                psrch_inf->last_entry = NULL;
                                return rc;
        pSMB->TotalParameterCount = 0 ;
        pSMB->TotalDataCount = 0;
        pSMB->MaxParameterCount = cpu_to_le32(2);
-       /* BB find exact data count max from sess structure BB */
-       pSMB->MaxDataCount = 0; /* same in little endian or be */
-/* BB VERIFY verify which is correct for above BB */
-       pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf -
-                                            MAX_CIFS_HDR_SIZE) & 0xFFFFFF00);
-
+       pSMB->MaxDataCount = cpu_to_le32(CIFSMaxBufSize & 0xFFFFFF00);
        pSMB->MaxSetupCount = 4;
        pSMB->Reserved = 0;
        pSMB->ParameterOffset = 0;
 
                -EINVAL = invalid transact2
 
  */
-static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize)
+static int check2ndT2(struct smb_hdr *pSMB)
 {
        struct smb_t2_rsp *pSMBt;
        int remaining;
 
        cFYI(1, "missing %d bytes from transact2, check next response",
                remaining);
-       if (total_data_size > maxBufSize) {
+       if (total_data_size > CIFSMaxBufSize) {
                cERROR(1, "TotalDataSize %d is over maximum buffer %d",
-                       total_data_size, maxBufSize);
+                       total_data_size, CIFSMaxBufSize);
                return -EINVAL;
        }
        return remaining;
                    mid->command != buf->Command)
                        continue;
 
-               if (*length == 0 && check2ndT2(buf, server->maxBuf) > 0) {
+               if (*length == 0 && check2ndT2(buf) > 0) {
                        /* We have a multipart transact2 resp */
                        *is_multi_rsp = true;
                        if (mid->resp_buf) {
                cFYI(DBG2, "no very large read support, rsize now 127K");
        }
        if (!(tcon->ses->capabilities & CAP_LARGE_READ_X))
-               cifs_sb->rsize = min(cifs_sb->rsize,
-                              (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
+               cifs_sb->rsize = min(cifs_sb->rsize, CIFSMaxBufSize);
 
        cifs_sb->wsize = cifs_negotiate_wsize(tcon, volume_info);