I think it was Mark Twain that said something like: "Quitting smoking is easy, I've done it dozens of times". This is how it was for me, quitting dozens of times, until I visited my Dad after his surgery for lung cancer. Then I gave it up for good. He wasn't even a smoker, so I decided not to increase my odds of going through that. The difference was that the earlier times I wanted to give up smoking, the last time I decided that I had. It's got to be tough dealing with this at the same time as surgery, but maybe this will give you the incentive you need to quit for good.